diff options
author | Eelco Dolstra <edolstra@gmail.com> | 2022-07-13 21:01:16 +0200 |
---|---|---|
committer | Eelco Dolstra <edolstra@gmail.com> | 2022-07-13 21:01:16 +0200 |
commit | b15c4fdbde738310188be035807de7d5b2036a28 (patch) | |
tree | c41012107679092e3428929a3f873ef164bc8a5a /tests/flakes/flakes.sh | |
parent | 752158a8efb7a027e5020d3c9c03aa5d70002b56 (diff) |
Split off 'nix flake check' tests
Diffstat (limited to 'tests/flakes/flakes.sh')
-rw-r--r-- | tests/flakes/flakes.sh | 86 |
1 files changed, 0 insertions, 86 deletions
diff --git a/tests/flakes/flakes.sh b/tests/flakes/flakes.sh index 67f00a3e5..267e2cd6f 100644 --- a/tests/flakes/flakes.sh +++ b/tests/flakes/flakes.sh @@ -340,92 +340,6 @@ rm -rf $TEST_ROOT/flake1-v2 nix flake clone flake1 --dest $TEST_ROOT/flake1-v2 [ -e $TEST_ROOT/flake1-v2/flake.nix ] -# More 'nix flake check' tests. -cat > $flake3Dir/flake.nix <<EOF -{ - outputs = { flake1, self }: { - overlay = final: prev: { - }; - }; -} -EOF - -nix flake check $flake3Dir - -cat > $flake3Dir/flake.nix <<EOF -{ - outputs = { flake1, self }: { - overlay = finalll: prev: { - }; - }; -} -EOF - -(! nix flake check $flake3Dir) - -cat > $flake3Dir/flake.nix <<EOF -{ - outputs = { flake1, self }: { - nixosModules.foo = { - a.b.c = 123; - foo = true; - }; - }; -} -EOF - -nix flake check $flake3Dir - -cat > $flake3Dir/flake.nix <<EOF -{ - outputs = { flake1, self }: { - nixosModules.foo = { - a.b.c = 123; - foo = assert false; true; - }; - }; -} -EOF - -(! nix flake check $flake3Dir) - -cat > $flake3Dir/flake.nix <<EOF -{ - outputs = { flake1, self }: { - nixosModule = { config, pkgs, ... }: { - a.b.c = 123; - }; - }; -} -EOF - -nix flake check $flake3Dir - -cat > $flake3Dir/flake.nix <<EOF -{ - outputs = { flake1, self }: { - nixosModule = { config, pkgs }: { - a.b.c = 123; - }; - }; -} -EOF - -(! nix flake check $flake3Dir) - -cat > $flake3Dir/flake.nix <<EOF -{ - outputs = { flake1, self }: { - packages.system-1.default = "foo"; - packages.system-2.default = "bar"; - }; -} -EOF - -checkRes=$(nix flake check --keep-going $flake3Dir 2>&1 && fail "nix flake check should have failed" || true) -echo "$checkRes" | grep -q "packages.system-1.default" -echo "$checkRes" | grep -q "packages.system-2.default" - # Test 'follows' inputs. cat > $flake3Dir/flake.nix <<EOF { |