Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,22 @@ function test_script() {
if [[ "$run_output" != *"ALL DONE"* ]]; then
echo -e "\e[31mRun Error (no 'ALL DONE' marker)\e[0m"
echo "Output: $run_output"
# The exit code tells a crash (128 + the signal: 139 a segfault, 134 an abort) from a run that ended on its
# own. A crash as the process exits leaves no output at all: stdout to a pipe is flushed only at exit.
# (array_class_splice.ts -mm=rc debug/jit, release run of 2026-11-26: twice on ubuntu-22.04/24.04, never
# reproduced in ~700 runs of the same package.) Run it once more under gdb for a backtrace; the test
# stays failed either way.
echo "Exit code: $run_code"
if [ $run_code -gt 128 ] && command -v gdb > /dev/null; then
if [ "$mode" == "jit" ]; then
rerun=( "$TOOL_PATH/$TOOL" $DBG $OPTIONS --shared-libs="$RUNTIME" --emit=jit "$SRC/tests/$test.ts" )
else
rerun=( "$SRC/tests/$test" )
fi
echo "Again under gdb:"
timeout 300 gdb -q -batch -ex "set pagination off" -ex run -ex "thread apply all bt 30" \
--args "${rerun[@]}" < "$stdin_file" 2>&1 | tail -n 120
fi
return 1
fi

Expand Down
Loading