diff options
Diffstat (limited to 'tests')
-rw-r--r-- | tests/user-envs.nix.in | 8 | ||||
-rw-r--r-- | tests/user-envs.sh | 4 |
2 files changed, 10 insertions, 2 deletions
diff --git a/tests/user-envs.nix.in b/tests/user-envs.nix.in index 21feea0d31c9..6b9bbe86db41 100644 --- a/tests/user-envs.nix.in +++ b/tests/user-envs.nix.in @@ -7,12 +7,16 @@ assert foo == "foo"; let { - makeDrv = name: progName: derivation { + makeDrv = name: progName: (derivation { inherit name progName system; builder = "@shell@"; shell = "@shell@"; args = ["-e" "-x" ./user-envs.builder.sh]; - }; + } // { + meta = { + description = "A silly test package"; + }; + }); body = [ (makeDrv "foo-1.0" "foo") diff --git a/tests/user-envs.sh b/tests/user-envs.sh index b8df8c37355c..b1ba0ccc164d 100644 --- a/tests/user-envs.sh +++ b/tests/user-envs.sh @@ -1,6 +1,7 @@ source common.sh profiles="$NIX_STATE_DIR"/profiles +rm -f $profiles/* # Query installed: should be empty. test "$($nixenv -p $profiles/test -q '*' | wc -l)" -eq 0 @@ -8,6 +9,9 @@ test "$($nixenv -p $profiles/test -q '*' | wc -l)" -eq 0 # Query available: should contain several. test "$($nixenv -p $profiles/test -f ./user-envs.nix -qa '*' | wc -l)" -eq 5 +# Query descriptions. +$nixenv -p $profiles/test -f ./user-envs.nix -qa '*' --description | grep silly + # Install "foo-1.0". $nixenv -p $profiles/test -f ./user-envs.nix -i foo-1.0 |