From 1319101ecee04598056b1061c0a0e0b2c873c765 Mon Sep 17 00:00:00 2001 From: Even Oscar Andersen Date: Wed, 21 Feb 2024 09:50:53 +0100 Subject: [PATCH] wasm: Enable fileselector test Also add test files for emscripten platform to build Change-Id: Ief03e44a4e3f3339a65453469a7ae0a6969f2252 Reviewed-by: Lorn Potter --- tests/auto/CMakeLists.txt | 1 + tests/auto/corelib/io/qfileselector/CMakeLists.txt | 4 ++++ .../io/qfileselector/platforms/+unix/+emscripten/+wasm/test | 0 .../corelib/io/qfileselector/platforms/+unix/+emscripten/test | 0 tests/auto/corelib/io/qfileselector/platforms/+wasm/test | 0 tests/auto/corelib/io/qfileselector/platforms/+wasm/test2 | 0 tests/auto/corelib/io/qfileselector/tst_qfileselector.cpp | 2 +- 7 files changed, 6 insertions(+), 1 deletion(-) create mode 100644 tests/auto/corelib/io/qfileselector/platforms/+unix/+emscripten/+wasm/test create mode 100644 tests/auto/corelib/io/qfileselector/platforms/+unix/+emscripten/test create mode 100644 tests/auto/corelib/io/qfileselector/platforms/+wasm/test create mode 100644 tests/auto/corelib/io/qfileselector/platforms/+wasm/test2 diff --git a/tests/auto/CMakeLists.txt b/tests/auto/CMakeLists.txt index 04a4fff904..2a75fb44d5 100644 --- a/tests/auto/CMakeLists.txt +++ b/tests/auto/CMakeLists.txt @@ -63,6 +63,7 @@ if(QT_BUILD_WASM_BATCHED_TESTS) add_subdirectory(corelib/io/qbuffer) add_subdirectory(corelib/io/qabstractfileengine) add_subdirectory(corelib/io/qsettings) + add_subdirectory(corelib/io/qfileselector) add_subdirectory(corelib/io/qfile) add_subdirectory(corelib/serialization) add_subdirectory(corelib/text) diff --git a/tests/auto/corelib/io/qfileselector/CMakeLists.txt b/tests/auto/corelib/io/qfileselector/CMakeLists.txt index 0fdff55cd5..c27c4f4f96 100644 --- a/tests/auto/corelib/io/qfileselector/CMakeLists.txt +++ b/tests/auto/corelib/io/qfileselector/CMakeLists.txt @@ -32,10 +32,14 @@ set(qfileselector_resource_files "platforms/+ios/test2" "platforms/+linux/test" "platforms/+linux/test2" + "platforms/+wasm/test" + "platforms/+wasm/test2" "platforms/+macos/test" "platforms/+macos/test2" "platforms/+qnx/test" "platforms/+qnx/test2" + "platforms/+unix/+emscripten/+wasm/test" + "platforms/+unix/+emscripten/test" "platforms/+unix/+android/test" "platforms/+unix/+darwin/+ios/test" "platforms/+unix/+darwin/+macos/test" diff --git a/tests/auto/corelib/io/qfileselector/platforms/+unix/+emscripten/+wasm/test b/tests/auto/corelib/io/qfileselector/platforms/+unix/+emscripten/+wasm/test new file mode 100644 index 0000000000..e69de29bb2 diff --git a/tests/auto/corelib/io/qfileselector/platforms/+unix/+emscripten/test b/tests/auto/corelib/io/qfileselector/platforms/+unix/+emscripten/test new file mode 100644 index 0000000000..e69de29bb2 diff --git a/tests/auto/corelib/io/qfileselector/platforms/+wasm/test b/tests/auto/corelib/io/qfileselector/platforms/+wasm/test new file mode 100644 index 0000000000..e69de29bb2 diff --git a/tests/auto/corelib/io/qfileselector/platforms/+wasm/test2 b/tests/auto/corelib/io/qfileselector/platforms/+wasm/test2 new file mode 100644 index 0000000000..e69de29bb2 diff --git a/tests/auto/corelib/io/qfileselector/tst_qfileselector.cpp b/tests/auto/corelib/io/qfileselector/tst_qfileselector.cpp index 7c038e9913..626166c8b8 100644 --- a/tests/auto/corelib/io/qfileselector/tst_qfileselector.cpp +++ b/tests/auto/corelib/io/qfileselector/tst_qfileselector.cpp @@ -60,7 +60,7 @@ void tst_QFileSelector::basicTest_data() QString expectedPlatform1File(":/platforms"); QString expectedPlatform2File(""); //Only the last selector QString expectedPlatform3File; // Only the first selector (the family) -#if defined(Q_OS_UNIX) && !defined(Q_OS_ANDROID) && \ +#if defined(Q_OS_UNIX) && !defined(Q_OS_ANDROID) && !defined(Q_OS_WASM) && \ !defined(Q_OS_DARWIN) && !defined(Q_OS_LINUX) && !defined(Q_OS_HAIKU) && !defined(Q_OS_QNX) /* We are only aware of specific unixes, and do not have test files for any of the others. However those unixes can get a selector added from the result of a uname call, so this will