Skip to content

Commit 20c7c55

Browse files
committed
fix(tests/functional/repl): skip test if stack size limit is insufficient
Nix attempts to set the stack size to 64 MB during initialization, which is required for the repl tests to run successfully. Skip the tests on systems where the hard stack limit is less than this value rather than failing.
1 parent e78e6ca commit 20c7c55

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

tests/functional/repl.sh

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,13 @@ import $testDir/undefined-variable.nix
2525

2626
TODO_NixOS
2727

28+
# FIXME: repl tests fail on systems with stack limits
29+
stack_ulimit="$(ulimit -Hs)"
30+
stack_required="$((64 * 1024 * 1024))"
31+
if [[ "$stack_ulimit" != "unlimited" ]]; then
32+
((stack_ulimit < stack_required)) && skipTest "repl tests cannot run on systems with stack size <$stack_required ($stack_ulimit)"
33+
fi
34+
2835
testRepl () {
2936
local nixArgs
3037
nixArgs=("$@")

0 commit comments

Comments
 (0)