tests: Add --bin-path option to insttest regressions
authorGiacomo Travaglini <giacomo.travaglini@arm.com>
Mon, 9 Mar 2020 10:17:45 +0000 (10:17 +0000)
committerGiacomo Travaglini <giacomo.travaglini@arm.com>
Thu, 19 Mar 2020 22:40:09 +0000 (22:40 +0000)
Change-Id: I229f37782b1c3650dc71ee481823b41f6f67e590
Signed-off-by: Giacomo Travaglini <giacomo.travaglini@arm.com>
Reviewed-by: Nikos Nikoleris <nikos.nikoleris@arm.com>
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/26483
Maintainer: Bobby R. Bruce <bbruce@ucdavis.edu>
Maintainer: Jason Lowe-Power <power.jg@gmail.com>
Tested-by: kokoro <noreply+kokoro@google.com>
Reviewed-by: Jason Lowe-Power <power.jg@gmail.com>
tests/gem5/insttest_se/test.py

index e81f943b2585fbe45d8531b05b045244c592d60a..c3fa3225cc0a8c8b426be10357b4f5466bccf865 100644 (file)
@@ -46,14 +46,19 @@ supported_os = {
     'sparc' : ('linux',)
 }
 
+if config.bin_path:
+    base_path = config.bin_path
+else:
+    base_path = joinpath(absdirpath(__file__), '..', 'test-progs')
+
 urlbase = 'http://dist.gem5.org/dist/current/test-progs/insttest/bin/'
 for isa in test_progs:
     for binary in test_progs[isa]:
         for  operating_s in supported_os[isa]:
             import os
             url = urlbase + isa + '/' + operating_s + '/' + binary
-            path = joinpath(absdirpath(__file__), '..', 'test-progs', binary,
-                'bin', isa, operating_s)
+            path = joinpath(base_path, isa, operating_s, binary)
+
             try:
                 program = DownloadedProgram(url, path, binary)
             except: