Reduce entropy of quotations s/'/"/g
Variety of quotes used in the file, even in the same sections.
Arbitrarily proposing to go with " (either is permissible) to adhere to style guide on sticking with one of the quoting options:
https: //google.github.io/styleguide/pyguide.html
Change-Id: I5080c25262920dffe5eeea89583b88eb161f34a7
diff --git a/scripts/test_runner.py b/scripts/test_runner.py
index b50ae07..fa95c68 100755
--- a/scripts/test_runner.py
+++ b/scripts/test_runner.py
@@ -13,20 +13,20 @@
parser = argparse.ArgumentParser(
description="Run a springbok test on an simulator.")
-parser.add_argument('simulator',
- help='Select a simulator',
- choices=['renode', 'qemu', 'spike'])
-parser.add_argument('elf',
- help='Elf to execute on a simulator')
-parser.add_argument('--renode-path',
+parser.add_argument("simulator",
+ help="Select a simulator",
+ choices=["renode", "qemu", "spike"])
+parser.add_argument("elf",
+ help="Elf to execute on a simulator")
+parser.add_argument("--renode-path",
help="Path to renode simulator")
parser.add_argument("--trace-output",
help="Path to trace output file")
-parser.add_argument('--qemu-path',
+parser.add_argument("--qemu-path",
help="Path to qemu simulator")
-parser.add_argument('--spike-path',
+parser.add_argument("--spike-path",
help="Path to spike simulator")
-parser.add_argument('--timeout', type=int,
+parser.add_argument("--timeout", type=int,
help="Timeout for test", default=1000)
parser.add_argument("--quick_test",
help="allow quickest test time", action="store_true")
@@ -47,7 +47,7 @@
def run(self, timeout=1000):
""" Run the simulation command and quit the simulation."""
- self.child = pexpect.spawn(self.simulator_cmd, encoding='utf-8')
+ self.child = pexpect.spawn(self.simulator_cmd, encoding="utf-8")
self.child.logfile = self.buffer
self.child.expect(self.termination_strings, timeout=timeout)
self.child.send("\nq\n")
@@ -69,7 +69,7 @@
""" Renode Simulation """
def __init__(self, path, elf):
# Get the ROOTDIR path if it exists
- self.rootdir = os.environ.get('ROOTDIR', default=None)
+ self.rootdir = os.environ.get("ROOTDIR", default=None)
if self.rootdir is None:
parser.error("ROOTDIR environment variable not set.")
renode_script = """
@@ -97,9 +97,9 @@
self.renode_script = renode_script % self.script_params
self.renode_args = [
"%s" % path,
- '--disable-xwt',
- ' --console',
- '--plain',
+ "--disable-xwt",
+ " --console",
+ "--plain",
]
self.renode_simulator_cmd = " ".join(self.renode_args)
super().__init__(self.renode_simulator_cmd)
@@ -107,7 +107,7 @@
def run(self, timeout=120):
file_desc, script_path = tempfile.mkstemp(suffix=".resc")
try:
- with os.fdopen(file_desc, 'w') as tmp:
+ with os.fdopen(file_desc, "w") as tmp:
tmp.write(self.renode_script)
tmp.flush()
self.simulator_cmd += " %s" % script_path