run-tests: move flake next to other tests

This commit is contained in:
Erik Arvstedt 2021-12-08 04:07:30 +01:00
parent bbebd0b383
commit 96df81a4d0
No known key found for this signature in database
GPG Key ID: 33312B944DD97846

View File

@ -246,6 +246,14 @@ vmTestNixExpr() {
EOF
}
flake() {
if [[ $(nix flake 2>&1) != *"requires a sub-command"* ]]; then
echo "Skipping flake test. Nix flake support is not enabled."
else
nix flake check "$scriptDir/.."
fi
}
# A basic subset of tests to keep the total runtime within
# manageable bounds (<4 min on desktop systems).
# These are also run on the CI server.
@ -275,14 +283,6 @@ examples() {
(cd "$scriptDir/../examples" && nix-shell --run "$script")
}
flake() {
if [[ $(nix flake 2>&1) != *"requires a sub-command"* ]]; then
echo "Skipping flake test. Nix flake support is not enabled."
else
nix flake check "$scriptDir/.."
fi
}
all() {
buildable
examples