forked from lijiext/lammps
rename test programs to be consistent with the other programs in the unittest tree
This commit is contained in:
parent
9cbb2e9df5
commit
24b5cd7dec
|
@ -30,10 +30,10 @@ target_link_libraries(test_error_stats PRIVATE GTest::GTestMain GTest::GTest)
|
|||
add_test(NAME ErrorStats COMMAND test_error_stats)
|
||||
|
||||
# pair style tester
|
||||
add_executable(pair_style pair_style.cpp)
|
||||
target_link_libraries(pair_style PRIVATE lammps style_tests)
|
||||
add_executable(test_pair_style test_pair_style.cpp)
|
||||
target_link_libraries(test_pair_style PRIVATE lammps style_tests)
|
||||
if(FFT_SINGLE)
|
||||
target_compile_definitions(pair_style PRIVATE -DFFT_SINGLE)
|
||||
target_compile_definitions(test_pair_style PRIVATE -DFFT_SINGLE)
|
||||
endif()
|
||||
|
||||
# tests for a molecular systems and related pair styles
|
||||
|
@ -44,7 +44,7 @@ if (FFT_SINGLE)
|
|||
endif()
|
||||
foreach(TEST ${MOL_PAIR_TESTS})
|
||||
string(REGEX REPLACE "^.*mol-pair-(.*)\.yaml" "MolPairStyle:\\1" TNAME ${TEST})
|
||||
add_test(NAME ${TNAME} COMMAND pair_style ${TEST} WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR})
|
||||
add_test(NAME ${TNAME} COMMAND test_pair_style ${TEST} WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR})
|
||||
set_tests_properties(${TNAME} PROPERTIES ENVIRONMENT "LAMMPS_POTENTIALS=${LAMMPS_POTENTIALS_DIR}")
|
||||
endforeach()
|
||||
|
||||
|
@ -52,7 +52,7 @@ endforeach()
|
|||
file(GLOB ATOMIC_PAIR_TESTS LIST_DIRECTORIES false ${TEST_INPUT_FOLDER}/atomic-pair-*.yaml)
|
||||
foreach(TEST ${ATOMIC_PAIR_TESTS})
|
||||
string(REGEX REPLACE "^.*atomic-pair-(.*)\.yaml" "AtomicPairStyle:\\1" TNAME ${TEST})
|
||||
add_test(NAME ${TNAME} COMMAND pair_style ${TEST} WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR})
|
||||
add_test(NAME ${TNAME} COMMAND test_pair_style ${TEST} WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR})
|
||||
set_tests_properties(${TNAME} PROPERTIES ENVIRONMENT "LAMMPS_POTENTIALS=${LAMMPS_POTENTIALS_DIR}")
|
||||
endforeach()
|
||||
|
||||
|
@ -60,29 +60,29 @@ endforeach()
|
|||
file(GLOB MANYBODY_PAIR_TESTS LIST_DIRECTORIES false ${TEST_INPUT_FOLDER}/manybody-pair-*.yaml)
|
||||
foreach(TEST ${MANYBODY_PAIR_TESTS})
|
||||
string(REGEX REPLACE "^.*manybody-pair-(.*)\.yaml" "ManybodyPairStyle:\\1" TNAME ${TEST})
|
||||
add_test(NAME ${TNAME} COMMAND pair_style ${TEST} WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR})
|
||||
add_test(NAME ${TNAME} COMMAND test_pair_style ${TEST} WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR})
|
||||
set_tests_properties(${TNAME} PROPERTIES ENVIRONMENT "LAMMPS_POTENTIALS=${LAMMPS_POTENTIALS_DIR}")
|
||||
endforeach()
|
||||
|
||||
# bond style tester
|
||||
add_executable(bond_style bond_style.cpp)
|
||||
target_link_libraries(bond_style PRIVATE lammps style_tests)
|
||||
add_executable(test_bond_style test_bond_style.cpp)
|
||||
target_link_libraries(test_bond_style PRIVATE lammps style_tests)
|
||||
|
||||
file(GLOB BOND_TESTS LIST_DIRECTORIES false ${TEST_INPUT_FOLDER}/bond-*.yaml)
|
||||
foreach(TEST ${BOND_TESTS})
|
||||
string(REGEX REPLACE "^.*bond-(.*)\.yaml" "BondStyle:\\1" TNAME ${TEST})
|
||||
add_test(NAME ${TNAME} COMMAND bond_style ${TEST} WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR})
|
||||
add_test(NAME ${TNAME} COMMAND test_bond_style ${TEST} WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR})
|
||||
set_tests_properties(${TNAME} PROPERTIES ENVIRONMENT "LAMMPS_POTENTIALS=${LAMMPS_POTENTIALS_DIR}")
|
||||
endforeach()
|
||||
|
||||
# angle style tester
|
||||
add_executable(angle_style angle_style.cpp)
|
||||
target_link_libraries(angle_style PRIVATE lammps style_tests)
|
||||
add_executable(test_angle_style test_angle_style.cpp)
|
||||
target_link_libraries(test_angle_style PRIVATE lammps style_tests)
|
||||
|
||||
file(GLOB ANGLE_TESTS LIST_DIRECTORIES false ${TEST_INPUT_FOLDER}/angle-*.yaml)
|
||||
foreach(TEST ${ANGLE_TESTS})
|
||||
string(REGEX REPLACE "^.*angle-(.*)\.yaml" "AngleStyle:\\1" TNAME ${TEST})
|
||||
add_test(NAME ${TNAME} COMMAND angle_style ${TEST} WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR})
|
||||
add_test(NAME ${TNAME} COMMAND test_angle_style ${TEST} WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR})
|
||||
set_tests_properties(${TNAME} PROPERTIES ENVIRONMENT "LAMMPS_POTENTIALS=${LAMMPS_POTENTIALS_DIR}")
|
||||
endforeach()
|
||||
|
||||
|
@ -94,6 +94,6 @@ if (FFT_SINGLE)
|
|||
endif()
|
||||
foreach(TEST ${KSPACE_TESTS})
|
||||
string(REGEX REPLACE "^.*kspace-(.*)\.yaml" "KSpaceStyle:\\1" TNAME ${TEST})
|
||||
add_test(NAME ${TNAME} COMMAND pair_style ${TEST} WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR})
|
||||
add_test(NAME ${TNAME} COMMAND test_pair_style ${TEST} WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR})
|
||||
set_tests_properties(${TNAME} PROPERTIES ENVIRONMENT "LAMMPS_POTENTIALS=${LAMMPS_POTENTIALS_DIR}")
|
||||
endforeach()
|
||||
|
|
Loading…
Reference in New Issue