tests: Add tests for the Learning gem5 scripts

These tests will ensure that Learning gem5 scripts are always up to date with
the changes in the mainline of gem5.

Committed by: Nilay Vaish <nilay@cs.wisc.edu>
This commit is contained in:
Jason Lowe-Power 2015-09-16 09:35:36 -05:00
parent f065f9941b
commit 29dd04cfe9
4 changed files with 39 additions and 0 deletions

View file

@ -361,6 +361,8 @@ configs += ['simple-atomic', 'simple-atomic-mp',
'rubytest', 'memtest', 'memtest-filter', 'rubytest', 'memtest', 'memtest-filter',
'tgen-simple-mem', 'tgen-dram-ctrl'] 'tgen-simple-mem', 'tgen-dram-ctrl']
configs += ['learning-gem5-p1-simple', 'learning-gem5-p1-two-level']
if env['PROTOCOL'] != 'None': if env['PROTOCOL'] != 'None':
if env['PROTOCOL'] == 'MI_example': if env['PROTOCOL'] == 'MI_example':
configs += [c + "-ruby" for c in configs] configs += [c + "-ruby" for c in configs]

View file

@ -0,0 +1,11 @@
# A wrapper around configs/learning_gem5/part1/simple.py
# For some reason, this is implicitly needed by run.py
root = None
def run_test(root):
# Called from tests/run.py
# Execute the script we are wrapping
execfile('configs/learning_gem5/part1/simple.py')

View file

@ -0,0 +1,24 @@
# A wrapper around configs/learning_gem5/part1/two_level.py
# For some reason, this is implicitly needed by run.py
root = None
import m5
def run_test(root):
# Called from tests/run.py
# Add paths that we need
m5.util.addToPath('../configs/learning_gem5/part1')
m5.util.addToPath('../configs/common')
# 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:]
# Note: at this point, we could add options we want to test.
# For instance, sys.argv.append('--l2_size=512kB')
# Execute the script we are wrapping
execfile('configs/learning_gem5/part1/two_level.py')

View file

@ -0,0 +1,2 @@
# Empty to satisfy run.py