diff options
author | Tatiana Borisova <tatiana.borisova@qt.io> | 2021-10-01 11:02:36 +0300 |
---|---|---|
committer | Tatiana Borisova <tatiana.borisova@qt.io> | 2021-10-15 11:00:25 +0300 |
commit | 144f3fe5a38d0cfe9778c855919a4ad26fa482fe (patch) | |
tree | 0ee5819dffc26ad76a335cabd5983b9e956df30e /tests/auto/corelib/io/qstandardpaths/tst_qstandardpaths.cpp | |
parent | 071ebc9eee5ea404e48b32983c80b066355df270 (diff) |
Fix autotest public API compilation for INTEGRITY
- getgid/getpwuid are not supported
- process should be used with config check
Task-number: QTBUG-96176
Pick-to: 6.2
Change-Id: Ib6854772bcf52f3533cb722f963426717926258b
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Diffstat (limited to 'tests/auto/corelib/io/qstandardpaths/tst_qstandardpaths.cpp')
-rw-r--r-- | tests/auto/corelib/io/qstandardpaths/tst_qstandardpaths.cpp | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/tests/auto/corelib/io/qstandardpaths/tst_qstandardpaths.cpp b/tests/auto/corelib/io/qstandardpaths/tst_qstandardpaths.cpp index d9439d6d6b..d722b374d9 100644 --- a/tests/auto/corelib/io/qstandardpaths/tst_qstandardpaths.cpp +++ b/tests/auto/corelib/io/qstandardpaths/tst_qstandardpaths.cpp @@ -45,7 +45,7 @@ #include <pwd.h> #endif -#if defined(Q_OS_UNIX) && !defined(Q_OS_MAC) && !defined(Q_OS_ANDROID) +#if defined(Q_OS_UNIX) && !defined(Q_OS_MACOS) && !defined(Q_OS_ANDROID) #define Q_XDG_PLATFORM #endif @@ -468,7 +468,9 @@ void tst_qstandardpaths::testRuntimeDirectory() #endif } -#ifdef Q_XDG_PLATFORM +// INTEGRITY PJF System doesn't support user ID related APIs. getpwuid is not defined. +// testCustomRuntimeDirectory_data test will always FAIL for INTEGRITY. +#if defined(Q_XDG_PLATFORM) && !defined(Q_OS_INTEGRITY) static QString fallbackXdgRuntimeDir() { static QString username = [] { @@ -491,7 +493,7 @@ static QString fallbackXdgRuntimeDir() { qunsetenv("XDG_RUNTIME_DIR"); #ifdef Q_XDG_PLATFORM -#ifndef Q_OS_WASM +#if !defined(Q_OS_WASM) && !defined(Q_OS_INTEGRITY) QTest::ignoreMessage(QtWarningMsg, qPrintable("QStandardPaths: XDG_RUNTIME_DIR not set, defaulting to '" + fallbackXdgRuntimeDir() + '\'')); @@ -501,7 +503,9 @@ static QString fallbackXdgRuntimeDir() void tst_qstandardpaths::testCustomRuntimeDirectory_data() { -#if defined(Q_XDG_PLATFORM) +#ifdef Q_OS_INTEGRITY + QSKIP("Test requires getgid/getpwuid API that are not available on INTEGRITY"); +#elif defined(Q_XDG_PLATFORM) QTest::addColumn<RuntimeDirSetup>("setup"); auto addRow = [](const char *name, RuntimeDirSetup f) { QTest::newRow(name) << f; |