From 6b9a944058ef447b224a8273e138d5f04f2aa5a1 Mon Sep 17 00:00:00 2001 From: Alex Richert Date: Fri, 3 Jan 2025 19:06:43 -0500 Subject: [PATCH] add label for slow-running (rotatedB) code tests (#271) * add label for slow-running (rotatedB) code tests * test SLOW_TEST ctest label in MacOS.yml --- .github/workflows/MacOS.yml | 2 +- README.md | 2 +- tests/CMakeLists.txt | 13 +++++++++++++ 3 files changed, 15 insertions(+), 2 deletions(-) diff --git a/.github/workflows/MacOS.yml b/.github/workflows/MacOS.yml index 314da261..8524f327 100644 --- a/.github/workflows/MacOS.yml +++ b/.github/workflows/MacOS.yml @@ -46,4 +46,4 @@ jobs: ls -l ~/install/lib - name: test - run: ctest --test-dir ip/build --parallel 2 --verbose --output-on-failure --rerun-failed + run: ctest --test-dir ip/build -LE SLOW_TEST --parallel 2 --verbose --output-on-failure --rerun-failed diff --git a/README.md b/README.md index 3ac8f3a5..a35206db 100644 --- a/README.md +++ b/README.md @@ -42,7 +42,7 @@ mkdir build cd build cmake -DCMAKE_INSTALL_PREFIX=/path/to/install /path/to/NCEPLIBS-ip make -j2 -make test # (or ctest --verbose) +make test # or 'ctest --verbose'; use 'ctest -LE SLOW_TEST' to skip long-running tests make install ``` diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index cc921172..1da7cae6 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -182,6 +182,19 @@ foreach(kind ${kinds}) add_test(test_rotatedB_spectral_vector_grib1_${kind} test_vector_grib1_${kind} 205 4) add_test(test_rotatedE_budget_vector_grib1_${kind} test_vector_grib1_${kind} 203 3) + set(slowtests + "test_rotatedB_spectral_vector_grib1" + "test_rotatedB_spectral_scalar_grib1" + "test_rotatedB_spectral_vector_grib2" + "test_rotatedB_direct_spectral_vector_grib2" + "test_rotatedB_direct_ncep_post_spectral_vector_grib2" + "test_rotatedB_spectral_scalar_grib2" + ) + + foreach(slowtest IN LISTS slowtests) + set_tests_properties("${slowtest}_${kind}" PROPERTIES LABELS "SLOW_TEST") + endforeach() + # sp tests create_sp_test(test_ncpus ${kind} 0.3) create_sp_test(test_splaplac ${kind} 0.3)