mirror of
https://github.com/boykopovar/AnyPS5.git
synced 2026-10-10 01:28:44 +02:00
ci: fail when a test executable is built that no test runs
A test executable can be declared with add_test_executable and never registered with add_test. It is then built and never run, and ctest reports a full pass over what it knows, so nothing in CI says so. Measured on main, five test executables are in this state: the driver's mesh and recorder tests, the guest formatting tests, the video out flip tests and the BDA device tests. tools/check_test_registration.py compares the test executables CMake builds, read from the build graph, against the add_test calls in the generated CTestTestfile.cmake files, which are written at configure time and so do not depend on the build having finished. It fails on a test executable that nothing runs, and records those five by name so the job stays green until they are dealt with. Both jobs run it right after configure, before anything is built.
This commit is contained in:
@@ -35,6 +35,8 @@ jobs:
|
||||
- name: Install lavapipe for the GPU execution tests
|
||||
run: sudo apt-get update && sudo apt-get install -y --no-install-recommends libvulkan1 mesa-vulkan-drivers
|
||||
- run: cmake -S . -B build $CONFIGURE -DANYPS5_ENABLE_SPIRV_TOOLS=ON
|
||||
- name: Check that every test executable is registered with ctest
|
||||
run: python3 tools/check_test_registration.py build
|
||||
- run: cmake --build build
|
||||
- run: cmake --build build --target libs
|
||||
- run: ctest --test-dir build --output-on-failure --timeout 120 --repeat until-fail:3
|
||||
@@ -73,6 +75,9 @@ jobs:
|
||||
evict-old-files: job
|
||||
- shell: cmd
|
||||
run: cmake -S . -B build %CONFIGURE%
|
||||
- name: Check that every test executable is registered with ctest
|
||||
shell: cmd
|
||||
run: python tools/check_test_registration.py build
|
||||
- shell: cmd
|
||||
run: cmake --build build
|
||||
- shell: cmd
|
||||
|
||||
Reference in New Issue
Block a user