diff options
Diffstat (limited to 'tests/configs/memcheck.py')
-rw-r--r-- | tests/configs/memcheck.py | 17 |
1 files changed, 5 insertions, 12 deletions
diff --git a/tests/configs/memcheck.py b/tests/configs/memcheck.py index 97f8d1369..ec20431db 100644 --- a/tests/configs/memcheck.py +++ b/tests/configs/memcheck.py @@ -54,18 +54,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 - del sys.argv[1:] - - # Add a specific max tick - sys.argv.append('-m %d' % maxtick) + argv = [ + sys.argv[0], + '-m %d' % maxtick, + ] # Execute the script we are wrapping - execfile(srcpath('configs/example/memcheck.py'), globals()) + run_config('configs/example/memcheck.py', argv=argv) |