diff options
author | Gabe Black <gabeblack@google.com> | 2018-08-27 20:34:07 -0700 |
---|---|---|
committer | Gabe Black <gabeblack@google.com> | 2018-09-26 00:03:57 +0000 |
commit | 1baba25cb9e197b638b5a495e21f4aef628afad6 (patch) | |
tree | 4577a46cd7290198512a0161f9733248f97bf978 /src/systemc/tests | |
parent | 457a086235862f8e01dfe0dad1177a756535ec51 (diff) | |
download | gem5-1baba25cb9e197b638b5a495e21f4aef628afad6.tar.xz |
systemc: Make verify.py run the tests from the directory they expect.
Change-Id: I4c902cd81f7e46f81f601cae0ff2da044ef48f85
Reviewed-on: https://gem5-review.googlesource.com/12272
Reviewed-by: Gabe Black <gabeblack@google.com>
Maintainer: Gabe Black <gabeblack@google.com>
Diffstat (limited to 'src/systemc/tests')
-rwxr-xr-x | src/systemc/tests/verify.py | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/systemc/tests/verify.py b/src/systemc/tests/verify.py index 9c98d47ad..f56c50a79 100755 --- a/src/systemc/tests/verify.py +++ b/src/systemc/tests/verify.py @@ -142,16 +142,19 @@ class RunPhase(TestPhaseBase): '--kill-after', str(args.timeout * 2), str(args.timeout) ] + curdir = os.getcwd() def run_test(test): cmd = [] if args.timeout: cmd.extend(timeout_cmd) cmd.extend([ test.full_path(), - '-red', test.m5out_dir(), + '-red', os.path.abspath(test.m5out_dir()), '--listener-mode=off', '--quiet', - config_path + config_path, + '--working-dir', + os.path.dirname(test.src_dir()) ]) # Ensure the output directory exists. if not os.path.exists(test.m5out_dir()): @@ -162,6 +165,7 @@ class RunPhase(TestPhaseBase): returncode = error.returncode else: returncode = 0 + os.chdir(curdir) with open(test.returncode_file(), 'w') as rc: rc.write('%d\n' % returncode) |