python: Flush the simulation stdout/stderr buffers
authorBobby R. Bruce <bbruce@ucdavis.edu>
Tue, 22 Sep 2020 19:37:34 +0000 (12:37 -0700)
committerBobby R. Bruce <bbruce@ucdavis.edu>
Tue, 29 Sep 2020 17:52:15 +0000 (17:52 +0000)
commitb715c2d513f43c1b717dd62c30ee5b1bdbde079c
tree8b1fdfb4d1bbe7c819fc0ee7a56eba539971a852
parentd9d4203e04d9d027c3d6c0d7eed1af89ebd4574a
python: Flush the simulation stdout/stderr buffers

Occasionally gem5's stdout/stderr, when run within the TestLib
framework, will be shuffled. This is resolved by flushing the
stdout/stderr buffer before and after simulation.

In addition to this, the verifier.py has been improved to remove
boilerplate gem5 code from the stdout comparison.

Change-Id: I04c8f9cee4475b8eab2f1ba9bb76bfa3cfcca6ec
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/34995
Reviewed-by: Jason Lowe-Power <power.jg@gmail.com>
Reviewed-by: Andreas Sandberg <andreas.sandberg@arm.com>
Maintainer: Jason Lowe-Power <power.jg@gmail.com>
Maintainer: Andreas Sandberg <andreas.sandberg@arm.com>
Tested-by: kokoro <noreply+kokoro@google.com>
13 files changed:
src/python/m5/simulate.py
tests/gem5/cpu_tests/ref/Bubblesort
tests/gem5/cpu_tests/ref/FloatMM
tests/gem5/dram-lowp/ref/simout
tests/gem5/hello_se/ref/simout
tests/gem5/insttest_se/ref/sparc/linux/insttest/simout
tests/gem5/learning_gem5/ref/hello
tests/gem5/learning_gem5/ref/hello_goodbye
tests/gem5/learning_gem5/ref/simple
tests/gem5/learning_gem5/ref/test
tests/gem5/learning_gem5/ref/threads
tests/gem5/m5threads_test_atomic/ref/sparc64/simout
tests/gem5/verifier.py