File tree Expand file tree Collapse file tree 1 file changed +14
-3
lines changed Expand file tree Collapse file tree 1 file changed +14
-3
lines changed Original file line number Diff line number Diff line change
1
+ # run all tests sequentially (keep for backward compatibilty)
1
2
add_custom_target (tests
2
3
COMMENT "Running doxygen tests..."
3
4
COMMAND ${PYTHON_EXECUTABLE} ${CMAKE_SOURCE_DIR} /testing/runtests.py --doxygen ${PROJECT_BINARY_DIR} /bin/doxygen --inputdir ${CMAKE_SOURCE_DIR} /testing --outputdir ${PROJECT_BINARY_DIR} /testing
4
5
DEPENDS doxygen
5
6
)
6
- add_test (NAME suite
7
- COMMAND ${PYTHON_EXECUTABLE} ${CMAKE_SOURCE_DIR} /testing/runtests.py --doxygen $< TARGET_FILE:doxygen> --inputdir ${CMAKE_SOURCE_DIR} /testing --outputdir ${PROJECT_BINARY_DIR} /testing
8
- )
9
7
8
+ # get the files in the testing directory starting with 3 digits and an underscore
9
+ file (GLOB TEST_FILES "${CMAKE_CURRENT_SOURCE_DIR} /[0-9][0-9][0-9]_*.*" )
10
+
11
+ foreach (TEST_FILE ${TEST_FILES} )
12
+ # extract the test name from the file name (3 digit excluding trailing zeros)
13
+ string (REGEX REPLACE "^.*/([0-9][0-9][0-9]*.*)\\ .[^.]*$" "\\ 1" TEST_NAME "${TEST_FILE} " )
14
+ # extract the test id from the file name
15
+ string (REGEX REPLACE "^.*/0?0?([1-9][0-9]*).*$" "\\ 1" TEST_ID "${TEST_FILE} " )
16
+ # add a test target for each test
17
+ add_test (NAME ${TEST_NAME}
18
+ COMMAND ${PYTHON_EXECUTABLE} ${CMAKE_SOURCE_DIR} /testing/runtests.py --id ${TEST_ID} --doxygen $< TARGET_FILE:doxygen> --inputdir ${CMAKE_SOURCE_DIR} /testing --outputdir ${PROJECT_BINARY_DIR} /testing
19
+ )
20
+ endforeach ()
You can’t perform that action at this time.
0 commit comments