os.pardir))
defaults.result_path = os.path.join(os.getcwd(), '.testing-results')
defaults.resource_url = 'http://dist.gem5.org/dist/develop'
+ defaults.resource_path = os.path.abspath(os.path.join(defaults.base_dir,
+ 'tests',
+ 'gem5',
+ 'resources'))
def define_constants(constants):
'''
Argument(
'--bin-path',
action='store',
- default=None,
- help='Path where binaries are stored (downloaded if not present)'
+ default=config._defaults.resource_path,
+ help='Path where resources are stored (downloaded if not present)'
),
Argument(
'--resource-url',
.testing-results
-gem5/cpu_tests/benchmarks
-gem5/fs/linux/arm/*.tar.bz2
-gem5/fs/linux/arm/binaries
-gem5/fs/linux/arm/disks
-gem5/test-progs
gem5/resources
'riscv': ('AtomicSimpleCPU', 'TimingSimpleCPU', 'MinorCPU', 'DerivO3CPU'),
}
-if config.bin_path:
- base_path = config.bin_path
-else:
- base_path = joinpath(absdirpath(__file__), 'benchmarks', 'bin')
+base_path = joinpath(config.bin_path, 'cpu_tests')
base_url = config.resource_url + '/gem5/cpu_tests/benchmarks/bin/'
for isa in valid_isas:
class TestProgram(MakeTarget):
def __init__(self, program, isa, os, recompile=False):
- make_dir = joinpath('test-progs', program)
+ make_dir = joinpath(config.bin_dir, program)
make_fixture = MakeFixture(make_dir)
target = joinpath('bin', isa, os, program)
super(TestProgram, self).__init__(target, make_fixture)
tarball = 'aarch-system-201901106.tar.bz2'
url = config.resource_url + "/arm/" + tarball
filepath = os.path.dirname(os.path.abspath(__file__))
-path = config.bin_path if config.bin_path else filepath
+path = joinpath(config.bin_path, 'arm')
arm_fs_binaries = DownloadedArchive(url, path, tarball)
for name in arm_fs_quick_tests:
'sparc' : constants.long_tag,
}
-if config.bin_path:
- base_path = config.bin_path
-else:
- base_path = joinpath(absdirpath(__file__), '..', 'test-progs', 'hello',
- 'bin')
+base_path = joinpath(config.bin_path, 'hello')
urlbase = config.resource_url + '/test-progs/hello/bin/'
'sparc' : ('linux',)
}
-if config.bin_path:
- base_path = config.bin_path
-else:
- base_path = joinpath(absdirpath(__file__), '..', 'test-progs')
+base_path = joinpath(config.bin_path, 'insttest')
urlbase = config.resource_url + '/test-progs/insttest/bin/'
for isa in test_progs:
r'Exiting @ tick \d* because m5_exit instruction encountered'
)
-if config.bin_path:
- path = config.bin_path
-else:
- path = joinpath(absdirpath(__file__), '..',
- 'test-progs', 'hello', 'bin', 'x86', 'linux')
+path = joinpath(config.bin_path, 'test-progs', 'hello', 'bin', 'x86', 'linux')
filename = 'm5_exit'
url = (config.resource_url + '/test-progs/m5-exit/bin/x86/linux/m5_exit')
test_program = DownloadedProgram(url, path, filename)
# 'TimingSimpleCPU',
)
-if config.bin_path:
- base_path = config.bin_path
-else:
- base_path = joinpath(absdirpath(__file__), '..', 'test-progs',
- 'test_atomic', 'bin')
+base_path = joinpath(config.bin_path, 'pthreads', 'sparc64')
binary = 'test_atomic'
url = config.resource_url + '/test-progs/pthreads/sparc64/' + binary