about summary refs log tree commit diff
path: root/tests/fixed.sh
diff options
context:
space:
mode:
authorEelco Dolstra <e.dolstra@tudelft.nl>2009-03-18T13·15+0000
committerEelco Dolstra <e.dolstra@tudelft.nl>2009-03-18T13·15+0000
commit1dcf208f562d853909ad53772c208dcb2a73de88 (patch)
treeb7f79afeb5bc7531c63dead1567913bed523a781 /tests/fixed.sh
parent93b6926054b0b339d310a3075a677a65676c7c11 (diff)
* Clean up some tests (use nix-build where appropriate).
Diffstat (limited to 'tests/fixed.sh')
-rw-r--r--tests/fixed.sh23
1 files changed, 6 insertions, 17 deletions
diff --git a/tests/fixed.sh b/tests/fixed.sh
index 9d5de2929b6f..91c122083035 100644
--- a/tests/fixed.sh
+++ b/tests/fixed.sh
@@ -6,22 +6,16 @@ export IMPURE_VAR1=foo
 export IMPURE_VAR2=bar
 
 echo 'testing good...'
-drvs=$($nixinstantiate fixed.nix -A good)
-echo $drvs
-$nixstore -r $drvs
+$nixbuild fixed.nix -A good
 
 echo 'testing good2...'
-drvs=$($nixinstantiate fixed.nix -A good2)
-echo $drvs
-$nixstore -r $drvs
+$nixbuild fixed.nix -A good2
 
 echo 'testing bad...'
-drvs=$($nixinstantiate fixed.nix -A bad)
-echo $drvs
-if $nixstore -r $drvs; then false; fi
+$nixbuild fixed.nix -A bad && fail "should fail"
 
 echo 'testing reallyBad...'
-if $nixinstantiate fixed.nix -A reallyBad; then false; fi
+$nixinstantiate fixed.nix -A reallyBad && fail "should fail"
 
 # While we're at it, check attribute selection a bit more.
 echo 'testing attribute selection...'
@@ -31,17 +25,12 @@ test $($nixinstantiate fixed.nix -A good.1 | wc -l) = 1
 # Only one should run at the same time.
 echo 'testing parallelSame...'
 clearStore
-drvs=$($nixinstantiate fixed.nix -A parallelSame)
-echo $drvs
-$nixstore -r $drvs -j2
+$nixbuild fixed.nix -A parallelSame -j2
 
 # Fixed-output derivations with a recursive SHA-256 hash should
 # produce the same path as "nix-store --add".
 echo 'testing sameAsAdd...'
-drv=$($nixinstantiate fixed.nix -A sameAsAdd)
-echo $drv
-out=$($nixstore -r $drv)
-echo $out
+out=$($nixbuild fixed.nix -A sameAsAdd)
 
 # This is what fixed.builder2 produces...
 rm -rf $TEST_ROOT/fixed