* 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:
parent
46e42c92c1
commit
1f3b0ede7d
|
@ -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;
|
||||
|
||||
}
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue