summaryrefslogtreecommitdiff
path: root/tests/configs/dram-lowp.py
diff options
context:
space:
mode:
Diffstat (limited to 'tests/configs/dram-lowp.py')
-rw-r--r--tests/configs/dram-lowp.py20
1 files changed, 7 insertions, 13 deletions
diff --git a/tests/configs/dram-lowp.py b/tests/configs/dram-lowp.py
index 20c774ea9..418514d63 100644
--- a/tests/configs/dram-lowp.py
+++ b/tests/configs/dram-lowp.py
@@ -50,19 +50,13 @@ import m5
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 page policy and specify the number of ranks
- sys.argv.append('-p%s' % page_policy)
- sys.argv.append('-r 2')
+ argv = [
+ sys.argv[0],
+ # Add a specific page policy and specify the number of ranks
+ '-p%s' % page_policy,
+ '-r 2',
+ ]
# Execute the script we are wrapping
- execfile(srcpath('configs/dram/low_power_sweep.py'), globals())
+ run_config('configs/dram/low_power_sweep.py', argv=argv)