systemc: Run the systemc tests with the CWD in the build directory.
authorGabe Black <gabeblack@google.com>
Thu, 22 Nov 2018 01:35:28 +0000 (17:35 -0800)
committerGabe Black <gabeblack@google.com>
Thu, 29 Nov 2018 01:22:14 +0000 (01:22 +0000)
This will prevent some (but not all) output files the tests generate
from ending up outside the build directory. Because some output file
streams are constructed as global objects, their paths are resolved
relative to the CWD when gem5 starts, before the config script has a
chance to change it.

Subsequent changes will make verify.py should make gem5 start with the
correct working directory, cleaning up the remaining leaking files.

Change-Id: I75a1256719dab4c98ab868c209d09b9dcdabb458
Reviewed-on: https://gem5-review.googlesource.com/c/14518
Reviewed-by: Gabe Black <gabeblack@google.com>
Maintainer: Gabe Black <gabeblack@google.com>

src/systemc/tests/verify.py

index 87c5d127ecbd7447a49db8f2c46d75c0b4218757..c9ede77a05d6ffc2e778516a5806868680a222f7 100755 (executable)
@@ -165,7 +165,7 @@ class RunPhase(TestPhaseBase):
                 '--quiet',
                 config_path,
                 '--working-dir',
-                os.path.dirname(test.src_dir())
+                os.path.dirname(test.dir())
             ])
             # Ensure the output directory exists.
             if not os.path.exists(test.m5out_dir()):