summaryrefslogtreecommitdiffstats
path: root/src/corelib/Qt6WasmMacros.cmake
diff options
context:
space:
mode:
authorMikolaj Boc <mikolaj.boc@qt.io>2022-08-24 09:33:26 +0200
committerMikolaj Boc <mikolaj.boc@qt.io>2022-08-31 16:53:52 +0200
commit619cb795b28192b8bc8551ddc0a784db43e918f1 (patch)
tree53ac1f0e5f27b92ddb6165c8beea43caa4b31cde /src/corelib/Qt6WasmMacros.cmake
parentcd4a3a1dc7b502b15d3483cbf81ce0bdd478b2df (diff)
Plug the WASM batched test runner into the build system
The new batched test runner is now used for running the tests instead of the wasm shell, which runs for single test cases. Change-Id: I7b7e6dd7993ba7937124c5843356b6891301b893 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Diffstat (limited to 'src/corelib/Qt6WasmMacros.cmake')
-rw-r--r--src/corelib/Qt6WasmMacros.cmake25
1 files changed, 19 insertions, 6 deletions
diff --git a/src/corelib/Qt6WasmMacros.cmake b/src/corelib/Qt6WasmMacros.cmake
index ff229f3429..c3e9613206 100644
--- a/src/corelib/Qt6WasmMacros.cmake
+++ b/src/corelib/Qt6WasmMacros.cmake
@@ -14,12 +14,25 @@ function(_qt_internal_wasm_add_target_helpers target)
set(WASM_BUILD_DIR "${QT_BUILD_DIR}")
endif()
- configure_file("${WASM_BUILD_DIR}/plugins/platforms/wasm_shell.html"
- "${target}.html")
- configure_file("${WASM_BUILD_DIR}/plugins/platforms/qtloader.js"
- qtloader.js COPYONLY)
- configure_file("${WASM_BUILD_DIR}/plugins/platforms/qtlogo.svg"
- qtlogo.svg COPYONLY)
+ _qt_internal_test_batch_target_name(test_batch_target_name)
+ if(QT_BUILD_TESTS_BATCHED AND target STREQUAL test_batch_target_name)
+ get_target_property(batch_output_dir ${target} RUNTIME_OUTPUT_DIRECTORY)
+ configure_file("${WASM_BUILD_DIR}/libexec/batchedtestrunner.html"
+ "${batch_output_dir}/batchedtestrunner.html" COPYONLY)
+ configure_file("${WASM_BUILD_DIR}/libexec/batchedtestrunner.js"
+ "${batch_output_dir}/batchedtestrunner.js" COPYONLY)
+ configure_file("${WASM_BUILD_DIR}/libexec/qwasmjsruntime.js"
+ "${batch_output_dir}/qwasmjsruntime.js" COPYONLY)
+ configure_file("${WASM_BUILD_DIR}/libexec/util.js"
+ "${batch_output_dir}/util.js" COPYONLY)
+ else()
+ configure_file("${WASM_BUILD_DIR}/plugins/platforms/wasm_shell.html"
+ "${target}.html")
+ configure_file("${WASM_BUILD_DIR}/plugins/platforms/qtloader.js"
+ qtloader.js COPYONLY)
+ configure_file("${WASM_BUILD_DIR}/plugins/platforms/qtlogo.svg"
+ qtlogo.svg COPYONLY)
+ endif()
if(QT_FEATURE_thread)
set(POOL_SIZE 4)