set_property(GLOBAL PROPERTY TMP_TESTS_LIST "")
+macro(CONFIGURE_TEST_FILE dir_name file_name)
+ configure_file("${dir_name}/${file_name}.sh.template" "${dir_name}/${file_name}.sh" @ONLY)
+ INSTALL(DIRECTORY ${dir_name}/ DESTINATION ${CRASH_SYSTEM_TESTS_PATH}/${dir_name} FILES_MATCHING PATTERN "*sh")
+endmacro()
+
macro(CONFIGURE_TEST test_name)
set_property(GLOBAL APPEND_STRING PROPERTY TMP_TESTS_LIST "\"${test_name}\" ")
- set(file_name ${test_name})
- set(extra_args ${ARGN})
-
- list(LENGTH extra_args extra_args_count)
- if (${extra_args_count} GREATER 0)
- list(GET extra_args 0 optional_arg)
- set(file_name ${optional_arg})
- endif()
+ set(FILES_LIST ${test_name})
+ list(APPEND FILES_LIST ${ARGN})
- configure_file("${test_name}/${file_name}.sh.template" "${test_name}/${file_name}.sh" @ONLY)
- INSTALL(DIRECTORY ${test_name}/ DESTINATION ${CRASH_SYSTEM_TESTS_PATH}/${test_name} FILES_MATCHING PATTERN "*sh")
+ foreach(test ${FILES_LIST})
+ configure_test_file(${test_name} ${test})
+ endforeach()
endmacro()
configure_test("check_minicore_mem")
configure_test("time_test")
-configure_test("cmp_backtraces")
configure_test("cmp_backtraces" "cp")
configure_test("critical_process")
configure_test("wait_for_opt_usr")