selftests: respect ASAN_OPTIONS
Ensure that this environment variable is respected, as ASAN errors (e.g. memory leaks) can cause the selftests to fail since they expect no errors in their output. Fix an incorrect function name in a comment, while we're at it. Fixes: QTBUG-118041 Pick-to: 6.5 6.6 Change-Id: I07502101aabd8743df898ae8fe4a693c4733c4af Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>bb10
parent
b470da9107
commit
3f2b54f0a1
|
|
@ -201,9 +201,9 @@ class Scanner (object):
|
|||
|
||||
del re
|
||||
|
||||
# Keep in sync with tst_selftests.cpp's processEnvironment():
|
||||
# Keep in sync with tst_selftests.cpp's testEnvironment():
|
||||
def baseEnv(platname=None,
|
||||
keep=('PATH', 'QT_QPA_PLATFORM'),
|
||||
keep=('PATH', 'QT_QPA_PLATFORM', 'ASAN_OPTIONS'),
|
||||
posix=('HOME', 'USER', 'QEMU_SET_ENV', 'QEMU_LD_PREFIX'),
|
||||
nonapple=('DISPLAY', 'XAUTHORITY', 'XAUTHLOCALHOSTNAME'), # and XDG_*
|
||||
# Don't actually know how to test for QNX, so this is ignored:
|
||||
|
|
|
|||
|
|
@ -931,6 +931,7 @@ static QProcessEnvironment testEnvironment()
|
|||
const auto envKeys = systemEnvironment.keys();
|
||||
for (const QString &key : envKeys) {
|
||||
const bool useVariable = key == "PATH" || key == "QT_QPA_PLATFORM"
|
||||
|| key == "ASAN_OPTIONS"
|
||||
#if defined(Q_OS_QNX)
|
||||
|| key == "GRAPHICS_ROOT" || key == "TZ"
|
||||
#elif defined(Q_OS_UNIX)
|
||||
|
|
|
|||
Loading…
Reference in New Issue