diff options
-rw-r--r-- | tests/auto/CMakeLists.txt | 1 | ||||
-rw-r--r-- | tests/auto/corelib/io/qstandardpaths/tst_qstandardpaths.cpp | 8 |
2 files changed, 8 insertions, 1 deletions
diff --git a/tests/auto/CMakeLists.txt b/tests/auto/CMakeLists.txt index 171e83a57a..1297db9b8a 100644 --- a/tests/auto/CMakeLists.txt +++ b/tests/auto/CMakeLists.txt @@ -66,6 +66,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/qstandardpaths) add_subdirectory(corelib/io/qfileselector) add_subdirectory(corelib/io/qfile) add_subdirectory(corelib/serialization) diff --git a/tests/auto/corelib/io/qstandardpaths/tst_qstandardpaths.cpp b/tests/auto/corelib/io/qstandardpaths/tst_qstandardpaths.cpp index 4bb7042790..84d0a505a4 100644 --- a/tests/auto/corelib/io/qstandardpaths/tst_qstandardpaths.cpp +++ b/tests/auto/corelib/io/qstandardpaths/tst_qstandardpaths.cpp @@ -430,7 +430,7 @@ void tst_qstandardpaths::testAppConfigLocation() #endif } -#ifndef Q_OS_WIN +#if !defined(Q_OS_WIN) && !defined(Q_OS_WASM) // Find "sh" on Unix. // It may exist twice, in /bin/sh and /usr/bin/sh, in that case use the PATH order. static inline QFileInfo findSh() @@ -484,6 +484,7 @@ void tst_qstandardpaths::testFindExecutable_data() << QString() << logo << logoPath; } #else +# ifndef Q_OS_WASM const QFileInfo shFi = findSh(); Q_ASSERT(shFi.exists()); const QString shPath = shFi.absoluteFilePath(); @@ -493,6 +494,7 @@ void tst_qstandardpaths::testFindExecutable_data() << QString() << shPath << shPath; QTest::newRow("unix-sh-relativepath") << QString(shFi.absolutePath()) << QString::fromLatin1("./sh") << shPath; +#endif /* !WASM */ #endif QTest::newRow("idontexist") << QString() << QString::fromLatin1("idontexist") << QString(); @@ -524,6 +526,9 @@ void tst_qstandardpaths::testFindExecutable() void tst_qstandardpaths::testFindExecutableLinkToDirectory() { +#ifdef Q_OS_WASM + QSKIP("No applicationdir on wasm"); +#else // link to directory const QString target = QDir::tempPath() + QDir::separator() + QLatin1String("link.lnk"); QFile::remove(target); @@ -531,6 +536,7 @@ void tst_qstandardpaths::testFindExecutableLinkToDirectory() QVERIFY(appFile.link(target)); QVERIFY(QStandardPaths::findExecutable(target).isEmpty()); QFile::remove(target); +#endif } using RuntimeDirSetup = std::optional<QString> (*)(QDir &); |