summaryrefslogtreecommitdiffstats
path: root/tests/manual/wasm/eventloop
Commit message (Collapse)AuthorAgeFilesLines
* wasm: implement exclusive suspend modeMorten Sørvig2025-11-031-0/+45
| | | | | | | | | | | | | | | | This mode supports suspending the instance while waiting for a single event only. All other events are queued for later delivery. This is useful for async calls made behind synchronous API, where we don't want to run general event processing while the instance is waiting for the async call to complete. This is for example the case for file read() type calls. Change-Id: I8a8e8b15fea7a60a6bf069812294447505bdc717 Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io> Reviewed-by: Even Oscar Andersen <even.oscar.andersen@qt.io>
* Compile after API changeMorten Sørvig2025-07-161-1/+1
| | | | | | | | | | The API changed from using int to std::chrono::milliseconds, update test. Pick-to: 6.10 Change-Id: I4bd4079e5b262859bae293909008cacc824248ac Reviewed-by: Lorn Potter <lorn.potter@qt.io> Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
* wasm: add test for QWAsmSuspendResumeControlMorten Sørvig2025-03-034-0/+183
| | | | | | | Test via QWasmTimer and native timers. Change-Id: Ie1ad8517de83e4ad50a7cdc7c391c34226261aef Reviewed-by: Jøger Hansegård <joger.hansegard@qt.io>
* wasm: Don't hardcode ASYNCIFY 1Morten Sørvig2024-12-022-31/+0
| | | | | | | | | Build for the "default" config only, which can be asyncyfy 0,1, or 2 depending on Qt build configuration. Change-Id: I29d9a11b30325491151fc4e621272e5390681fa7 Reviewed-by: Jøger Hansegård <joger.hansegard@qt.io> Reviewed-by: Lorn Potter <lorn.potter@qt.io>
* Add copyright and licensing to build system files missing itLucie Gérard2024-05-211-0/+2
| | | | | | | Task-number: QTBUG-124453 Change-Id: Ibb6a0ab839a16ceef3c68861bac2f508ddb3d1ae Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Change license for tests filesLucie Gérard2024-02-046-6/+6
| | | | | | | | | | | | According to QUIP-18 [1], all tests file should be LicenseRef-Qt-Commercial OR GPL-3.0-only [1]: https://contribute.qt-project.org/quips/18 Pick-to: 6.7 Task-number: QTBUG-121787 Change-Id: I9657df5d660820e56c96d511ea49d321c54682e8 Reviewed-by: Christian Ehrlicher <ch.ehrlicher@gmx.de>
* Make WASM export names different across modulesMikolaj Boc2023-06-202-2/+2
| | | | | | | | The export name is now ${TARGET_NAME}Entry. This can also be overridden by using QT_WASM_EXPORT_NAME, both in CMake and qmake Change-Id: I59c97ae6e22f0b2720716e9d7eff7b6b13d37ab5 Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
* Introduce centralized means of checking for asyncifyMikolaj Boc2022-09-232-8/+7
| | | | | | | | The new function has an advantage of not requring EM_JS. Change-Id: Ib9ad0e6b59cfe2e6864697a14b5cfdb39f62af2d Reviewed-by: David Skoland <david.skoland@qt.io> Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
* Change the license of all CMakeLists.txt and *.cmake files to BSDLucie Gérard2022-08-236-6/+6
| | | | | | | Task-number: QTBUG-105718 Change-Id: I5d3ef70a31235868b9be6cb479b7621bf2a8ba39 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io>
* wasm: always build asyncify tests for eventloop_autoMorten Sørvig2022-08-173-10/+58
| | | | | | | | | Add a runtime test for asyncify availability; skip tests if asyncify is not available. Add new build target which builds with asyncify enabled. Change-Id: Idaeff0a24aa01525927b012af2a0ba135c7839c3 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* wasm: include asyncify support unconditionallyMorten Sørvig2022-08-172-8/+5
| | | | | | | | | | | | | | | | | | | Emscripten's option for enabling asyncify (-sASYNCIFY) is a link-time option, which means there is no requirement to have a separate asyncify build, at least for static builds. Replace the current QT_HAVE_EMSCRIPTEN_ASYNCIFY compile-time option with a run-time option which checks if the asyncify API is available. Keep support for configuring with "-device-option QT_EMSCRIPTEN_ASYNCIFY=1" for backwards compatibility and for the use case where want asyncify support to be on by default for a given Qt build. Enable asyncify for the asyncify_exec example. Pick-to: 6.4 Change-Id: I301fd7e2d3c0367532c886f4e34b23e1093646ad Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* wasm: add event loop auto testMorten Sørvig2022-08-085-0/+345
| | | | | | | | | | Add basic tests for timers and event processing, for different use cases such as on the main thread, on a secondary thread, and with asyncify. Pick-to: 6.4 Change-Id: Ie0f82b5de97f639867b1e65dbb0ab8b11db86f85 Reviewed-by: Lorn Potter <lorn.potter@gmail.com>
* Add license headers to cmake filesLucie Gérard2022-08-036-0/+18
| | | | | | | | | | | | CMakeLists.txt and .cmake files of significant size (more than 2 lines according to our check in tst_license.pl) now have the copyright and license header. Existing copyright statements remain intact Task-number: QTBUG-88621 Change-Id: I3b98cdc55ead806ec81ce09af9271f9b95af97fa Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io>
* CMake: Don't use PUBLIC_LIBRARIES for tests and test helpersAlexandru Croitor2022-07-285-5/+5
| | | | | Change-Id: I9b7404e1d3a78fe0726ec0f5ce1461f6c209e90d Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
* Use SPDX license identifiersLucie Gérard2022-05-165-245/+10
| | | | | | | | | | | | | Replace the current license disclaimer in files by a SPDX-License-Identifier. Files that have to be modified by hand are modified. License files are organized under LICENSES directory. Task-number: QTBUG-67283 Change-Id: Id880c92784c40f3bbde861c0d93f58151c18b9f1 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Lars Knoll <lars.knoll@qt.io> Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io>
* wasm: add secondary thread exec manual testMorten Johan Sørvig2022-01-055-0/+132
| | | | | | Pick-to: 6.3 Change-Id: Id16cddd703682d325d77ad597996960a8f521d1c Reviewed-by: Lorn Potter <lorn.potter@gmail.com>
* wasm: add asyncify manual testMorten Johan Sørvig2021-11-043-0/+85
| | | | | | | | Add simple QtCore-based test case which spins a nested event loop. Change-Id: Ia3a4ef76d561d0554faffcac8d36ae5dda2c6c53 Reviewed-by: Lorn Potter <lorn.potter@gmail.com>
* wasm: add manual tests for main() and exec()Morten Johan Sørvig2021-08-278-0/+365
Add minimal examples which demonstrates how exec() works on Qt for WebAssembly and how to implement main() without calling QApplication::exec(). Change-Id: I44f1d16af19c538380cc56faf3f0f4cc9d66cf11 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>