Skip to content

Commit

Permalink
add label for slow-running (rotatedB) code tests (#271)
Browse files Browse the repository at this point in the history
* add label for slow-running (rotatedB) code tests

* test SLOW_TEST ctest label in MacOS.yml
  • Loading branch information
AlexanderRichert-NOAA authored Jan 4, 2025
1 parent fca5cc0 commit 6b9a944
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 2 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/MacOS.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
```

Expand Down
13 changes: 13 additions & 0 deletions tests/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 6b9a944

Please sign in to comment.