2011-09-14 05:59:29 +00:00
|
|
|
source common.sh
|
|
|
|
|
|
|
|
echo "Testing multiple outputs..."
|
|
|
|
|
2011-12-20 17:01:02 +00:00
|
|
|
outPath=$(nix-build multiple-outputs.nix -A b)
|
2011-09-14 05:59:29 +00:00
|
|
|
echo "output path is $outPath"
|
2011-12-20 17:01:02 +00:00
|
|
|
[ "$(cat "$outPath"/file)" = "success" ]
|
2011-12-20 17:08:43 +00:00
|
|
|
|
|
|
|
# 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
|
|
|
|
|
2011-12-20 17:10:39 +00:00
|
|
|
nix-store --gc
|