mirror of
https://github.com/NixOS/nix
synced 2025-07-08 02:43:54 +02:00
Merge remote-tracking branch 'origin/master' into substitute-other-storedir
This commit is contained in:
commit
acb74d4d94
48 changed files with 748 additions and 306 deletions
|
@ -11,6 +11,7 @@ export NIX_LOCALSTATE_DIR=$TEST_ROOT/var
|
|||
export NIX_LOG_DIR=$TEST_ROOT/var/log/nix
|
||||
export NIX_STATE_DIR=$TEST_ROOT/var/nix
|
||||
export NIX_CONF_DIR=$TEST_ROOT/etc
|
||||
export NIX_DAEMON_SOCKET_PATH=$TEST_ROOT/daemon-socket
|
||||
unset NIX_USER_CONF_FILES
|
||||
export _NIX_TEST_SHARED=$TEST_ROOT/shared
|
||||
if [[ -n $NIX_STORE ]]; then
|
||||
|
@ -76,7 +77,7 @@ startDaemon() {
|
|||
rm -f $NIX_STATE_DIR/daemon-socket/socket
|
||||
nix-daemon &
|
||||
for ((i = 0; i < 30; i++)); do
|
||||
if [ -e $NIX_STATE_DIR/daemon-socket/socket ]; then break; fi
|
||||
if [ -e $NIX_DAEMON_SOCKET_PATH ]; then break; fi
|
||||
sleep 1
|
||||
done
|
||||
pidDaemon=$!
|
||||
|
|
|
@ -40,4 +40,4 @@ tests-environment = NIX_REMOTE= $(bash) -e
|
|||
|
||||
clean-files += $(d)/common.sh
|
||||
|
||||
installcheck: $(d)/common.sh $(d)/config.nix $(d)/plugins/libplugintest.$(SO_EXT)
|
||||
test-deps += tests/common.sh tests/config.nix tests/plugins/libplugintest.$(SO_EXT)
|
||||
|
|
|
@ -16,6 +16,11 @@ nix-env --foo 2>&1 | grep "no operation"
|
|||
nix-env -q --foo 2>&1 | grep "unknown flag"
|
||||
|
||||
# Eval Errors.
|
||||
eval_res=$(nix-instantiate --eval -E 'let a = {} // a; in a.foo' 2>&1 || true)
|
||||
echo $eval_res | grep "(string) (1:15)"
|
||||
echo $eval_res | grep "infinite recursion encountered"
|
||||
eval_arg_res=$(nix-instantiate --eval -E 'let a = {} // a; in a.foo' 2>&1 || true)
|
||||
echo $eval_arg_res | grep "at: (1:15) from string"
|
||||
echo $eval_arg_res | grep "infinite recursion encountered"
|
||||
|
||||
eval_stdin_res=$(echo 'let a = {} // a; in a.foo' | nix-instantiate --eval -E - 2>&1 || true)
|
||||
echo $eval_stdin_res | grep "at: (1:15) from stdin"
|
||||
echo $eval_stdin_res | grep "infinite recursion encountered"
|
||||
|
||||
|
|
|
@ -55,3 +55,10 @@ chmod a+rx $TEST_ROOT/shell.shebang.rb
|
|||
|
||||
output=$($TEST_ROOT/shell.shebang.rb abc ruby)
|
||||
[ "$output" = '-e load("'"$TEST_ROOT"'/shell.shebang.rb") -- abc ruby' ]
|
||||
|
||||
# Test 'nix develop'.
|
||||
nix develop -f shell.nix shellDrv -c bash -c '[[ -n $stdenv ]]'
|
||||
|
||||
# Test 'nix print-dev-env'.
|
||||
source <(nix print-dev-env -f shell.nix shellDrv)
|
||||
[[ -n $stdenv ]]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue