about summary refs log tree commit diff
path: root/tests/user-envs.sh
diff options
context:
space:
mode:
authorEelco Dolstra <eelco.dolstra@logicblox.com>2014-08-21T19·50+0200
committerEelco Dolstra <eelco.dolstra@logicblox.com>2014-08-21T19·50+0200
commit3f80060500bb3a9dff192c11af63da7364673ab0 (patch)
tree49aa943001a44d1db7f5fdb1e87d15f55f67bfa3 /tests/user-envs.sh
parent809ca33806d75eeabb9c668b124762fb6462e5bc (diff)
Fix tests
So all these years I was totally deluded about the meaning of "set
-e". You might think that it causes statements like "false && true" or
"! true" to fail, but it doesn't...
Diffstat (limited to 'tests/user-envs.sh')
-rw-r--r--tests/user-envs.sh10
1 files changed, 4 insertions, 6 deletions
diff --git a/tests/user-envs.sh b/tests/user-envs.sh
index 0d997acd69d9..c9eed5a6633d 100644
--- a/tests/user-envs.sh
+++ b/tests/user-envs.sh
@@ -3,8 +3,6 @@ source common.sh
 clearStore
 clearProfiles
 
-set -x
-
 # Query installed: should be empty.
 test "$(nix-env -p $profiles/test -q '*' | wc -l)" -eq 0
 
@@ -46,7 +44,7 @@ nix-env -qas | grep -q -- '---  bar-0.1'
 
 # Disable foo.
 nix-env --set-flag active false foo
-! [ -e "$profiles/test/bin/foo" ]
+(! [ -e "$profiles/test/bin/foo" ])
 
 # Enable foo.
 nix-env --set-flag active true foo
@@ -116,7 +114,7 @@ nix-store -q --referrers-closure $profiles/test | grep "$(nix-store -q --resolve
 ln -sfn $outPath10/bin/foo $TEST_ROOT/symlink
 nix-env -e $TEST_ROOT/symlink
 if nix-env -q '*' | grep -q foo; then false; fi
-! nix-store -qR $profiles/test | grep "$outPath10"
+(! nix-store -qR $profiles/test | grep "$outPath10")
 
 # Install foo-1.0, now using a symlink to its store path.
 nix-env -i $TEST_ROOT/symlink
@@ -129,7 +127,7 @@ nix-env --delete-generations old
 # foo-1.0.
 nix-collect-garbage
 test -e "$outPath10"
-! [ -e "$outPath20" ]
+(! [ -e "$outPath20" ])
 
 # Uninstall everything
 nix-env -e '*'
@@ -143,7 +141,7 @@ nix-env -q '*' | grep -q foo-2.0
 # On the other hand, this should install both (and should fail due to
 # a collision).
 nix-env -e '*'
-! nix-env -i foo-1.0 foo-2.0
+(! nix-env -i foo-1.0 foo-2.0)
 
 # Installing "*" should install one foo and one bar.
 nix-env -e '*'