diff options
author | John Ericson <John.Ericson@Obsidian.Systems> | 2020-09-03 22:09:04 +0000 |
---|---|---|
committer | John Ericson <John.Ericson@Obsidian.Systems> | 2020-09-03 22:09:04 +0000 |
commit | 975a47f7fe9365eacd214c196ce5747ea2a19c3b (patch) | |
tree | 5457a2ba3252a172c8fef1683ca09623bd43b9e2 /tests | |
parent | 4db0010a9374e357de3db3c0cf1cb1b490a14727 (diff) | |
parent | e7d93e7ece8fd6906e45d0ea21fa08e00b815ca8 (diff) |
Merge remote-tracking branch 'obsidian/single-ca-drv-build' into ca-floating-upstream
Diffstat (limited to 'tests')
-rw-r--r-- | tests/common.sh.in | 1 | ||||
-rwxr-xr-x | tests/function-trace.sh | 12 | ||||
-rw-r--r-- | tests/lang.sh | 1 | ||||
-rw-r--r-- | tests/nix-build.sh | 2 | ||||
-rw-r--r-- | tests/nix-channel.sh | 6 | ||||
-rw-r--r-- | tests/nix-shell.sh | 4 |
6 files changed, 4 insertions, 22 deletions
diff --git a/tests/common.sh.in b/tests/common.sh.in index 308126094..5e00d64f1 100644 --- a/tests/common.sh.in +++ b/tests/common.sh.in @@ -32,7 +32,6 @@ export PATH=@bindir@:$PATH coreutils=@coreutils@ export dot=@dot@ -export xmllint="@xmllint@" export SHELL="@bash@" export PAGER=cat export HAVE_SODIUM="@HAVE_SODIUM@" diff --git a/tests/function-trace.sh b/tests/function-trace.sh index 182a4d5c2..3b7f364e3 100755 --- a/tests/function-trace.sh +++ b/tests/function-trace.sh @@ -32,8 +32,6 @@ expect_trace() { # failure inside a tryEval expect_trace 'builtins.tryEval (throw "example")' " -function-trace entered undefined position at -function-trace exited undefined position at function-trace entered (string):1:1 at function-trace entered (string):1:19 at function-trace exited (string):1:19 at @@ -42,32 +40,24 @@ function-trace exited (string):1:1 at # Missing argument to a formal function expect_trace '({ x }: x) { }' " -function-trace entered undefined position at -function-trace exited undefined position at function-trace entered (string):1:1 at function-trace exited (string):1:1 at " # Too many arguments to a formal function expect_trace '({ x }: x) { x = "x"; y = "y"; }' " -function-trace entered undefined position at -function-trace exited undefined position at function-trace entered (string):1:1 at function-trace exited (string):1:1 at " # Not enough arguments to a lambda expect_trace '(x: y: x + y) 1' " -function-trace entered undefined position at -function-trace exited undefined position at function-trace entered (string):1:1 at function-trace exited (string):1:1 at " # Too many arguments to a lambda expect_trace '(x: x) 1 2' " -function-trace entered undefined position at -function-trace exited undefined position at function-trace entered (string):1:1 at function-trace exited (string):1:1 at function-trace entered (string):1:1 at @@ -76,8 +66,6 @@ function-trace exited (string):1:1 at # Not a function expect_trace '1 2' " -function-trace entered undefined position at -function-trace exited undefined position at function-trace entered (string):1:1 at function-trace exited (string):1:1 at " diff --git a/tests/lang.sh b/tests/lang.sh index c797a2a74..61bb444ba 100644 --- a/tests/lang.sh +++ b/tests/lang.sh @@ -1,6 +1,7 @@ source common.sh export TEST_VAR=foo # for eval-okay-getenv.nix +export NIX_REMOTE=dummy:// nix-instantiate --eval -E 'builtins.trace "Hello" 123' 2>&1 | grep -q Hello (! nix-instantiate --show-trace --eval -E 'builtins.addErrorContext "Hello" 123' 2>&1 | grep -q Hello) diff --git a/tests/nix-build.sh b/tests/nix-build.sh index 0eb599608..3123c6da3 100644 --- a/tests/nix-build.sh +++ b/tests/nix-build.sh @@ -24,5 +24,5 @@ outPath2=$(nix-build $(nix-instantiate dependencies.nix) --no-out-link) outPath2=$(nix-build $(nix-instantiate dependencies.nix)!out --no-out-link) [[ $outPath = $outPath2 ]] -outPath2=$(nix-store -r $(nix-instantiate --indirect --add-root $TEST_ROOT/indirect dependencies.nix)!out) +outPath2=$(nix-store -r $(nix-instantiate --add-root $TEST_ROOT/indirect dependencies.nix)!out) [[ $outPath = $outPath2 ]] diff --git a/tests/nix-channel.sh b/tests/nix-channel.sh index 49c68981a..63c0f97ba 100644 --- a/tests/nix-channel.sh +++ b/tests/nix-channel.sh @@ -28,9 +28,6 @@ nix-channel --update # Do a query. nix-env -qa \* --meta --xml --out-path > $TEST_ROOT/meta.xml -if [ "$xmllint" != false ]; then - $xmllint --noout $TEST_ROOT/meta.xml || fail "malformed XML" -fi grep -q 'meta.*description.*Random test package' $TEST_ROOT/meta.xml grep -q 'item.*attrPath="foo".*name="dependencies-top"' $TEST_ROOT/meta.xml @@ -47,9 +44,6 @@ nix-channel --update # Do a query. nix-env -qa \* --meta --xml --out-path > $TEST_ROOT/meta.xml -if [ "$xmllint" != false ]; then - $xmllint --noout $TEST_ROOT/meta.xml || fail "malformed XML" -fi grep -q 'meta.*description.*Random test package' $TEST_ROOT/meta.xml grep -q 'item.*attrPath="foo".*name="dependencies-top"' $TEST_ROOT/meta.xml diff --git a/tests/nix-shell.sh b/tests/nix-shell.sh index 650904057..1228bb04f 100644 --- a/tests/nix-shell.sh +++ b/tests/nix-shell.sh @@ -27,12 +27,12 @@ output=$(nix-shell --pure --keep SELECTED_IMPURE_VAR shell.nix -A shellDrv --run # Test nix-shell on a .drv symlink # Legacy: absolute path and .drv extension required -nix-instantiate shell.nix -A shellDrv --indirect --add-root $TEST_ROOT/shell.drv +nix-instantiate shell.nix -A shellDrv --add-root $TEST_ROOT/shell.drv [[ $(nix-shell --pure $TEST_ROOT/shell.drv --run \ 'echo "$IMPURE_VAR - $VAR_FROM_STDENV_SETUP - $VAR_FROM_NIX"') = " - foo - bar" ]] # New behaviour: just needs to resolve to a derivation in the store -nix-instantiate shell.nix -A shellDrv --indirect --add-root $TEST_ROOT/shell +nix-instantiate shell.nix -A shellDrv --add-root $TEST_ROOT/shell [[ $(nix-shell --pure $TEST_ROOT/shell --run \ 'echo "$IMPURE_VAR - $VAR_FROM_STDENV_SETUP - $VAR_FROM_NIX"') = " - foo - bar" ]] |