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