X-Git-Url: https://tinc-vpn.org/git/browse?p=tinc;a=blobdiff_plain;f=test%2Fintegration%2Ftestlib%2Futil.py;fp=test%2Fintegration%2Ftestlib%2Futil.py;h=fdba760eb985350cde31e3af6423f1aa44a084cd;hp=344958e3fed293275bafc0892c5dd5906540a9c0;hb=c8402791b82947c49ba1d04f855dab04191607ca;hpb=66eb66ec8f872db3dc12e1d01101772918d69a4a diff --git a/test/integration/testlib/util.py b/test/integration/testlib/util.py index 344958e3..fdba760e 100755 --- a/test/integration/testlib/util.py +++ b/test/integration/testlib/util.py @@ -79,9 +79,13 @@ def require_command(*args: str) -> None: """Check that command args runs with exit code 0. Exit with code 77 otherwise. """ - if subp.run(args, check=False).returncode: - log.info('this test requires command "%s" to work', " ".join(args)) - sys.exit(EXIT_SKIP) + try: + if subp.run(args, check=False).returncode == 0: + return + except FileNotFoundError: + pass + log.info('this test requires command "%s" to work', " ".join(args)) + sys.exit(EXIT_SKIP) def require_path(path: str) -> None: