mirror of https://github.com/qt/qtbase.git
Set target property _qt_is_test_executable on all tests
This is needed to later determine what kind of runner should be selected on WASM for the executable. Tests use the test runner, whereas other executables use qtLoader. Change-Id: I75aa361403b72f8e82a288967b8a81b8232d68dc Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
This commit is contained in:
parent
c8cf0f17b8
commit
62c681a599
|
@ -507,6 +507,7 @@ function(qt_internal_add_test name)
|
|||
)
|
||||
set(setting_up_batched_test FALSE)
|
||||
endif()
|
||||
set_target_properties(${name} PROPERTIES _qt_is_test_executable TRUE)
|
||||
|
||||
foreach(path IN LISTS arg_QML_IMPORTPATH)
|
||||
list(APPEND extra_test_args "-import" "${path}")
|
||||
|
|
|
@ -23,10 +23,10 @@ function(_qt_internal_wasm_add_target_helpers target)
|
|||
|
||||
set(APPNAME ${_target_output_name})
|
||||
|
||||
_qt_internal_test_batch_target_name(test_batch_target_name)
|
||||
get_target_property(target_output_directory ${target} RUNTIME_OUTPUT_DIRECTORY)
|
||||
|
||||
if(QT_BUILD_TESTS_BATCHED AND target STREQUAL test_batch_target_name)
|
||||
get_target_property(is_test ${target} _qt_is_test_executable)
|
||||
if(is_test)
|
||||
configure_file("${WASM_BUILD_DIR}/libexec/batchedtestrunner.html"
|
||||
"${target_output_directory}/batchedtestrunner.html" COPYONLY)
|
||||
configure_file("${WASM_BUILD_DIR}/libexec/batchedtestrunner.js"
|
||||
|
|
Loading…
Reference in New Issue