Skip to content

Commit

Permalink
simulate.py: delay for a short time on success
Browse files Browse the repository at this point in the history
Per discussion with Kent, a brief delay even if QEMU exits with a
successful status may be desirable, because there may have been a
failure in the simulated environment.

We have a shorter delay in part because we presume that the screen will
be more deciperhable in the QEMU-successful case, because QEMU will put
the terminal into a sensible state itself before terminating.
Experience will tell us how reliable this assumption is.

Tested success case with:
    ../griddle --SIMULATION=ON --PLATFORM=sabre
    ./simulate
Tested failure case with:
    ./simulate --extra-qemu-args bogus
  • Loading branch information
branden-data61 committed Dec 11, 2019
1 parent 9e15b34 commit f715d15
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion cmake-tool/simulate_scripts/simulate.py
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,9 @@ def notice(message):
msg = "QEMU failed; resetting terminal in {d} seconds".format(d=delay) \
+ "--interrupt to abort\n"
notice(msg)
time.sleep(delay)
else:
delay = 2 # in seconds

time.sleep(delay)

subprocess.call("tput reset", shell=True)

0 comments on commit f715d15

Please sign in to comment.