From cd78ab6b9e1ea047fa44dc1eded86136d3777d09 Mon Sep 17 00:00:00 2001 From: Luca Colagrande Date: Thu, 21 Sep 2023 16:23:42 +0200 Subject: [PATCH] util/sim: Minor improvements --- util/sim/simulate.py | 10 ++++------ util/sim/verification.py | 4 ++-- 2 files changed, 6 insertions(+), 8 deletions(-) diff --git a/util/sim/simulate.py b/util/sim/simulate.py index db00292af..4e36cc1e1 100755 --- a/util/sim/simulate.py +++ b/util/sim/simulate.py @@ -213,10 +213,7 @@ def print_test_summary(failed_tests, args): print(f'{colored("All tests passed!", "green")}') -def run_tests(args): - - # Get tests from testlist - tests = get_tests(args.testlist) +def run_tests(tests, args): # Create a process Pool with multiprocessing.Pool(args.n_procs) as pool: @@ -265,8 +262,9 @@ def completion_callback(return_value): def main(): args = parse_args() - sys.exit(run_tests(args)) + tests = get_tests(args.testlist) + return run_tests(tests, args) if __name__ == '__main__': - main() + sys.exit(main()) diff --git a/util/sim/verification.py b/util/sim/verification.py index 04594a51c..9dd3428e4 100644 --- a/util/sim/verification.py +++ b/util/sim/verification.py @@ -28,8 +28,8 @@ def parse_args(): help='The Snitch binary to be executed by the simulated Snitch hardware') parser.add_argument( '--symbols-bin', - help='An optional binary containing the I/O symbols. By default,' - 'these are searched for in snitch_bin. This argument serves as an' + help='An optional binary containing the I/O symbols. By default, ' + 'these are searched for in snitch_bin. This argument serves as an ' 'alternative.') parser.add_argument( '--log',