Skip to content

Commit

Permalink
simulate.py: Allow extending default parser
Browse files Browse the repository at this point in the history
  • Loading branch information
colluca committed Sep 25, 2023
1 parent 2c7e8b8 commit 04017ff
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions util/sim/simulate.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
}


def parse_args():
def parser():
# Argument parsing
parser = argparse.ArgumentParser()
parser.add_argument(
Expand Down Expand Up @@ -81,8 +81,7 @@ def parse_args():
action='store_true',
help=('Option to print simulation logs when multiple tests are run in parallel.'
'Logs are always printed when n_procs == 1'))
args = parser.parse_args()
return args
return parser


# Get tests from a test list file
Expand Down Expand Up @@ -267,7 +266,7 @@ def completion_callback(return_value):


def main():
args = parse_args()
args = parser().parse_args()
tests = get_tests(args.testlist)
return run_tests(tests, args)

Expand Down

0 comments on commit 04017ff

Please sign in to comment.