From 72bbbcac520bedd4a7b541bb49216e7ba7b23bed Mon Sep 17 00:00:00 2001 From: Kim Kulling Date: Tue, 30 Jun 2015 00:17:49 +0200 Subject: [PATCH] Regression suite: returns != 0 in case of failures. --- test/regression/run.py | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/test/regression/run.py b/test/regression/run.py index 162e6f880..05ce3f4bc 100755 --- a/test/regression/run.py +++ b/test/regression/run.py @@ -151,6 +151,10 @@ class results: print("\nSee " + settings.results + "\\" + outfilename_failur + " for more details\n\n") + def hasFailures( self ): + """ Return True, if any failures there. """ + return 0 != len( self.failures ) + # ------------------------------------------------------------------------------- def prepare_output_dir(fullpath, myhash, app): outfile = os.path.join(settings.results, "tmp", os.path.split(fullpath)[1] + "_" + myhash) @@ -280,11 +284,16 @@ def run_test(): process_dir(tp, outfile, zipin, res) res.report_results() + if res.hasFailures(): + return 1 + + return 0 + # ------------------------------------------------------------------------------- if __name__ == "__main__": assimp_bin_path = sys.argv[1] if len(sys.argv) > 1 else 'assimp' print('Using assimp binary: ' + assimp_bin_path) - run_test() + return run_test() # vim: ai ts=4 sts=4 et sw=4