tests: Add realview64-kvm.py test to quick regressions

By using the valid_host parameter we can make sure the test is
run on a aarch64 host only

Signed-off-by: Giacomo Travaglini <giacomo.travaglini@arm.com>
Change-Id: I3cdb35967e85377f26adf73ad147cb2479162ca1
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/31219
Tested-by: kokoro <noreply+kokoro@google.com>
Reviewed-by: Jason Lowe-Power <power.jg@gmail.com>
Reviewed-by: Andreas Sandberg <andreas.sandberg@arm.com>
Maintainer: Jason Lowe-Power <power.jg@gmail.com>
This commit is contained in:
Giacomo Travaglini
2020-07-13 15:16:56 +01:00
parent 6f64f6f1e2
commit c306cb071f

View File

@@ -41,6 +41,10 @@ from os.path import join as joinpath
from testlib import *
arm_fs_kvm_tests = [
'realview64-kvm',
]
arm_fs_quick_tests = [
'realview64-simple-atomic',
'realview64-simple-atomic-dual',
@@ -49,7 +53,7 @@ arm_fs_quick_tests = [
'realview64-simple-timing-dual',
'realview64-switcheroo-atomic',
'realview64-switcheroo-timing',
]
] + arm_fs_kvm_tests
arm_fs_long_tests = [
'realview-simple-atomic',
@@ -94,7 +98,21 @@ filepath = os.path.dirname(os.path.abspath(__file__))
path = joinpath(config.bin_path, 'arm')
arm_fs_binaries = DownloadedArchive(url, path, tarball)
def support_kvm():
return os.access("/dev/kvm", os.R_OK | os.W_OK)
for name in arm_fs_quick_tests:
if name in arm_fs_kvm_tests:
# The current host might not be supporting KVM
# Skip the test if that's the case
if not support_kvm():
continue
# Run KVM test if we are on an arm host only
valid_hosts = (constants.host_arm_tag,)
else:
valid_hosts = constants.supported_hosts
args = [
joinpath(config.base_dir, 'tests', 'gem5', 'configs', name + '.py'),
path,
@@ -107,6 +125,7 @@ for name in arm_fs_quick_tests:
config_args=args,
valid_isas=(constants.arm_tag,),
length=constants.quick_tag,
valid_hosts=valid_hosts,
fixtures=(arm_fs_binaries,)
)