diff options
author | Tor Arne Vestbø <tor.arne.vestbo@qt.io> | 2020-07-23 09:53:18 +0200 |
---|---|---|
committer | Tor Arne Vestbø <tor.arne.vestbo@qt.io> | 2020-07-23 11:08:15 +0200 |
commit | e85c531c5111bf8305d5789d90d151204952ddb1 (patch) | |
tree | 49f0a2b34c192484cae7aa2a1556ce071d9c6e0f /cmake/QtBuild.cmake | |
parent | f16ab166bc7e33c6d4d4aa606618c8ed152608f1 (diff) |
testlib selftest: Don't pass TESTARGS to Catch2
It doesn't understand the arguments we usually pass to testlib.
Change-Id: Iea83d1d8c31a510b2bc442cbfc810eac631322e7
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Diffstat (limited to 'cmake/QtBuild.cmake')
-rw-r--r-- | cmake/QtBuild.cmake | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/cmake/QtBuild.cmake b/cmake/QtBuild.cmake index 7ad7e6e252..e7af6dba1c 100644 --- a/cmake/QtBuild.cmake +++ b/cmake/QtBuild.cmake @@ -4134,7 +4134,7 @@ endfunction() # This function creates a CMake test target with the specified name for use with CTest. function(qt_add_test name) qt_parse_all_arguments(arg "qt_add_test" - "RUN_SERIAL;EXCEPTIONS;GUI;QMLTEST" + "RUN_SERIAL;EXCEPTIONS;GUI;QMLTEST;CATCH" "OUTPUT_DIRECTORY;WORKING_DIRECTORY;TIMEOUT;VERSION" "QML_IMPORTPATH;TESTDATA;${__default_private_args};${__default_public_args}" ${ARGN} ) @@ -4236,7 +4236,11 @@ function(qt_add_test name) set(test_executable "${name}") endif() - add_test(NAME "${name}" COMMAND ${test_executable} ${extra_test_args} -o ${name}.xml,xml -o -,txt WORKING_DIRECTORY "${test_working_dir}") + if (NOT arg_CATCH) + list(APPEND test_outputs "-o" "${name}.xml,xml" "-o" "-,txt") + endif() + + add_test(NAME "${name}" COMMAND ${test_executable} ${extra_test_args} ${test_outputs} WORKING_DIRECTORY "${test_working_dir}") endif() set_tests_properties("${name}" PROPERTIES RUN_SERIAL "${arg_RUN_SERIAL}" LABELS "${label}") if (arg_TIMEOUT) |