diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 8e7875d..2e1d39d 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -478,6 +478,7 @@ jobs: defaults: run: shell: powershell + timeout-minutes: 30 name: vcpkg - windows steps: - name: git clone @@ -507,10 +508,16 @@ jobs: cd build/vcpkg/test cmake . cmake --build . --parallel + + # the tests complete in well under a second; the 2-minute timeout is a + # safety net so that a hung test process fails the job quickly instead of + # freezing the runner for an hour (see the 2026-11-03 freeze, caused by + # undefined behaviour in the tree_reading test under MSVC debug CRT) - name: test vcpkg port - test + timeout-minutes: 2 run: | cd build/vcpkg/test - cmake --build . --config Debug --target run-library-tests + cmake --build . --target run-library-tests - name: upload vcpkg logs to artifacts if: always() # even if previous steps fail, this one needs to be run uses: actions/upload-artifact@v4 diff --git a/tests/unit/src/tree_reading.cpp b/tests/unit/src/tree_reading.cpp index 9cc3ac2..fb84a86 100644 --- a/tests/unit/src/tree_reading.cpp +++ b/tests/unit/src/tree_reading.cpp @@ -1,6 +1,7 @@ #include #include #include +#include #include "../../../src/tml/tree.hpp" @@ -70,7 +71,15 @@ const tst::set set("tree_reading", [](tst::suite& suite) { tst::check(i != roots.end(), SL); tst::check(i->value == "", SL); tst::check(i->value.length() == 0, SL); - tst::check(i->children.size() == 0, SL) << i->children.front().value.string; + tst::check( + i->children.size() == 0, + [&i](auto& o) { + // if the check has failed, then the children list is not empty + utki::assert(!i->children.empty(), SL); + o << i->children.front().value.string; + }, + SL + ); ++i; tst::check(i != roots.end(), SL);