| 1 |
|
| 2 |
ADD_DEFINITIONS(-DUSING_CMAKE) |
| 3 |
|
| 4 |
SET( cbind_TEST_SRCS |
| 5 |
CreateEdgeFace.c |
| 6 |
ReadEdgeFace.c |
| 7 |
) |
| 8 |
|
| 9 |
# Always report error/warning messages during testing: |
| 10 |
# The ex_opts call precipitates the EXTRA_INCLUDE below. |
| 11 |
SET( CMAKE_TESTDRIVER_BEFORE_TESTMAIN |
| 12 |
" ex_opts( EX_VERBOSE );\n" |
| 13 |
) |
| 14 |
CREATE_TEST_SOURCELIST( ExoIICTests |
| 15 |
ExoIICTests.cxx |
| 16 |
${cbind_TEST_SRCS} |
| 17 |
EXTRA_INCLUDE exodusII_test.h |
| 18 |
) |
| 19 |
|
| 20 |
TRIBITS_ADD_EXECUTABLE( |
| 21 |
ExoIICTests |
| 22 |
SOURCES ${ExoIICTests} |
| 23 |
) |
| 24 |
|
| 25 |
if ( NETCDF_NCDUMP_BINARY ) |
| 26 |
# Do nothing. Set earlier in config process... |
| 27 |
else() |
| 28 |
find_program (NETCDF_NCDUMP_BINARY |
| 29 |
NAME ncdump |
| 30 |
PATHS |
| 31 |
${NetCDF_BINARY_DIR} |
| 32 |
${Netcdf_LIBRARY_DIRS}/../bin |
| 33 |
$ENV{ACCESS}/bin |
| 34 |
$ENV{NETCDF_DIR}/bin |
| 35 |
$ENV{NETCDF_DIR}/ncdump |
| 36 |
ENV PATH |
| 37 |
${NetCDF_DIR}/bin |
| 38 |
) |
| 39 |
endif() |
| 40 |
|
| 41 |
TRIBITS_ADD_TEST( |
| 42 |
ExoIICTests |
| 43 |
NAME CreateEdgeFaceWithConcats |
| 44 |
COMM mpi serial |
| 45 |
NUM_MPI_PROCS 1 |
| 46 |
ARGS "CreateEdgeFace -pcab -pcset -pvpax" |
| 47 |
ADDED_TESTS_NAMES_OUT CreateEdgeFaceWithConcatsAddedName |
| 48 |
) |
| 49 |
|
| 50 |
TRIBITS_ADD_TEST( |
| 51 |
ExoIICTests |
| 52 |
NAME ReadEdgeFaceWithConcats |
| 53 |
COMM mpi serial |
| 54 |
NUM_MPI_PROCS 1 |
| 55 |
ARGS ReadEdgeFace |
| 56 |
ADDED_TESTS_NAMES_OUT ReadEdgeFaceWithConcatsAddedName |
| 57 |
) |
| 58 |
|
| 59 |
if (CreateEdgeFaceWithConcatsAddedName AND ReadEdgeFaceWithConcatsAddedName) |
| 60 |
set_property(TEST ${ReadEdgeFaceWithConcatsAddedName} |
| 61 |
APPEND PROPERTY DEPENDS ${CreateEdgeFaceWithConcatsAddedName}) |
| 62 |
endif() |
| 63 |
|
| 64 |
# =============================================== |
| 65 |
|
| 66 |
IF ( NETCDF_NCDUMP_BINARY ) |
| 67 |
SET(NETCDF_NCDUMP ${NETCDF_NCDUMP_BINARY}) |
| 68 |
SET( cbind_OLDTESTS |
| 69 |
test-field-utils |
| 70 |
testwt |
| 71 |
testwtd |
| 72 |
testwtd-to-f |
| 73 |
testrd |
| 74 |
testrd1 |
| 75 |
testrdd |
| 76 |
testwt1 |
| 77 |
testwt2 |
| 78 |
testwtm |
| 79 |
testwt_ss |
| 80 |
testwt_nossnsdf |
| 81 |
testrd_ss |
| 82 |
testrdwt |
| 83 |
testcp |
| 84 |
testcp_tran |
| 85 |
testcp_nl |
| 86 |
testcpd |
| 87 |
testwt_clb |
| 88 |
testwt_nc |
| 89 |
testrd_nc |
| 90 |
testwt-zeroe |
| 91 |
testwt-zeron |
| 92 |
testwt-long-name |
| 93 |
testrd-long-name |
| 94 |
testwt-one-attrib |
| 95 |
testwt-partial |
| 96 |
testrd-nsided |
| 97 |
testwt-nsided |
| 98 |
testrd-nfaced |
| 99 |
testwt-nfaced |
| 100 |
test_nemesis |
| 101 |
create_mesh |
| 102 |
rd_wt_mesh |
| 103 |
test-empty |
| 104 |
testwt-compress |
| 105 |
testwt-results |
| 106 |
testwt-oned |
| 107 |
testwt-assembly |
| 108 |
testrd-assembly |
| 109 |
test-add-assembly |
| 110 |
testwt-blob |
| 111 |
testrd-blob |
| 112 |
testwt-field-metadata |
| 113 |
testrd-field-metadata |
| 114 |
) |
| 115 |
|
| 116 |
IF (SEACASExodus_ENABLE_THREADSAFE) |
| 117 |
SET(TS "_ts") |
| 118 |
SET(cbind_OLDTESTS |
| 119 |
${cbind_OLDTESTS} |
| 120 |
test_ts_nvar |
| 121 |
test_ts_nvar_rd |
| 122 |
test_ts_partial_nvar |
| 123 |
test_ts_partial_nvar_rd |
| 124 |
test_ts_files |
| 125 |
test_ts_errval |
| 126 |
) |
| 127 |
ENDIF() |
| 128 |
|
| 129 |
CONFIGURE_FILE( |
| 130 |
${CMAKE_CURRENT_SOURCE_DIR}/testall.in |
| 131 |
${CMAKE_CURRENT_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/testall |
| 132 |
@ONLY |
| 133 |
) |
| 134 |
# now copy the temporary into the final destination, setting the permissions |
| 135 |
file(COPY ${CMAKE_CURRENT_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/testall |
| 136 |
DESTINATION ${CMAKE_CURRENT_BINARY_DIR} |
| 137 |
FILE_PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE) |
| 138 |
|
| 139 |
if ( TPL_Netcdf_Enables_Netcdf4 ) |
| 140 |
CONFIGURE_FILE( |
| 141 |
${CMAKE_CURRENT_SOURCE_DIR}/testnc4.in |
| 142 |
${CMAKE_CURRENT_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/testnc4 |
| 143 |
@ONLY |
| 144 |
) |
| 145 |
# now copy the temporary into the final destination, setting the permissions |
| 146 |
file(COPY ${CMAKE_CURRENT_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/testnc4 |
| 147 |
DESTINATION ${CMAKE_CURRENT_BINARY_DIR} |
| 148 |
FILE_PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE) |
| 149 |
endif() |
| 150 |
|
| 151 |
# NOTE: The "LINKER_LANGUAGE CXX" is used to workaround an issue with |
| 152 |
# the trilinos cmake adding the pamgen and pamgen_extras libraries as |
| 153 |
# a dependency. These are C++ libraries and result in unresolved dependencies |
| 154 |
# when built with shareable libraries on some platforms.... |
| 155 |
|
| 156 |
FOREACH ( testName ${cbind_OLDTESTS} ) |
| 157 |
TRIBITS_ADD_EXECUTABLE( ${testName} NOEXEPREFIX NOEXESUFFIX SOURCES ${testName}.c LINKER_LANGUAGE CXX) |
| 158 |
set_property(TARGET ${testName} PROPERTY C_STANDARD 99) |
| 159 |
ENDFOREACH ( testName ) |
| 160 |
|
| 161 |
TRIBITS_ADD_TEST( |
| 162 |
test-field-utils |
| 163 |
NOEXEPREFIX |
| 164 |
NOEXESUFFIX |
| 165 |
NAME exodus-test-field-utils |
| 166 |
COMM mpi serial |
| 167 |
NUM_MPI_PROCS 1 |
| 168 |
) |
| 169 |
|
| 170 |
IF (NOT CMAKE_HOST_SYSTEM_NAME STREQUAL "Windows") |
| 171 |
TRIBITS_ADD_TEST( |
| 172 |
testall |
| 173 |
NOEXEPREFIX |
| 174 |
NOEXESUFFIX |
| 175 |
NAME exodus_unit_tests |
| 176 |
COMM mpi serial |
| 177 |
NUM_MPI_PROCS 1 |
| 178 |
) |
| 179 |
|
| 180 |
if ( TPL_Netcdf_Enables_Netcdf4 ) |
| 181 |
TRIBITS_ADD_TEST( |
| 182 |
testall |
| 183 |
NOEXEPREFIX |
| 184 |
NOEXESUFFIX |
| 185 |
NAME exodus_unit_tests_nc4_env |
| 186 |
ARGS netcdf4 |
| 187 |
COMM mpi serial |
| 188 |
NUM_MPI_PROCS 1 |
| 189 |
) |
| 190 |
|
| 191 |
TRIBITS_ADD_TEST( |
| 192 |
testnc4 |
| 193 |
NOEXEPREFIX |
| 194 |
NOEXESUFFIX |
| 195 |
NAME exodus_nc4_unit_tests |
| 196 |
COMM mpi serial |
| 197 |
NUM_MPI_PROCS 1 |
| 198 |
) |
| 199 |
endif() |
| 200 |
|
| 201 |
# if ( TPL_Netcdf_Enables_Netcdf5 ) |
| 202 |
TRIBITS_ADD_TEST( |
| 203 |
testall |
| 204 |
NOEXEPREFIX |
| 205 |
NOEXESUFFIX |
| 206 |
NAME exodus_unit_tests_nc5_env |
| 207 |
ARGS netcdf5 |
| 208 |
COMM mpi serial |
| 209 |
NUM_MPI_PROCS 1 |
| 210 |
) |
| 211 |
# endif() |
| 212 |
endif() |
| 213 |
ELSE() |
| 214 |
MESSAGE(STATUS |
| 215 |
"WARNING: ${PACKAGE_NAME}: Exodus unit tests will not be run due to failure finding ncdump executable.") |
| 216 |
ENDIF() |