File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -1508,7 +1508,7 @@ if(UNICORN_BUILD_TESTS)
15081508 )
15091509 endforeach ()
15101510
1511- foreach (TEST_FILE ${UNICORN_TEST_FILE} )
1511+ foreach (TEST_FILE ${UNICORN_TEST_FILE} )
15121512 add_executable (${TEST_FILE}
15131513 ${CMAKE_CURRENT_SOURCE_DIR } /tests/unit/${TEST_FILE}.c
15141514 )
@@ -1538,6 +1538,20 @@ if(UNICORN_BUILD_TESTS)
15381538 target_compile_definitions (${TEST_FILE} PRIVATE TARGET_READ_INLINED )
15391539 endif ()
15401540 endforeach ()
1541+ if (NOT ANDROID_ABI)
1542+ include (ProcessorCount )
1543+ ProcessorCount (UNICORN_CTEST_PARALLEL_LEVEL )
1544+ if (UNICORN_CTEST_PARALLEL_LEVEL EQUAL 0)
1545+ set (UNICORN_CTEST_PARALLEL_LEVEL 1)
1546+ endif ()
1547+ add_custom_target (test_parallel
1548+ COMMAND ${CMAKE_CTEST_COMMAND }
1549+ --parallel ${UNICORN_CTEST_PARALLEL_LEVEL}
1550+ --output-on-failure
1551+ USES_TERMINAL
1552+ )
1553+ add_dependencies (test_parallel ${UNICORN_TEST_FILE} )
1554+ endif ()
15411555endif ()
15421556
15431557
You can’t perform that action at this time.
0 commit comments