diff options
author | Nikolaus Rath <Nikolaus@rath.org> | 2017-01-12 14:26:06 -0800 |
---|---|---|
committer | Nikolaus Rath <Nikolaus@rath.org> | 2017-01-12 15:19:04 -0800 |
commit | 4f1a929fed98173f35da2d95263037c921a7ff6e (patch) | |
tree | 9dd8d3cbf7d6c595f06f7823a9e795ac9b0c6096 /test/util.py | |
parent | bcb8f7599539248c53051b06b81c3d4f3b327f94 (diff) | |
download | libfuse-4f1a929fed98173f35da2d95263037c921a7ff6e.tar.gz |
Only use valgrind if requested explicitly + enable address sanitizer
Diffstat (limited to 'test/util.py')
-rw-r--r-- | test/util.py | 15 |
1 files changed, 3 insertions, 12 deletions
diff --git a/test/util.py b/test/util.py index 48670bd..31c29a8 100644 --- a/test/util.py +++ b/test/util.py @@ -105,21 +105,12 @@ def fuse_test_marker(): return pytest.mark.uses_fuse() -# If valgrind is available, use it -def has_program(name): - try: - ret = subprocess.call([name, '--version'], - stdout=subprocess.DEVNULL, - stderr=subprocess.DEVNULL) - except FileNotFoundError: - return False - return ret == 0 - -if has_program('valgrind'): +# Use valgrind if requested +if os.environ.get('TEST_WITH_VALGRIND', 'no').lower().strip() \ + not in ('no', 'false', '0'): base_cmdline = [ 'valgrind', '-q', '--' ] else: base_cmdline = [] - # Try to use local fusermount3 os.environ['PATH'] = '%s:%s' % (pjoin(basename, 'util'), os.environ['PATH']) |