Skip to content

Commit

Permalink
tests/functional/repl.sh: Work around GHA failure
Browse files Browse the repository at this point in the history
  • Loading branch information
roberth committed Jul 10, 2024
1 parent ace0aae commit 6f00c43
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions tests/functional/repl.sh
Original file line number Diff line number Diff line change
Expand Up @@ -253,11 +253,21 @@ badExitCode=0
nixVersion="$(nix eval --impure --raw --expr 'builtins.nixVersion' --extra-experimental-features nix-command)"

runRepl () {

# That is right, we are also filtering out the testdir _without underscores_.
# This is crazy, but without it, GHA will fail to run the tests, showing paths
# _with_ underscores in the set -x log, but _without_ underscores in the
# supposed nix repl output. I have looked in a number of places, but I cannot
# find a mechanism that could cause this to happen.
local testDirNoUnderscores
testDirNoUnderscores="${testDir//_/}"

# TODO: pass arguments to nix repl; see lang.sh
nix repl 2>&1 \
| stripColors \
| sed \
-e "s@$testDir@/path/to/tests/functional@g" \
-e "s@$testDirNoUnderscores@/path/to/tests/functional@g" \
-e "s@$nixVersion@<nix version>@g" \
-e "s@Added [0-9]* variables@Added <number omitted> variables@g" \
| grep -vF $'warning: you don\'t have Internet access; disabling some network-dependent features' \
Expand Down

0 comments on commit 6f00c43

Please sign in to comment.