tests,arch-arm: Pass gem5_root as an arg in run.py

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>
diff --git a/tests/gem5/fs/linux/arm/run.py b/tests/gem5/fs/linux/arm/run.py
index f0ba9bd..a0d782b 100644
--- a/tests/gem5/fs/linux/arm/run.py
+++ b/tests/gem5/fs/linux/arm/run.py
@@ -57,9 +57,9 @@
 
 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'))
diff --git a/tests/gem5/fs/linux/arm/test.py b/tests/gem5/fs/linux/arm/test.py
index 80a2af6..33ca33e 100644
--- a/tests/gem5/fs/linux/arm/test.py
+++ b/tests/gem5/fs/linux/arm/test.py
@@ -97,7 +97,8 @@
 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_long_tests:
     args = [
         joinpath(config.base_dir, 'tests', 'gem5', 'configs', name + '.py'),
-        path
+        path,
+        config.base_dir
     ]
     gem5_verify_config(
         name=name,