From 4f1a929fed98173f35da2d95263037c921a7ff6e Mon Sep 17 00:00:00 2001 From: Nikolaus Rath Date: Thu, 12 Jan 2017 14:26:06 -0800 Subject: Only use valgrind if requested explicitly + enable address sanitizer --- test/util.py | 15 +++------------ 1 file changed, 3 insertions(+), 12 deletions(-) (limited to 'test/util.py') 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']) -- cgit v1.2.3