Skip to content

Commit

Permalink
simulate.py: Allow overriding simulation run directory
Browse files Browse the repository at this point in the history
  • Loading branch information
colluca committed Oct 24, 2023
1 parent 525ad24 commit 88f0e2e
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions util/sim/simulate.py
Original file line number Diff line number Diff line change
Expand Up @@ -180,6 +180,12 @@ def run_test(test, args):
else:
cmd = SIMULATOR_CMDS[simulator]
cmd = cmd.format(sim_bin=sim_bin, elf=elf)

# Check if the simulation should be run in a specific directory.
# This is useful, e.g. to preserve the logs of multiple simulations
# which are executed in parallel
if 'rundir' in test:
cmd = f'cd {test["rundir"]} && {cmd}'
if not quiet:
print(f'$ {cmd}', flush=True)

Expand Down

0 comments on commit 88f0e2e

Please sign in to comment.