Skip to content

Commit 655a130

Browse files
Show how far cppia module free got when it crashes
The step sent the test's output to a file and showed nothing of it when the test crashed, so the Windows 32 segfaults with the Haxe nightly gave no hint of where. It now prints the exit code and the output, a line per check passed, and says whether the build, the run or the output failed.
1 parent b20f2f8 commit 655a130

1 file changed

Lines changed: 16 additions & 2 deletions

File tree

‎.github/workflows/test.yml‎

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -424,9 +424,23 @@ jobs:
424424
*) echo "::error::unknown gc stress mode $mode"; exit 1 ;;
425425
esac
426426
echo "::group::cppia module free: $mode"
427-
if ! { haxe build.hxml $flags -D $HXCPP_ARCH_FLAG && bin/$bin > out.txt && diff <(tr -d '\r' < stdout.txt) <(tr -d '\r' < out.txt); }; then
427+
code=0
428+
if ! haxe build.hxml $flags -D $HXCPP_ARCH_FLAG; then
428429
failed="$failed $mode"
429-
echo "::error::cppia module free failed: $mode"
430+
echo "::error::cppia module free failed to build: $mode"
431+
else
432+
bin/$bin > out.txt || code=$?
433+
if [ $code != 0 ]; then
434+
failed="$failed $mode"
435+
echo "::error::cppia module free exited with $code: $mode"
436+
# It prints a line as each check passes, flushed, so the last
437+
# line shows how far it got before a crash
438+
echo "Its output:"
439+
cat out.txt
440+
elif ! diff <(tr -d '\r' < stdout.txt) <(tr -d '\r' < out.txt); then
441+
failed="$failed $mode"
442+
echo "::error::cppia module free printed the wrong output: $mode"
443+
fi
430444
fi
431445
echo "::endgroup::"
432446
done

0 commit comments

Comments
 (0)