diff options
Diffstat (limited to 'test')
-rw-r--r-- | test/util.py | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/test/util.py b/test/util.py index 5f2f3e0..e8bb9c2 100644 --- a/test/util.py +++ b/test/util.py @@ -40,9 +40,13 @@ def umount(mount_process, mnt_dir): # If valgrind and libtool are available, use them def has_program(name): - return subprocess.call([name, '--version'], - stdout=subprocess.DEVNULL, - stderr=subprocess.DEVNULL) == 0 + try: + ret = subprocess.call([name, '--version'], + stdout=subprocess.DEVNULL, + stderr=subprocess.DEVNULL) + except FileNotFoundError: + return False + return ret == 0 if has_program('valgrind') and has_program('libtool'): base_cmdline = [ 'libtool', '--mode=execute', |