Changeset View
Changeset View
Standalone View
Standalone View
autotests/CMakeLists.txt
Show First 20 Lines • Show All 83 Lines • ▼ Show 20 Line(s) | |||||
84 | macro(kcalcore_run_single_test _prefix _f _test _testarg) | 84 | macro(kcalcore_run_single_test _prefix _f _test _testarg) | ||
85 | get_filename_component(_fn ${_f} NAME) | 85 | get_filename_component(_fn ${_f} NAME) | ||
86 | 86 | | |||
87 | # Write the output file in the build directory. | 87 | # Write the output file in the build directory. | ||
88 | string(REGEX REPLACE "${CMAKE_CURRENT_SOURCE_DIR}" "${CMAKE_CURRENT_BINARY_DIR}" _outFile ${_f}) | 88 | string(REGEX REPLACE "${CMAKE_CURRENT_SOURCE_DIR}" "${CMAKE_CURRENT_BINARY_DIR}" _outFile ${_f}) | ||
89 | get_filename_component(_outputPath ${_outFile} PATH) | 89 | get_filename_component(_outputPath ${_outFile} PATH) | ||
90 | file(MAKE_DIRECTORY ${_outputPath}) | 90 | file(MAKE_DIRECTORY ${_outputPath}) | ||
91 | 91 | | |||
92 | set(_runner ${CMAKE_CURRENT_SOURCE_DIR}/runsingletestcase.pl) | 92 | set(_runner ${PERL_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/runsingletestcase.pl) | ||
93 | if(WIN32) | | |||
94 | set(_runner ${PERL_EXECUTABLE} ${_runner}) | | |||
95 | endif() | | |||
96 | add_test(NAME ${_prefix}-${_fn} COMMAND ${_runner} $<TARGET_FILE:${_test}> ${_testarg} ${_f} ${_outFile}) | 93 | add_test(NAME ${_prefix}-${_fn} COMMAND ${_runner} $<TARGET_FILE:${_test}> ${_testarg} ${_f} ${_outFile}) | ||
97 | endmacro() | 94 | endmacro() | ||
98 | 95 | | |||
99 | file(REMOVE ${CMAKE_CURRENT_BINARY_DIR}/FAILED.log) | 96 | file(REMOVE ${CMAKE_CURRENT_BINARY_DIR}/FAILED.log) | ||
100 | 97 | | |||
101 | foreach(file ${testFiles}) | 98 | foreach(file ${testFiles}) | ||
102 | kcalcore_run_single_test(RecurNext ${file} testrecurrence "next") | 99 | kcalcore_run_single_test(RecurNext ${file} testrecurrence "next") | ||
103 | endforeach() | 100 | endforeach() | ||
Show All 22 Lines |