diff --git a/.github/workflows/testing.yml b/.github/workflows/testing.yml index adfb1829..bdb16545 100644 --- a/.github/workflows/testing.yml +++ b/.github/workflows/testing.yml @@ -383,7 +383,7 @@ jobs: git \ png run: | # FreeBSD `c++` compiler does not support `make develop` sanitizers ASan or UBSan - cmake -S . -B build -DCMAKE_BUILD_TYPE=Debug -DCMAKE_CXX_COMPILER=c++ -DUSE_EXTERNAL_TESTS=OFF -DOS=bsd + cmake -S . -B build -DCMAKE_BUILD_TYPE=Debug -DCMAKE_CXX_COMPILER=c++ -DUSE_EXTERNAL_TESTS=OFF -DTESTS_OS_NAME=bsd cmake --build build -j4 --verbose cmake --install build --verbose cmake --build build --target test diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt index b054f586..6cebac57 100644 --- a/test/CMakeLists.txt +++ b/test/CMakeLists.txt @@ -2,15 +2,21 @@ option(USE_NONFREE_TESTS "run tests that build nonfree codebases" ON) option(USE_EXTERNAL_TESTS "run tests that build external codebases" ON) +set(TESTS_OS_NAME "" CACHE STRING "skip running tests known to fail on this OS") +set(ONLY_FREE) if(NOT USE_NONFREE_TESTS) set(ONLY_FREE "--only-free") endif() + +set(ONLY_INTERNAL) if(NOT USE_EXTERNAL_TESTS) set(ONLY_INTERNAL "--only-internal") endif() -if(DEFINED OS) - set(OS_NAME "--os" "${OS}") + +set(OS_NAME) +if(NOT TESTS_OS_NAME STREQUAL "") + set(OS_NAME "--os" "${TESTS_OS_NAME}") endif() add_executable(randtilegen gfx/randtilegen.cpp) diff --git a/test/run-tests.sh b/test/run-tests.sh index 495956e0..f49e7436 100755 --- a/test/run-tests.sh +++ b/test/run-tests.sh @@ -134,6 +134,7 @@ test_downstream pinobatch libbet all libbet.gb f117089aa056600e2d404bbcbac test_downstream LIJI32 SameBoy bootroms build/bin/BootROMs/cgb_boot.bin 113903775a9d34b798c2f8076672da6626815a91 # gb-starter kit fails with any `make` on Windows: https://codeberg.org/ISSOtm/gb-starter-kit/issues/1 # gb-starter-kit fails with macOS/BSD `make`: https://codeberg.org/ISSOtm/gb-starter-kit/issues/29 -if [[ "${osname%-*}" != "windows" && "${osname%-*}" != "macos" && "${osname%-*}" != "bsd" ]]; then - test_downstream ISSOtm gb-starter-kit all bin/boilerplate.gb b4f130169ba73284e0d0e71b53e7baa4eca2f7fe -fi +case "${osname%%-*}" in + windows | macos | bsd) ;; + *) test_downstream ISSOtm gb-starter-kit all bin/boilerplate.gb b4f130169ba73284e0d0e71b53e7baa4eca2f7fe;; +esac