summaryrefslogtreecommitdiffstats
path: root/tests/auto/testlib
diff options
context:
space:
mode:
authorTimur Pocheptsov <timur.pocheptsov@qt.io>2020-10-28 12:45:04 +0100
committerLiang Qi <liang.qi@qt.io>2020-10-28 14:27:37 +0000
commit524b19fc23f72b488476d9d195aa013793bce452 (patch)
tree490ad0e21cbe6863e640aea287d45ed3319789e3 /tests/auto/testlib
parent07ff70a0da189656daf31c2a5e3e3ba117762af3 (diff)
Selftest - copy XAUTHORITY environment variable
Otherwise XOpenDisplay in a newly spawned process may fail with a 'No protocol specified' message (as it recently happened in CentOS 8.1 vm). Fixes: QTBUG-87621 Pick-to: 5.15 Change-Id: Ib6c08c7f154fb2a126d32a4aa52b535e5daa1589 Reviewed-by: Liang Qi <liang.qi@qt.io>
Diffstat (limited to 'tests/auto/testlib')
-rw-r--r--tests/auto/testlib/selftests/tst_selftests.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/tests/auto/testlib/selftests/tst_selftests.cpp b/tests/auto/testlib/selftests/tst_selftests.cpp
index 1839737d15..13afe6f7e5 100644
--- a/tests/auto/testlib/selftests/tst_selftests.cpp
+++ b/tests/auto/testlib/selftests/tst_selftests.cpp
@@ -943,7 +943,7 @@ static QProcessEnvironment testEnvironment()
|| key == "QEMU_SET_ENV" || key == "QEMU_LD_PREFIX" // Required for QEMU
# if !defined(Q_OS_MACOS)
|| key == "DISPLAY" || key == "XAUTHLOCALHOSTNAME"
- || key.startsWith("XDG_")
+ || key.startsWith("XDG_") || key == "XAUTHORITY"
# endif // !Q_OS_MACOS
#endif // Q_OS_UNIX
#ifdef __COVERAGESCANNER__