* Add a (currently failing) test that checks whether mutually

recursive outputs are properly rejected.
* Add a (also failing) test for "nix-build -A <output-name>".
This commit is contained in:
Eelco Dolstra 2011-12-20 17:08:43 +00:00
parent 46e42c92c1
commit 1f3b0ede7d
2 changed files with 22 additions and 0 deletions

View file

@ -32,4 +32,15 @@ rec {
'';
};
cyclic = (mkDerivation {
name = "cyclic-outputs";
outputs = [ "a" "b" ];
builder = builtins.toFile "builder.sh"
''
mkdir $a $b
echo $a > $b/foo
echo $b > $a/bar
'';
}).a;
}

View file

@ -5,3 +5,14 @@ echo "Testing multiple outputs..."
outPath=$(nix-build multiple-outputs.nix -A b)
echo "output path is $outPath"
[ "$(cat "$outPath"/file)" = "success" ]
# Make sure that nix-build works on derivations with multiple outputs.
nix-build multiple-outputs.nix -A a.first
# Cyclic outputs should be rejected.
if nix-build multiple-outputs.nix -A cyclic; then
echo "Cyclic outputs incorrectly accepted!"
exit 1
fi
clearStore