mirror of
https://github.com/SerenityOS/serenity
synced 2024-07-23 11:04:40 +00:00
Base/CI: Create and check test-results.log file for on-target tests
Change run-tests-and-shutdown.sh to output a dead simple results file that just records how many tests failed. In the CI script, mount the _disk_image after running tests and verify that the number of failed tests is 0. Otherwise, fail the build :^) While we're here, bump the timeout for the tests up to 30 minutes, to make sure that less powerful runners don't fail the job unecessarily.
This commit is contained in:
parent
b86d597938
commit
467ceb15aa
13
.github/workflows/cmake.yml
vendored
13
.github/workflows/cmake.yml
vendored
|
@ -152,7 +152,18 @@ jobs:
|
|||
echo "::group::ninja run # Qemu output"
|
||||
ninja run
|
||||
echo "::endgroup::"
|
||||
timeout-minutes: 20
|
||||
echo "::group::Verify Output File"
|
||||
mkdir fsmount
|
||||
sudo mount -t ext2 -o loop,rw _disk_image fsmount
|
||||
echo "Results: "
|
||||
sudo cat fsmount/home/anon/test-results.log
|
||||
if ! sudo grep -q "Failed: 0" fsmount/home/anon/test-results.log
|
||||
then
|
||||
echo "::error :^( Tests failed, failing job"
|
||||
exit 1
|
||||
fi
|
||||
echo "::endgroup::"
|
||||
timeout-minutes: 30
|
||||
|
||||
- name: Print Target Logs
|
||||
# Extremely useful if Serenity hangs trying to run one of the tests
|
||||
|
|
|
@ -47,6 +47,8 @@ if test $fail_count -gt 0 {
|
|||
echo "==== Failing tests: $failed_tests ===="
|
||||
}
|
||||
|
||||
echo "Failed: $fail_count" > ./test-results.log
|
||||
|
||||
if test $DO_SHUTDOWN_AFTER_TESTS {
|
||||
shutdown -n
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue