tests,arch-arm: Pass gem5_root as an arg in run.py
authorBobby R. Bruce <bbruce@ucdavis.edu>
Tue, 1 Sep 2020 21:06:49 +0000 (14:06 -0700)
committerBobby R. Bruce <bbruce@ucdavis.edu>
Fri, 4 Sep 2020 20:10:45 +0000 (20:10 +0000)
Previously `tests/gem5/fs/linux/arm/run.py` contained an ugly,
hard-coded `gem5_root` variable. In this commit we pass `gem5_root`
as an argument from `tests/gem5/fs/linux/arm/test.py`, utilizing
`config.base_dir`.

Change-Id: I2b1e3369b1078cce9375fadb7c39fa4292648658
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/33955
Reviewed-by: Jason Lowe-Power <power.jg@gmail.com>
Tested-by: kokoro <noreply+kokoro@google.com>
Maintainer: Jason Lowe-Power <power.jg@gmail.com>

tests/gem5/fs/linux/arm/run.py
tests/gem5/fs/linux/arm/test.py

index f0ba9bd68fa1b7c16f9111dee65c082901f0165e..a0d782bcd46cb3d25542a4de75cc2efef20a44ca 100644 (file)
@@ -57,9 +57,9 @@ def run_test(root):
 
 config = sys.argv[1]
 os.environ['M5_PATH'] = sys.argv[2]
+gem5_root = sys.argv[3]
 
 # path setup
-gem5_root = joinpath(os.path.dirname(__file__), '..', '..', '..', '..', '..')
 sys.path.append(joinpath(gem5_root, 'configs'))
 tests_root = joinpath(gem5_root, 'tests')
 sys.path.append(joinpath(tests_root, 'gem5', 'configs'))
index 80a2af69e9bc775afe765d31a421fe1d89dcc2b5..33ca33e4dd3f47c84d1ff3499f5af0092a4d55b1 100644 (file)
@@ -97,7 +97,8 @@ arm_fs_binaries = DownloadedArchive(url, path, tarball)
 for name in arm_fs_quick_tests:
     args = [
         joinpath(config.base_dir, 'tests', 'gem5', 'configs', name + '.py'),
-        path
+        path,
+        config.base_dir
     ]
     gem5_verify_config(
         name=name,
@@ -112,7 +113,8 @@ for name in arm_fs_quick_tests:
 for name in arm_fs_long_tests:
     args = [
         joinpath(config.base_dir, 'tests', 'gem5', 'configs', name + '.py'),
-        path
+        path,
+        config.base_dir
     ]
     gem5_verify_config(
         name=name,