mirror of
https://github.com/privatevoid-net/nix-super.git
synced 2024-11-15 02:36:16 +02:00
Merge pull request #11532 from Mic92/macos-test-fix
tests/functional/shell: fix test in macOS devshell
This commit is contained in:
commit
59acf3b75c
1 changed files with 2 additions and 0 deletions
|
@ -31,11 +31,13 @@ env > $TEST_ROOT/expected-env
|
||||||
nix shell -f shell-hello.nix hello -c env > $TEST_ROOT/actual-env
|
nix shell -f shell-hello.nix hello -c env > $TEST_ROOT/actual-env
|
||||||
# Remove/reset variables we expect to be different.
|
# Remove/reset variables we expect to be different.
|
||||||
# - PATH is modified by nix shell
|
# - PATH is modified by nix shell
|
||||||
|
# - we unset TMPDIR on macOS if it contains /var/folders
|
||||||
# - _ is set by bash and is expectedf to differ because it contains the original command
|
# - _ is set by bash and is expectedf to differ because it contains the original command
|
||||||
# - __CF_USER_TEXT_ENCODING is set by macOS and is beyond our control
|
# - __CF_USER_TEXT_ENCODING is set by macOS and is beyond our control
|
||||||
sed -i \
|
sed -i \
|
||||||
-e 's/PATH=.*/PATH=.../' \
|
-e 's/PATH=.*/PATH=.../' \
|
||||||
-e 's/_=.*/_=.../' \
|
-e 's/_=.*/_=.../' \
|
||||||
|
-e '/^TMPDIR=\/var\/folders\/.*/d' \
|
||||||
-e '/^__CF_USER_TEXT_ENCODING=.*$/d' \
|
-e '/^__CF_USER_TEXT_ENCODING=.*$/d' \
|
||||||
$TEST_ROOT/expected-env $TEST_ROOT/actual-env
|
$TEST_ROOT/expected-env $TEST_ROOT/actual-env
|
||||||
sort $TEST_ROOT/expected-env > $TEST_ROOT/expected-env.sorted
|
sort $TEST_ROOT/expected-env > $TEST_ROOT/expected-env.sorted
|
||||||
|
|
Loading…
Reference in a new issue