summaryrefslogtreecommitdiff
path: root/clients/tests
diff options
context:
space:
mode:
Diffstat (limited to 'clients/tests')
-rwxr-xr-xclients/tests/test-client.py19
1 files changed, 18 insertions, 1 deletions
diff --git a/clients/tests/test-client.py b/clients/tests/test-client.py
index daa69842c8..934cec60d3 100755
--- a/clients/tests/test-client.py
+++ b/clients/tests/test-client.py
@@ -63,6 +63,10 @@ ENV_NM_TEST_REGENERATE = 'NM_TEST_REGENERATE'
# numbers enabled.
ENV_NM_TEST_WITH_LINENO = 'NM_TEST_WITH_LINENO'
+ENV_NM_TEST_ASAN_OPTIONS = 'NM_TEST_ASAN_OPTIONS'
+ENV_NM_TEST_LSAN_OPTIONS = 'NM_TEST_LSAN_OPTIONS'
+ENV_NM_TEST_UBSAN_OPTIONS = 'NM_TEST_UBSAN_OPTIONS'
+
#
###############################################################################
@@ -406,6 +410,17 @@ class Configuration:
v = (os.environ.get(ENV_NM_TEST_REGENERATE, '0') == '1')
elif name == ENV_NM_TEST_WITH_LINENO:
v = (os.environ.get(ENV_NM_TEST_WITH_LINENO, '0') == '1')
+ elif name in [ ENV_NM_TEST_ASAN_OPTIONS, ENV_NM_TEST_LSAN_OPTIONS, ENV_NM_TEST_UBSAN_OPTIONS ]:
+ v = os.environ.get(name, None)
+ if v is None:
+ if name == ENV_NM_TEST_ASAN_OPTIONS:
+ v = 'detect_leaks=0'
+ elif name == ENV_NM_TEST_LSAN_OPTIONS:
+ v = ''
+ elif name == ENV_NM_TEST_UBSAN_OPTIONS:
+ v = ''
+ else:
+ assert(False)
else:
raise Exception()
self._values[name] = v
@@ -763,7 +778,9 @@ class TestNmcli(NmTestBase):
env['LIBNM_USE_SESSION_BUS'] = '1'
env['LIBNM_USE_NO_UDEV'] = '1'
env['TERM'] = 'linux'
- env['ASAN_OPTIONS'] = 'detect_leaks=0'
+ env['ASAN_OPTIONS'] = conf.get(ENV_NM_TEST_ASAN_OPTIONS)
+ env['LSAN_OPTIONS'] = conf.get(ENV_NM_TEST_LSAN_OPTIONS)
+ env['LBSAN_OPTIONS'] = conf.get(ENV_NM_TEST_UBSAN_OPTIONS)
env['XDG_CONFIG_HOME'] = PathConfiguration.srcdir()
env['NM_TEST_CALLING_NUM'] = str(calling_num)
if fatal_warnings is _DEFAULT_ARG or fatal_warnings: