Skip tst_QProcessEnvironment::systemEnvironment on VxWorks

This tests assumes existence of `PATH` environment variable. This
variable is not a special variable on VxWorks (it's neither set nor
evaluated by command line), causing this test to fail.

Skip this test as it's not applicable on VxWorks.

Pick-to: 6.7
Task-number: QTBUG-115777
Change-Id: I431b3f0a0ff9efefffc356bb5c7e11fdfac78690
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
This commit is contained in:
Michał Łoś 2024-05-24 16:22:25 +02:00
parent e0d87f70d8
commit 480d9bb67d

View File

@ -257,6 +257,9 @@ void tst_QProcessEnvironment::caseSensitivity()
void tst_QProcessEnvironment::systemEnvironment() void tst_QProcessEnvironment::systemEnvironment()
{ {
#ifdef Q_OS_VXWORKS
QSKIP("VxWorks do not have PATH environment variable");
#endif
static const char envname[] = "THIS_ENVIRONMENT_VARIABLE_HOPEFULLY_DOESNT_EXIST"; static const char envname[] = "THIS_ENVIRONMENT_VARIABLE_HOPEFULLY_DOESNT_EXIST";
QByteArray path = qgetenv("PATH"); QByteArray path = qgetenv("PATH");
QByteArray nonexistant = qgetenv(envname); QByteArray nonexistant = qgetenv(envname);