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.
This commit is contained in:
James Prestwood 2023-12-14 04:34:00 -08:00 committed by Denis Kenzior
parent 60e165095a
commit 63e35dbd88
1 changed files with 3 additions and 0 deletions

View File

@ -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