diff options
author | Alexey Edelev <alexey.edelev@qt.io> | 2020-12-07 16:21:19 +0100 |
---|---|---|
committer | Alexey Edelev <alexey.edelev@qt.io> | 2020-12-07 16:59:18 +0000 |
commit | 4a9ed410750c8b111d33c52544388904244ec6e5 (patch) | |
tree | cb0ccbedde416240175e13944bf8764f9e523cd3 /cmake/QtTestHelpers.cmake | |
parent | 32f0053e5b2d5887a5cf3ef0a0511b4a1b844470 (diff) |
CMake: Force crosscompiling_emulator to empty string if not found
In some case CROSSCOMPILING_EMULATOR property is not INHERITED and is
set to 'NOTFOUND' by get_test_property. Force it to empty string in
this case.
Add missed 'name' argument to '_qt_internal_wrap_test'. 'name'
previously was used from parent scope.
Pick-to: 6.0
Fixes: QTBUG-88053
Change-Id: I5286bcb9b11659f638e178ce52172dfee994fc34
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Diffstat (limited to 'cmake/QtTestHelpers.cmake')
-rw-r--r-- | cmake/QtTestHelpers.cmake | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/cmake/QtTestHelpers.cmake b/cmake/QtTestHelpers.cmake index 756be0ad4b..f849ba6037 100644 --- a/cmake/QtTestHelpers.cmake +++ b/cmake/QtTestHelpers.cmake @@ -321,7 +321,7 @@ function(qt_internal_add_test name) add_test(NAME "${name}" COMMAND ${test_executable} ${extra_test_args} WORKING_DIRECTORY "${test_working_dir}") else() - _qt_internal_wrap_test("${test_executable}" "${extra_test_args}" "${test_working_dir}" + _qt_internal_wrap_test("${name}" "${test_executable}" "${extra_test_args}" "${test_working_dir}" ENVIRONMENT "QT_TEST_RUNNING_IN_CTEST" 1 "PATH" "${test_env_path}" "QT_PLUGIN_PATH" "${plugin_paths_joined}") @@ -416,8 +416,8 @@ endfunction() # This function wraps test with cmake script, that makes possible standalone run with external # arguments. -function(_qt_internal_wrap_test test_executable extra_test_args test_working_dir) - cmake_parse_arguments(PARSE_ARGV 3 arg "" "" "ENVIRONMENT") +function(_qt_internal_wrap_test name test_executable extra_test_args test_working_dir) + cmake_parse_arguments(PARSE_ARGV 4 arg "" "" "ENVIRONMENT") set(environment_extras) set(skipNext false) @@ -466,6 +466,9 @@ function(_qt_internal_wrap_test test_executable extra_test_args test_working_dir # emulator is prepended independently. if(CMAKE_CROSSCOMPILING) get_test_property(${name} CROSSCOMPILING_EMULATOR crosscompiling_emulator) + if(NOT crosscompiling_emulator) + set(crosscompiling_emulator "") + endif() endif() if(WIN32) |