misc: 'sim{out/err}' -> 'sim{out/err}.txt' (#250)
By default, the `--stderr-file` and `--stdout-file` arguments were directing the simulator to output files named "simerr" and "simout" respectively if an output redirect was requested. A small annoyance is these files lack an extension meaning programs refuse to open them, or don't do so withou additional effort. On many systems they are assumed to scripts. This patch adds the `.txt` extension to both, thus clearly indicating to other programs these are text files and can be opened and read as such.
This commit is contained in:
@@ -318,8 +318,8 @@ def define_constants(constants):
|
||||
constants.supported_hosts = constants.supported_tags["host"]
|
||||
|
||||
constants.tempdir_fixture_name = "tempdir"
|
||||
constants.gem5_simulation_stderr = "simerr"
|
||||
constants.gem5_simulation_stdout = "simout"
|
||||
constants.gem5_simulation_stderr = "simerr.txt"
|
||||
constants.gem5_simulation_stdout = "simout.txt"
|
||||
constants.gem5_simulation_stats = "stats.txt"
|
||||
constants.gem5_simulation_config_ini = "config.ini"
|
||||
constants.gem5_simulation_config_json = "config.json"
|
||||
|
||||
@@ -126,13 +126,13 @@ def parse_options():
|
||||
option(
|
||||
"--stdout-file",
|
||||
metavar="FILE",
|
||||
default="simout",
|
||||
default="simout.txt",
|
||||
help="Filename for -r redirection [Default: %default]",
|
||||
)
|
||||
option(
|
||||
"--stderr-file",
|
||||
metavar="FILE",
|
||||
default="simerr",
|
||||
default="simerr.txt",
|
||||
help="Filename for -e redirection [Default: %default]",
|
||||
)
|
||||
option(
|
||||
|
||||
@@ -508,7 +508,7 @@ class VerifyPhase(TestPhaseBase):
|
||||
missing = []
|
||||
log_file = ".".join([test.name, "log"])
|
||||
log_path = gd.entry(log_file)
|
||||
simout_path = os.path.join(out_dir, "simout")
|
||||
simout_path = os.path.join(out_dir, "simout.txt")
|
||||
if not os.path.exists(simout_path):
|
||||
missing.append("log output")
|
||||
elif log_path:
|
||||
|
||||
@@ -26,7 +26,9 @@
|
||||
|
||||
from testlib import *
|
||||
|
||||
verifiers = (verifier.MatchStdoutNoPerf(joinpath(getcwd(), "ref", "simout")),)
|
||||
verifiers = (
|
||||
verifier.MatchStdoutNoPerf(joinpath(getcwd(), "ref", "simout.txt")),
|
||||
)
|
||||
|
||||
gem5_verify_config(
|
||||
name="test-low_power-close_adaptive",
|
||||
|
||||
@@ -41,7 +41,9 @@ else:
|
||||
for isa in test_progs:
|
||||
for binary in test_progs[isa]:
|
||||
ref_path = joinpath(getcwd(), "ref")
|
||||
verifiers = (verifier.MatchStdoutNoPerf(joinpath(ref_path, "simout")),)
|
||||
verifiers = (
|
||||
verifier.MatchStdoutNoPerf(joinpath(ref_path, "simout.txt")),
|
||||
)
|
||||
|
||||
for cpu in cpu_types[isa]:
|
||||
gem5_verify_config(
|
||||
|
||||
@@ -45,7 +45,7 @@ url = config.resource_url + "/test-progs/pthreads/sparc64/" + binary
|
||||
test_atomic = DownloadedProgram(url, base_path, binary)
|
||||
|
||||
verifiers = (
|
||||
verifier.MatchStdoutNoPerf(joinpath(getcwd(), "ref/sparc64/simout")),
|
||||
verifier.MatchStdoutNoPerf(joinpath(getcwd(), "ref/sparc64/simout.txt")),
|
||||
)
|
||||
|
||||
for cpu in cpu_types:
|
||||
|
||||
@@ -32,7 +32,9 @@ tests/gem5/configs/simple_binary_run.py to run a simple SE-mode simualation
|
||||
with different configurations of the BaseCPUProcessor.
|
||||
"""
|
||||
|
||||
verifiers = (verifier.MatchStdoutNoPerf(joinpath(getcwd(), "ref", "simout")),)
|
||||
verifiers = (
|
||||
verifier.MatchStdoutNoPerf(joinpath(getcwd(), "ref", "simout.txt")),
|
||||
)
|
||||
|
||||
|
||||
gem5_verify_config(
|
||||
|
||||
@@ -84,7 +84,7 @@ class MatchGoldStandard(Verifier):
|
||||
"""
|
||||
|
||||
def __init__(
|
||||
self, standard_filename, ignore_regex=None, test_filename="simout"
|
||||
self, standard_filename, ignore_regex=None, test_filename="simout.txt"
|
||||
):
|
||||
"""
|
||||
:param standard_filename: The path of the standard file to compare
|
||||
|
||||
@@ -47,7 +47,7 @@ import sys
|
||||
import re
|
||||
|
||||
# This script is intended to post process and plot the output from
|
||||
# running configs/dram/lat_mem_rd.py, as such it parses the simout and
|
||||
# running configs/dram/lat_mem_rd.py, as such it parses the simout.txt and
|
||||
# stats.txt to get the relevant data points.
|
||||
def main():
|
||||
|
||||
@@ -62,9 +62,9 @@ def main():
|
||||
exit(-1)
|
||||
|
||||
try:
|
||||
simout = open(sys.argv[1] + "/simout", "r")
|
||||
simout = open(sys.argv[1] + "/simout.txt", "r")
|
||||
except IOError:
|
||||
print("Failed to open ", sys.argv[1] + "/simout", " for reading")
|
||||
print("Failed to open ", sys.argv[1] + "/simout.txt", " for reading")
|
||||
exit(-1)
|
||||
|
||||
# Get the address ranges
|
||||
@@ -85,7 +85,7 @@ def main():
|
||||
simout.close()
|
||||
|
||||
if not got_ranges:
|
||||
print("Failed to get address ranges, ensure simout is up-to-date")
|
||||
print("Failed to get address ranges, ensure simout.txt is up-to-date")
|
||||
exit(-1)
|
||||
|
||||
# Now parse the stats
|
||||
|
||||
@@ -79,9 +79,9 @@ def main():
|
||||
exit(-1)
|
||||
|
||||
try:
|
||||
simout = open(sys.argv[2] + "/simout", "r")
|
||||
simout = open(sys.argv[2] + "/simout.txt", "r")
|
||||
except IOError:
|
||||
print("Failed to open ", sys.argv[2] + "/simout", " for reading")
|
||||
print("Failed to open ", sys.argv[2] + "/simout.txt", " for reading")
|
||||
exit(-1)
|
||||
|
||||
# Get the burst size, number of banks and the maximum stride from
|
||||
@@ -102,7 +102,9 @@ def main():
|
||||
simout.close()
|
||||
|
||||
if not got_sweep:
|
||||
print("Failed to establish sweep details, ensure simout is up-to-date")
|
||||
print(
|
||||
"Failed to establish sweep details, ensure simout.txt is up-to-date"
|
||||
)
|
||||
exit(-1)
|
||||
|
||||
# Now parse the stats
|
||||
|
||||
Reference in New Issue
Block a user