diff --git a/test-suite/CMakeLists.txt b/test-suite/CMakeLists.txt index b0cbe82aa..0a9daf1bf 100644 --- a/test-suite/CMakeLists.txt +++ b/test-suite/CMakeLists.txt @@ -99,6 +99,11 @@ foreach(test_category IN LISTS qe_test_categories) ${CMAKE_CURRENT_BINARY_DIR}/${subfolder_name}/${matdyn_input} SYMBOLIC) endforeach() + # handle additional test customization + if(EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/${subfolder_name}/CMakeLists.txt) + add_subdirectory(${subfolder_name}) + endif() + foreach(test_input_file IN LISTS test_input_file_names) # skip reference and test run output files which also has filename extension .in if (NOT test_input_file MATCHES "^benchmark" AND NOT test_input_file MATCHES "^test") @@ -191,6 +196,11 @@ foreach(test_category IN LISTS qe_test_categories) set_property(TEST ${test_name} APPEND PROPERTY DEPENDS "${base_test_name};${last_test_name}") endif() + # add dependency on test preparation + if(${test_name_prefix}--preparation-CREATED) + set_property(TEST ${test_name} APPEND PROPERTY DEPENDS ${test_name_prefix}--preparation) + endif() + # make correctness check depend on the test run set_property(TEST ${test_name_prefix}-correctness APPEND PROPERTY DEPENDS "${test_name}") endif() diff --git a/test-suite/pw_md/CMakeLists.txt b/test-suite/pw_md/CMakeLists.txt new file mode 100644 index 000000000..8c54b8d06 --- /dev/null +++ b/test-suite/pw_md/CMakeLists.txt @@ -0,0 +1,4 @@ +# prepare files before testing. +set(${test_name_prefix}--preparation-CREATED TRUE PARENT_SCOPE) +add_test(NAME ${test_name_prefix}--preparation +COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_CURRENT_SOURCE_DIR}/md_restart_verlet_original.md ${CMAKE_CURRENT_BINARY_DIR}/md_restart_verlet/md_restart_verlet.md)