Skip to content

Commit bee75ee

Browse files
committed
EAMxx: move remaining tests in tests/generic to share/core
1 parent a601e32 commit bee75ee

File tree

8 files changed

+31
-38
lines changed

8 files changed

+31
-38
lines changed

components/eamxx/src/share/core/tests/CMakeLists.txt

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,4 +7,35 @@ if (NOT SCREAM_ONLY_GENERATE_BASELINES)
77
${CMAKE_CURRENT_BINARY_DIR}/my_module.py)
88
CreateUnitTest(pysession "pysession.cpp")
99
endif()
10+
11+
# Tests to ensure that fails/errors are indeed caught
12+
# NOTE: we don't need any libs for this test, but scream's CreateUnitTest
13+
# has libs as a required arg. So use the raw EkatCreateUnitTest
14+
15+
# This serves as a base case for the following fail checks, since it verifies that
16+
# - a REQUIRE clause that fails makes the test fail
17+
# - Our Create unit test logic does work for catching failures
18+
CreateUnitTest (fail "fail.cpp"
19+
WILL_FAIL LABELS "fail")
20+
21+
if (Kokkos_ENABLE_DEBUG_BOUNDS_CHECK)
22+
# Ensure that Kokkos OOB are caught
23+
CreateUnitTest (kokkos_fail "kokkos_fail.cpp"
24+
WILL_FAIL LABELS "fail")
25+
endif()
26+
27+
if (EKAT_ENABLE_VALGRIND)
28+
# Ensure that valgrind errors are caught
29+
EkatCreateUnitTest (valg_fail "valg_fail.cpp"
30+
WILL_FAIL LABELS "fail")
31+
endif()
32+
33+
# Ensure that FPE *do* throw when we expect them to
34+
if (SCREAM_FPE)
35+
CreateUnitTestExec (fpe_check "fpe_check.cpp"
36+
WILL_FAIL LABELS "check")
37+
else()
38+
CreateUnitTestExec (fpe_check "fpe_check.cpp"
39+
LABELS "check")
40+
endif()
1041
endif()

components/eamxx/tests/CMakeLists.txt

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -67,9 +67,6 @@ function (CreateBaselineTest TEST_BASE_NAME GEN_TEST_NRANKS OUT_FILE FIXTURES_BA
6767

6868
endfunction()
6969

70-
# Some tests for checking that certain testing infrastructures work
71-
add_subdirectory(generic)
72-
7370
if (NOT DEFINED ENV{SCREAM_FAKE_ONLY})
7471
# memcheck builds (and also coverage ones) can just run the max ranks, since they
7572
# do only need to perform checks on the code itself, rather than the model it represents

components/eamxx/tests/generic/CMakeLists.txt

Lines changed: 0 additions & 2 deletions
This file was deleted.

components/eamxx/tests/generic/fail_check/CMakeLists.txt

Lines changed: 0 additions & 33 deletions
This file was deleted.

0 commit comments

Comments
 (0)