commit 63e35dbd88ca025037d72e910054f942fd8625ae
parent 60e165095a943e2f08870f7ed38aa71863a697a9
Author: James Prestwood <prestwoj@gmail.com>
Date: Thu, 14 Dec 2023 04:34:00 -0800
auto-t: throw exception if executable is missing
Certain tests may require external processes to work
(e.g. testNetconfig) and if missing the test will just hang until
the maximum test timeout. Check in start_process if the exe
actually exists and if not throw an exception.
Diffstat:
1 file changed, 3 insertions(+), 0 deletions(-)
diff --git a/tools/utils.py b/tools/utils.py
@@ -34,6 +34,9 @@ class Process(subprocess.Popen):
logfile = args[0]
+ if not shutil.which(args[0]):
+ raise Exception("%s is not found on system" % args[0])
+
if Process.is_verbose(args[0], log=False):
self.verbose = True