summaryrefslogtreecommitdiffstats
path: root/cmake/QtTestHelpers.cmake
Commit message (Collapse)AuthorAgeFilesLines
* CMake: Pass WORKING_DIRECTORY to add_test only if it's non emptyMorten Sørvig7 days1-5/+20
| | | | | | | | | Otherwise when targeting WASM cmake shows a lot of Policy CMP0174 is not set warnings. Pick-to: 6.8 6.10 Change-Id: I8ba99e9a87b42c17ea4c1afce50cbfb156ac5b1c Reviewed-by: Alexandru Croitor <[email protected]>
* wasm: Switch to the new jspi browserEven Oscar Andersen2025-09-121-14/+27
| | | | | Change-Id: I10d1950f6532a01b7803944aa4383df4f974d996 Reviewed-by: Piotr Wierciński <[email protected]>
* AndroidTestRunner: don't print crashes by defaultAssam Boudjelthia2025-09-111-0/+4
| | | | | | | | | | | | | | In most cases after a crash, logs will be too long and will flood the test output, making it not ideal and mainly unexpected. Instead of printing the crash logs and logcat by default, have it done only when it's explicitly requested via --show-logcat. For CI though, add the --show-logcat by default so we don't lose that verbosity. Pick-to: 6.10 Change-Id: I2306b97378b6218ed22ba98aa50deefa9c9cd968 Reviewed-by: Joerg Bornemann <[email protected]>
* Teach androidtestrunner running android bundlesAlexey Edelev2025-07-071-0/+7
| | | | | | | | | | | | | Add the modern android bundles support to androidtestrunner. The tool uses Android bundle tool to unpack and install Android bundles. If the Android bundletool found in the system and QT_USE_ANDROID_MODERN_BUNDLE is enabled Qt tests prefer run 'aab' but not APKs. This unlocks testing of Android bundles in CI and locally. Change-Id: I98be662f5c383127a8401371757ea708a495a94f Reviewed-by: Alexandru Croitor <[email protected]>
* Add a helper target check_qt_module_json_schemasCristian Le2025-06-261-0/+15
| | | | | Change-Id: If8e8970c6752aa0fcdf49181c001ef5766faa9ea Reviewed-by: Alexandru Croitor <[email protected]>
* Add qt_internal_add_default_testsCristian Le2025-06-261-0/+4
| | | | | | | | This serves as a hook to add tests and test-like targets to all repo builds Change-Id: I480885bf5c8899981e5b8d215a14a7b736bda890 Reviewed-by: Alexandru Croitor <[email protected]>
* cmake: remove variables that doesn't existZhao Yuhang2025-06-251-6/+1
| | | | | | | | | | | | This "deprecation_define" variable existed before, but after some commit the logic that set this variable has all been removed, so it's always empty and become useless now. I've searched for this variable globally in whole qtbase repo and can't find anywhere set or use this variable, so I think it's safe to remove these leftovers. Change-Id: If89c40570f24f5b845d17966da8a83746473152f Reviewed-by: Alexandru Croitor <[email protected]>
* CMake: Prefer target arch qmltestrunner when searching for itAlexandru Croitor2025-05-281-20/+29
| | | | | | | | | | | | | | | | | | | | | | | | Currently qmltestrunner is built as a tool, instead of an app. That means that for most cross-compiling platforms (aside from Yocto), the build system will look for a host binary when referring to the qmltestrunner target. We want to look for the target platform binary instead. Switch the code around to prefer looking for the target platform binary via find_program, before falling back to referring to it by target name. In the future when we change qmltestrunner to be an app, and also expose its target platform binary as a target name, this should not be needed anymore, and we could rely solely on the target name. Amends 9edcc4690665496c2b6f15876b3979487dbad22a Task-number: COIN-1211 Task-number: QTBUG-137005 Change-Id: If2eb93d8832a17aae3d0648d1d0f5997805796fa Reviewed-by: Joerg Bornemann <[email protected]>
* CMake: try to find qmltestrunner from additional pathsSamuli Piippo2025-05-191-0/+8
| | | | | | | | | Use QT_ADDITIONAL_PACKAGES_PREFIX_PATH to look for qmltestrunner. Needed if module install is using separate staging prefix, like is done on Yocto builds. Change-Id: Icfe972a7ab1d0c99518383eab1c885e490cdb4d6 Reviewed-by: Alexandru Croitor <[email protected]>
* Fix qmltestrunner executable location and nameMichal Klocek2025-05-061-1/+16
| | | | | | | | | | | | | As qmltestrunner is not any longer qt tool. Adjust the executable name and add the way to find it outside the qtdeclarative. Reflects the change in: https://codereview.qt-project.org/c/qt/qtdeclarative/+/642618 Task-number: COIN-1211 Change-Id: I628de79f09cc27fb4d4fc43f297fcfb0c808ee19 Reviewed-by: Alexandru Croitor <[email protected]>
* cmake: Respect CMAKE_MACOSX_BUNDLE and CMAKE_WIN32_EXECUTABLETor Arne Vestbø2025-03-311-7/+11
| | | | | | | | | | | | | The user may set different global defaults for CMAKE_MACOSX_BUNDLE and CMAKE_WIN32_EXECUTABLE, so we shouldn't unconditionally override them on a target level. This allows cmake ~/foo/ -DCMAKE_MACOSX_BUNDLE=ON to build a project as a GUI app without needing to modify the CMakeLists.txt with target specific overrides. Change-Id: Id49adb1c0aedfe82a2b1d919d086c5112ba92b93 Reviewed-by: Alexandru Croitor <[email protected]>
* CMake: Show the "Docker image ... not found" warning only onceJoerg Bornemann2025-03-181-5/+7
| | | | | | | | | | | | | | | ...if docker / docker-compose are not installed. This amends commit 3223c06d43b1be658032c179397eaf6ed3b1f27c, which fixed the multiple warnings only for the docker image existence check. Remove the QT_TEST_DOCKER_WARNING_SHOWN global property and set the QT_SKIP_DOCKER_COMPOSE cache variable to ON instead. Now, we'll see the warning only once, and further re-configuration attempts won't even try to find the docker tools. Change-Id: I98a584ae91899ae8c4c347ee62601d791105d301 Reviewed-by: Alexey Edelev <[email protected]>
* CMake: Show the "Docker image ... not found" warning only onceJoerg Bornemann2025-03-121-0/+5
| | | | | | | | | ...when configuring Qt with QT_BUILD_TESTS=ON and without QT_SKIP_DOCKER_COMPOSE=ON. There's no point in flooding the output with the same warning. Change-Id: Ic7ab38dc0ca7d6cec31501da4c79170cf26e66a1 Reviewed-by: Alexandru Croitor <[email protected]>
* AndroidTestRunner: allow to call additional/extra adb callBartlomiej Moskal2025-02-111-0/+10
| | | | | | | | | | | | | | | | | | | This commit adds a new parameter (--pre-test-adb-command) to AndroidTestRunner. The new parameter allows to pass an extra adb command which will be called by AndroidTestRunner after installation and before running the test. To set the mentioned argument the new parameter for qt_internal_add_test was proposed: ANDROID_TESTRUNNER_PRE_TEST_ADB_COMMANDS. The new parameter is needed especially for multimedia screen capture tests. ScreenCapture feature needs an acceptation of Security Popup. It can be automatically accepted with additional adb command. Fixes: QTBUG-132249 Pick-to: 6.9 6.8 Change-Id: Ib70cd05d60d4594961ca68b554c7aae11cf42240 Reviewed-by: Assam Boudjelthia <[email protected]>
* wasm tests: Add option to run Chrome in headless modePiotr Wiercinski2025-01-141-1/+5
| | | | | | | | | | | | | Running Chrome in headless mode helps to circumvent a lot of issues with GPU driver/Wayland interactions that we encounter in CI. Run Chrome in headless mode if corresponding environment variable is set. Pick-to: 6.9 Change-Id: I1cf290f484054766e2b99d99045e7b39d5662210 Reviewed-by: Morten Johan Sørvig <[email protected]> Reviewed-by: Even Oscar Andersen <[email protected]>
* macOS: Enable crash reporting for tests via SwiftTor Arne Vestbø2025-01-081-0/+14
| | | | | | | | | | | | | | | | | | | | | Swift 5.9 includes built in crash reporting, printing stack traces, libraries, and registers to stdout/err. https://www.swift.org/blog/swift-5.9-backtraces/ As (Core)Foundation is written in Swift nowadays, we get this feature for free even in our "C++" apps, as we always link to CoreFoundation. To enable the feature the binary needs the com.apple.security.get-task-allow entitlement, so we add it for all our tests automatically. The final piece is to run the tests with SWIFT_BACKTRACE=enable=yes, but we'll do this in our CI provisioning, as setting it from within testlib doesn't seem to work. Pick-to: 6.9 6.8 Change-Id: I31090efee06460f45522093e17f900e76590b282 Reviewed-by: Alexandru Croitor <[email protected]>
* Add `*_check` build targets for auto cmake testsCristian Le2025-01-061-12/+4
| | | | | | | | | | | | | | | Similar `*_check` targets are created in `qt_internal_add_test`. This change extends that implementation to auto cmake tests. Note: These generated targets do not have additional dependencies, on the build targets, unlike those generated by `qt_internal_add_test`. You would need to (re-)run the build first separately and then run the `*_check` target. Fixes: QTBUG-98640 Pick-to: 6.8 6.9 Change-Id: I387f09570b6a4a345756133870c2eb9ef1cf3cf8 Reviewed-by: Alexandru Croitor <[email protected]>
* wasm: Disable optimization for batched testPiotr Wierciński2024-12-041-0/+7
| | | | | | | | | | | Prepare for upgrade to Emscripten 3.1.70. Newer Emscripten run out of memory in CI when linking batched tests. There is no runtime performance penalty while not having those optimizations. Disable optimization for that target. Task-number: QTBUG-131745 Change-Id: I479d2cd38bd6882245d80082d01102e67884413d Reviewed-by: Morten Johan Sørvig <[email protected]>
* Android: use --verbose for tests by default for CIAssam Boudjelthia2024-11-141-1/+7
| | | | | | | | | If the QT_BUILD_ENVIRONMENT is set to ci, add --verbose by default. Pick-to: 6.8 Change-Id: Ia9f2ba4c0191649d43a17bd76f61ca46180345d7 Reviewed-by: Alexandru Croitor <[email protected]>
* CMake: Run finalizers for test-like executables on all platformsAlexandru Croitor2024-11-061-0/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Previously we ran some finalizer functions for tests and manual tests, only for specific platforms, and via different code paths. This change introduces a new unified way of running all finalizers for all test-like executables, including benchmarks. To ensure a smoother transition, the new way is opt-out, and the old way can be enabled by setting the QT_INTERNAL_SKIP_TEST_FINALIZERS_V2 variable to true in case we encounter some issues in the CI. The finalizers are only run for test-like executables, and not all internal executables, because there are some unsolved issues there. One particular case is in qtdeclarative where that will create a cycle for qmlimportscanner to depend on itself. A proper solution here would be to have some kind of mapping or mechanism to exclude finalizers for targets where they would try to run themselves. Pick-to: 6.8 Task-number: QTBUG-93625 Task-number: QTBUG-112212 Change-Id: I52b3a1c02c298c4a18ce2c75d7e491ae79d191a0 Reviewed-by: Alexey Edelev <[email protected]> Reviewed-by: Joerg Bornemann <[email protected]>
* CMake: Mark benchmark executables with a propertyAlexandru Croitor2024-10-301-0/+1
| | | | | | | | | | This will be used in a follow up patch to identify them. Pick-to: 6.8 Task-number: QTBUG-93625 Task-number: QTBUG-112212 Change-Id: I39d5eb9f79ac67af0808efeda4d7f4e0a6908cc9 Reviewed-by: Alexey Edelev <[email protected]>
* CMake: Clean up _qt_internal_finalize_batchAlexandru Croitor2024-10-291-2/+31
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The _qt_internal_finalize_batch function had a bunch of problems, style-wise and function-wise: - it called find_package(Qt6) in its body, which broke when configuring qtbase with in-tree tests - it constantly rewrote the merged blacklist file on each reconfiguration - it used file(WRITE) to concatenate content - it was in the public API file The changes are: - Move the function to the internal test helpers file. - Change it to use qt_configure_file instead of file(WRITE). - Call it at the end of the qt_build_tests for a repo, or at the end of configuring a super build, instead of relying on a finalizer. - Remove the find_package call. The reason this was added in the first place, was to populate the __qt_core_macros_module_base_dir variable so that qt_internal_add_resource configure_file call doesn't fail in standalone tests build. The variable was unset because the finalized function was called in the top level directory scope, whereas the very first find_package call was in the tests/ scope, meaning the variable was empty. This is still a problem in the top-level build where the tests scope and the top-level scope are different. Work around it by relying on a global property to reset the value if it's empty. Amends 6a9e89121d7766a34c4281d298057bfbe8af36b3 Pick-to: 6.8 Change-Id: Id6fe41ee86d09b8118bea52cac8a59965d7ecb9e Reviewed-by: Alexey Edelev <[email protected]>
* CMake: guard androidtestrunner verbosityAssam Boudjelthia2024-10-161-1/+4
| | | | | | | ... only when QT_ENABLE_VERBOSE_DEPLOYMENT is set. Change-Id: Icca4b77c9bbe1c4fd3481b3c0925bff627837929 Reviewed-by: Alexey Edelev <[email protected]>
* CMake:Android: add wrapper scripts to easily run appsAssam Boudjelthia2024-10-161-6/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Create a script that allows running an app or a test easily similar to running on host. This improves development workflow and time by allowing quick runs without having to manually call the various adb commands to launch, get a pid of the app and then print the logcat, let alone passing parameters or environment variables. For normal apps, the app package name is retrieved by the script, run and live logcat is printed as long as the app is still running. For tests, the script calls androidtestrunner, allowing test parameters to be passed to the test. For CI debugging, this would save quite a lot of hussle and frustration trying to run or debug a test app. One other benefit for this is enabling running Android tests from Qt Creator's testlib plugin without big changes to Qt Creator to support androidtestrunner explicitly. Because file(GENERATE) would fail if called twice for the same file, I use file(WRITE). This is used because at the time of calling the target executable finalizer, we don't know if the target is a test or not, so we rely on writing the script first as a normal target, then call it if the target is a test where it overrides the script. For this also, parameters passed to the runner or androidtestrunner can't handle generator expressions. [ChangeLog][CMake][Android] Add wrapper scripts to run Android apps and tests with ease from the host. Task-number: QTBUG-129889 Change-Id: I84e85ce2bbf6944c8aa20bdc2c2b6d7b956bc748 Reviewed-by: Alexey Edelev <[email protected]>
* wasm: don't disable exceptions for testsMorten Sørvig2024-10-141-1/+1
| | | | | | | | | Qt autotests now require exceptions due to usage of QTEST_THROW_ON_FAIL and QTEST_THROW_ON_SKIP. Task-number: QTBUG-121822 Change-Id: I0fa95d61116a2cda1d2955c9d42cac9667ce1b72 Reviewed-by: Lorn Potter <[email protected]>
* Coin: Disable test output timeoutToni Saario2024-10-101-6/+1
| | | | | | | | | | | | | | | Now that the ctest is not run as verbose the logging is significantly decreased and VxWorks will hit timeout on some tests. There are plenty of other timeouts that will be hit instead before the total timeout specified for the command e.g. - Ctest timeout 25min default per test case. - Testlib timeout per test function 10min default. Change-Id: Ic02e812d4b059609553d2ac8d44ec91f358d76c5 Reviewed-by: Tor Arne Vestbø <[email protected]> Reviewed-by: Assam Boudjelthia <[email protected]>
* Rework the argument escaping and wrapping in _qt_internal_create_command_scriptAlexey Edelev2024-10-031-11/+6
| | | | | | | | | | | | | | | | | | | Use the quote-based argument wrapping when generating the command line scripts for the tests. Apply the wrapping and escaping of the arguments right before writing the script with the following advanced rules: - if argument is already wrapped using quotes, skip wrapping - if argument is a CMake variable, skip wrapping - wrap the argument with qoutes otherwise The above should cover the most common usecases in centralized place when we generate the test wrapper scripts. Remove other ways we wrap arguments in other places, like square bracket wrapping in qt_internal_create_test_script. Change-Id: If287dd75d6fb36260b5cf8a687215bda9c9fc1c0 Reviewed-by: Tor Arne Vestbø <[email protected]> Reviewed-by: Alexandru Croitor <[email protected]>
* tests: Use Chrome provided by env var for auto testsPiotr Wierciński2024-09-141-1/+6
| | | | | | | | Using Chrome provided by environment variable will allow to pin the version of Chrome on CI for better tests stability. Change-Id: Ic6f3026eb5694b628d3a4dd1dcc49c53270e2b86 Reviewed-by: Lorn Potter <[email protected]>
* wasm: Fix conflict usage for tst_qwasmwindow_harness.htmlEven Oscar Andersen2024-09-051-0/+8
| | | | | | | | | | | | | There is a default tst_qwasmwindow_harness.html created, and we have our own in addition. This creates problems if one runs configure and do not perform a clean build afterwards as we would be left with the autogenerated file. The solution is to rename our custom file so that there is no conflict. Change-Id: I1f0436eea752059d4dcf22407c760339eed46c09 Reviewed-by: Piotr Wierciński <[email protected]>
* Use qemu network setup scripts for VxWorksToni Saario2024-08-211-1/+1
| | | | | | | VxWorks uses emulator like QNX and requires the different setup. Change-Id: I2225f697980265b3d419c6cbc40f03450e86c577 Reviewed-by: Pasi Petäjäjärvi <[email protected]>
* Revert "wasm: enable JSPI when running tests on Chrome"Piotr Wierciński2024-08-121-1/+1
| | | | | | | | | This reverts commit 85020edf028621cec3100e81ec726b3bda777f98. Reason for revert: unstable, breaks CI Change-Id: I58fb4652d777f4d551fe03d5ed7fad3fe07170b5 Reviewed-by: Edward Welbourne <[email protected]>
* wasm: enable JSPI when running tests on ChromeMorten Sørvig2024-07-291-1/+1
| | | | | | | | | | | Enable JSPI (aka asyncify 2). This allows building and running tests in that mode, which should faster and and is also compatible with wasm-exceptions. Change-Id: I76648de7dabd2297ab271385b45ff095f08b848e Reviewed-by: Piotr Wierciński <[email protected]> Reviewed-by: Lorn Potter <[email protected]>
* Move QT_DISABLE_DEPRECATED_UP_TO and QT_WARN_DEPRECATED_UP_TO to headerAlexey Edelev2024-05-221-4/+0
| | | | | | | | | | | | | | The new approach allows to imply the macro definitions for every Qt submodule and user project without the need of setting it explicitly from CMake. This also prevent users from introducing the incompatibility between Qt modules due to defining the QT_DISABLE_DEPRECATED_UP_TO version lower than qtbase was built with. Task-number: QTBUG-124765 Change-Id: I7ba481f62cb9073ae0343c400ffc26f239f080f1 Reviewed-by: Ivan Solovev <[email protected]> Reviewed-by: Alexandru Croitor <[email protected]>
* CMake: Allow force use of builtin testdataSamuli Piippo2024-05-161-3/+5
| | | | | | | | | Builtin testdata packages all test files into resources. This is used on mobile platforms by default, but it can be useful on other platforms as well. Add CMake option to force this on other platforms. Change-Id: I67c82bc735960be53b351ed16526cbfacfbe9bb6 Reviewed-by: Alexandru Croitor <[email protected]>
* CMake: qt_internal_add_test - fix BLACKLIST file handlingTim Blechmann2024-04-131-4/+4
| | | | | | | | | Not all tests have targets that we can attach the BLACKLIST files to. Pick-to: 6.7 Change-Id: Ie0a2d72859877a8803802a4f7dc996944f002656 Reviewed-by: Ulf Hermann <[email protected]> Reviewed-by: Joerg Bornemann <[email protected]>
* CMake: qt_internal_add_test - add BLACKLIST files to IDE projectsTim Blechmann2024-04-121-0/+5
| | | | | | | | | Tests can be blacklisted via BLACKLIST files. This patch adds these files to the generated IDE projects automatically when available. Pick-to: 6.7 Change-Id: Icef2c397ada823e7b1c380dbb224694f059891ff Reviewed-by: Alexey Edelev <[email protected]>
* wasm: Make sure emrun.bat is used when running autotests on windowsEven Oscar Andersen2024-02-131-1/+5
| | | | | | | | | | | | | | | | | | The test system tried to run emrun (No .bat). This failed with a file-not-found error on windows. Also there was a test for (WIN32) when deciding to use cmd /c. This test has been updated to (CMAKE_HOST_WIN32) Also the aforementioned cmd /c was not present in the test run output. It has been added. Fixes: QTBUG-121996 Change-Id: Ib3c053949865038ad43abd479402f5e8e3c015ac Reviewed-by: Alexey Edelev <[email protected]> Reviewed-by: Piotr Wierciński <[email protected]> Reviewed-by: Alexandru Croitor <[email protected]> Reviewed-by: Qt CI Bot <[email protected]>
* CMake: don't set TIMEOUT_SIGNAL_NAME for Android target on Windows hostAssam Boudjelthia2023-12-201-1/+1
| | | | | | | | | | | | TIMEOUT_SIGNAL_NAME and TIMEOUT_SIGNAL_GRACE_PERIOD are not supported on Windows. Amends 4a3936c33cb2ab9fee2e93cbe99d31daf1cd0cc8. Pick-to: 6.7 6.6 6.5 Task-number: QTBUG-106479 Change-Id: Ifa00a9183750454960b1ff24e1a0048224feff4b Reviewed-by: Alexey Edelev <[email protected]>
* CMake:Android:Coin: prioritize timeout from COIN_COMMAND_OUTPUT_TIMEOUTAssam Boudjelthia2023-12-131-2/+7
| | | | | | | | | | | | | | | | ... from CMake so that Coin doesn't end up killing the whole VM if aRows test gets stuck and instead allow androidtestrunner to cleanup and fetch the logs so we know what happened, and even potentially ending up re-run the test and succeeding if it was flaky. Also, since CMake sets the timeout during configuration time, coin needs to set COIN_COMMAND_OUTPUT_TIMEOUT under the build target where tests are configured, so this moves the setting of that env var from the test target to the build target. Pick-to: 6.7 6.6 6.5 Change-Id: I9883ea1e98c93f79a088067518d09ca8acd5fdfd Reviewed-by: Alexandru Croitor <[email protected]>
* CMake: add spaces between sentences of BUNDLE_ANDROID_OPENSSL_LIBSAssam Boudjelthia2023-12-131-2/+2
| | | | | | Pick-to: 6.7 Change-Id: I7c3603577805426eb1cd46ff9317b7a6f3ca7f93 Reviewed-by: Alexandru Croitor <[email protected]>
* AndroidTestRunner: uninstall the test when interruptedAssam Boudjelthia2023-12-131-5/+13
| | | | | | | | | | | | | | | If the test runner was interrupted, stop waiting for the test to start or to finish, go fetch the available test results and logcat and uninstall the test app. Also, set CMake TIMEOUT_SIGNAL_NAME to SIGINT and TIMEOUT_SIGNAL_GRACE_PERIOD to 10 seconds to allow enough time to fetch the logs and uninstall the test app. Task-number: QTBUG-106479 Pick-to: 6.7 6.6 6.5 Change-Id: I4820cfe58f05d15179b4af819caa92e475881634 Reviewed-by: Alexandru Croitor <[email protected]>
* CMake: Compute dynamic timeout for androidtestrunnerAlexandru Croitor2023-11-301-1/+31
| | | | | | | | | | | | | | | | | | | | Pass a CMake test TIMEOUT argument to androidtestrunner, using a value of 95% of that timeout to allow time for the test runner to do any cleanup before being killed. If no test argument is provided, use the value from CMake property DART_TESTING_TIMEOUT or CTEST_TEST_TIMEOUT. If that's not provided default to 25 minutes which is the default for DART_TESTING_TIMEOUT. Along the way set the default androidtestrunner timeout to 10 minutes and fix the wrong timeout in the help menu. Fixes: QTBUG-106479 Pick-to: 6.6 6.5 Change-Id: I12cd531583dd94954caf8044c37c22382d53d43c Reviewed-by: Alexandru Croitor <[email protected]> Reviewed-by: Dimitrios Apostolou <[email protected]> Reviewed-by: Axel Spoerl <[email protected]>
* Consider CMAKE_RUNTIME_OUTPUT_DIRECTORY in tests and benchmarksAlexey Edelev2023-11-221-3/+11
| | | | | | | | Consider CMAKE_RUNTIME_OUTPUT_DIRECTORY when setting the default OUTPUT_DIRECTORY for tests and benchmarks. Change-Id: I93d85c77f30fec186e13e8cd3e902027e60c588f Reviewed-by: Tor Arne Vestbø <[email protected]>
* Make qt-internal-configure-tests aware of Vcpkg's OpenSSL packagesAmir Masoud Abdol2023-10-261-10/+25
| | | | | | | | | | | | | The currently provisioned OpenSSL for Android, i.e., `prebuilt-openssl-3.0.7-for-android-ndk-r25b.zip` has a different structure compared to what Vcpkg installed directory has. This patch makes sure that we are considering the Vcpkg structure as well. CMAKE_ANDROID_ARCH_ABI should be translated to Vcpkg's triplet target name, and we add a `-dynamic` suffix to them because we are building android artifacts with a custom triplets with similar names. Change-Id: Id48a8ad351a64ab18001f729d948fbf1b7e47b29 Reviewed-by: Alexandru Croitor <[email protected]>
* CMake: Handle subdirectory test data installationAlexandru Croitor2023-09-201-7/+19
| | | | | | | | | | | | | | | | | | | The qt_install() calls in qt_internal_add_test() did not re-create subdirectories that are part of the input test data. Make sure that the subdirectories are created upon installation by ensuring we specify a relative installation path that includes all the path parts except for the file name. That works the same for directories. Amends ec1546afc4a5e417d37c6a14e2909b063045bf39 Amends 540bd6cf203969363e641027b66fb044d9ccb1f6 Amends 1307736c7db1ff24e3b8282f4a7b14d24866feba Amends 0a1256a52d8c6c1b85a10f7dc94dfc34e3540040 Task-number: QTBUG-117098 Change-Id: Ia80f4e7e1ec531264864bcde3ac192ce79b65746 Reviewed-by: Alexey Edelev <[email protected]>
* wasm tests: Restore killing browser after each testPiotr Wierciński2023-09-191-1/+1
| | | | | | | | | Revert incidental change which leaked from dev environment. It's better to save CI resources by only having one tab opened in browser at a given time. Change-Id: I7f8d1af546b749b2fec4f49a6751545f52c16414 Reviewed-by: Morten Johan Sørvig <[email protected]>
* CI: Enable some tests under corelib/thread for Wasm platformPiotr Wierciński2023-09-141-10/+29
| | | | | | | | | | | | | This is part of our testing effort where we try enabling more tests for Web Assembly platform on CI. Not all tests work out of box, so some of them will require followup work. This commmit also introduces a new mechanism of automatically renaming files when they are added many times with the same filename to single translation unit. Change-Id: I620536494ea83aeb9b294c4a35ef72b51e85a38b Reviewed-by: Qt CI Bot <[email protected]> Reviewed-by: Morten Johan Sørvig <[email protected]>
* Android[openssl]: Check existence of OpenSSL .so file before useMårten Nordheim2023-07-061-3/+8
| | | | | | | | | | | | | | VCPKG by default does static builds when building for Android. This is at odds with the bundling-concept, so it should not be done unconditionally. Since we don't necessarily have the WrapOpenSSL target on-hand, let's just do a file-exists test for the one of the paths we would include. Pick-to: 6.6 6.5 Change-Id: I3693354308d5168d8a9c3d1659bfa51540114b7f Reviewed-by: Alexandru Croitor <[email protected]> Reviewed-by: Assam Boudjelthia <[email protected]>
* Android: Downgrade OpenSSL configure error to warningVolker Hilsheimer2023-07-041-4/+5
| | | | | | | | | | | | | Amend 9d5a8162a5a168972c7aaf39b130da6a72dc13e2, after which building Qt for Android locally required an OPENSSL_ROOT_DIR variable to be set. Instead of making it harder for everyone to build Qt for Android (even if no intention to work on or test network code locally), downgrade the fatal error to a warning. Pick-to: 6.6 6.5 Change-Id: I6f2176a40663cc9f55aa3066af78499af1f20894 Reviewed-by: Assam Boudjelthia <[email protected]> Reviewed-by: Mårten Nordheim <[email protected]>
* wasm: enable asyncify for batched tests onlyMorten Sørvig2023-06-211-2/+5
| | | | | | | | | | | | | | | | | | | It should be possible to build a test in any configuration by building Qt in that configuration, and then building the test with qt-standalone-test. Not all Qt configurations will be able to run all tests, (due to exec() calls and similar) but that's OK - some tests don't have exec() calls, and we want to be able to run tests for a given configuration to figure out how well it works. On CI we want to use batching and asyncify, so it makes sense to tie usage of asyncify to batching. Pick-to: 6.6 Change-Id: I05553d250a45c1831f43dc71a43ef02d01d70535 Reviewed-by: Mikołaj Boc <[email protected]>