From 6a1dec98ceeab4565dc5e40f86bba761c24972ba Mon Sep 17 00:00:00 2001 From: Michael Wetter Date: Tue, 15 Oct 2019 08:55:04 -0700 Subject: [PATCH] Mathadon issue296 error reporting (#299) * improved error reporting * avoiding duplicate output * fruther clarified error --- buildingspy/development/regressiontest.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/buildingspy/development/regressiontest.py b/buildingspy/development/regressiontest.py index 13f2392a..421f8ffd 100644 --- a/buildingspy/development/regressiontest.py +++ b/buildingspy/development/regressiontest.py @@ -75,18 +75,18 @@ def runSimulation(worDir, cmd): try: retcode = pro.wait() if retcode != 0: + print("*** Execution of command '{}' failed".format(cmd)) print("*** Working directory is {}".format(worDir)) - print("*** Command is {}\n".format(cmd)) print("*** Files in directory {} are\n".format(worDir)) for fil in os.listdir(worDir): print(" {}".format(fil)) - print("*** stdout.log is \n") + print("*** The command returned the following output: \n") if os.path.isfile(logFilNam): with open(logFilNam, 'r') as f: print(f.read()) else: print("The file {} does not exist.\n".format(logFilNam)) - print("*** end of stdout.log\n") + print("*** end of command output\n") print("Child was terminated by signal {}".format(retcode)) return retcode