diff options
| author | Florian Fischer <florian.fl.fischer@fau.de> | 2021-04-07 19:15:21 +0200 |
|---|---|---|
| committer | Florian Fischer <florian.fl.fischer@fau.de> | 2021-04-07 19:15:21 +0200 |
| commit | 0707aa645e243e4f87c98c586fff343b77766265 (patch) | |
| tree | 4c9b25cef1c4e4d784f81a6c14e1d45e11b58b9e /bench.py | |
| parent | 6e26da584aa8e9c7e98806cd582c84991ea3849e (diff) | |
| download | allocbench-0707aa645e243e4f87c98c586fff343b77766265.tar.gz allocbench-0707aa645e243e4f87c98c586fff343b77766265.zip | |
[bench] exit with status 1 on failure
Diffstat (limited to 'bench.py')
| -rwxr-xr-x | bench.py | 9 |
1 files changed, 8 insertions, 1 deletions
@@ -163,10 +163,12 @@ def main(): cwd = os.getcwd() + exit_code = 0 # warn about unknown benchmarks for bench in (args.benchmarks or []) + (args.exclude_benchmarks or []): if bench not in AVAIL_BENCHMARKS: logger.error('Benchmark "%s" unknown!', bench) + exit_code = 1 # Run actual benchmarks for bench in AVAIL_BENCHMARKS: @@ -182,6 +184,7 @@ def main(): except Exception: #pylint: disable=broad-except logger.error(traceback.format_exc()) logger.error("Skipping %s! Loading failed.", bench) + exit_code = 1 continue try: @@ -190,6 +193,7 @@ def main(): except Exception: #pylint: disable=broad-except logger.error(traceback.format_exc()) logger.error("Skipping %s! Preparing failed.", bench) + exit_code = 1 continue if args.analyze: @@ -209,6 +213,7 @@ def main(): os.chdir(cwd) logger.error(traceback.format_exc()) logger.error("Skipping %s!", bench) + exit_code = 1 continue end_time = datetime.datetime.now() @@ -226,6 +231,8 @@ def main(): if args.summarize: summarize() + return exit_code + if __name__ == "__main__": - main() + sys.exit(main()) |
