diff options
Diffstat (limited to 'tests/configs/memcheck.py')
-rw-r--r-- | tests/configs/memcheck.py | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/tests/configs/memcheck.py b/tests/configs/memcheck.py index 52931a0b3..21c8d7d4c 100644 --- a/tests/configs/memcheck.py +++ b/tests/configs/memcheck.py @@ -47,6 +47,11 @@ root = None def run_test(root): # Called from tests/run.py + # Set the working directory in case we are executing from + # outside gem5's source tree + import os + os.chdir(os.path.join(os.path.dirname(__file__), "../")) + # The path to this script is the only parameter. Delete it so # we can execute the script that we want to execute. import sys @@ -56,4 +61,4 @@ def run_test(root): sys.argv.append('-m %d' % maxtick) # Execute the script we are wrapping - execfile('configs/example/memcheck.py', globals()) + execfile(srcpath('configs/example/memcheck.py'), globals()) |