Bobby R. Bruce has submitted this change. (
https://gem5-review.googlesource.com/c/public/gem5/+/49555 )
24 is the latest approved patch-set.
No files were changed between the latest approved patch-set and the
submitted one.
Change subject: tests: Update the insttest to use simple_binary_run.py
......................................................................
tests: Update the insttest to use simple_binary_run.py
In addition, test.py has been formatted with Python black.
Change-Id: If813c80e15a019502c60ab09fb62484fc2cdf0c6
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/49555
Tested-by: kokoro <[email protected]>
Reviewed-by: Jason Lowe-Power <[email protected]>
Maintainer: Jason Lowe-Power <[email protected]>
---
R tests/gem5/insttest_se/ref/simout
M tests/gem5/insttest_se/test.py
2 files changed, 33 insertions(+), 43 deletions(-)
Approvals:
Jason Lowe-Power: Looks good to me, approved; Looks good to me, approved
kokoro: Regressions pass
diff --git a/tests/gem5/insttest_se/ref/sparc/linux/insttest/simout
b/tests/gem5/insttest_se/ref/simout
similarity index 90%
rename from tests/gem5/insttest_se/ref/sparc/linux/insttest/simout
rename to tests/gem5/insttest_se/ref/simout
index 81a0b92..52e98ca 100644
--- a/tests/gem5/insttest_se/ref/sparc/linux/insttest/simout
+++ b/tests/gem5/insttest_se/ref/simout
@@ -1,5 +1,4 @@
Global frequency set at 1000000000000 ticks per second
-**** REAL SIMULATION ****
Begining test of difficult SPARC instructions...
LDSTUB: Passed
SWAP: Passed
diff --git a/tests/gem5/insttest_se/test.py b/tests/gem5/insttest_se/test.py
index 0d86f47..3dd9a33 100644
--- a/tests/gem5/insttest_se/test.py
+++ b/tests/gem5/insttest_se/test.py
@@ -24,55 +24,46 @@
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-'''
+"""
Test file for the insttest binary running on the SPARC ISA
-'''
+"""
from testlib import *
-test_progs = {
- constants.sparc_tag : ('insttest',)
-}
+test_progs = {constants.sparc_tag: ("sparc-insttest",)}
-cpu_types = {
- constants.sparc_tag : ('AtomicSimpleCPU', 'TimingSimpleCPU')
-}
+cpu_types = {constants.sparc_tag: ("atomic", "timing")}
-supported_os = {
- constants.sparc_tag : ('linux',)
-}
+if config.bin_path:
+ resource_path = config.bin_path
+else:
+ resource_path = joinpath(absdirpath(__file__), "..", "resources")
-base_path = joinpath(config.bin_path, 'insttest')
-
-urlbase = config.resource_url + '/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.lower() + '/' + operating_s + '/' + binary
- path = joinpath(base_path, isa.lower(), operating_s, binary)
+ ref_path = joinpath(getcwd(), "ref", binary)
+ verifiers = (
+ verifier.MatchStdoutNoPerf(joinpath(ref_path, "simout")),
+ )
- try:
- program = DownloadedProgram(url, path, binary)
- except:
- continue
-
- ref_path = joinpath(
- getcwd(), 'ref', isa.lower(), operating_s, binary
+ for cpu in cpu_types[isa]:
+ gem5_verify_config(
+ name="test-" + binary + "-" + cpu,
+ fixtures=(),
+ verifiers=verifiers,
+ config=joinpath(
+ config.base_dir,
+ "configs",
+ "example",
+ "components-library",
+ "simple_binary_run.py",
+ ),
+ config_args=[
+ binary,
+ cpu,
+ "--override-download",
+ "--resource-directory",
+ resource_path,
+ ],
+ valid_isas=(isa,),
+ length=constants.long_tag,
)
- verifiers = (
- verifier.MatchStdoutNoPerf(joinpath(ref_path, 'simout')),
- )
-
- for cpu in cpu_types[isa]:
-
- gem5_verify_config(
- name='test-'+binary + '-' + operating_s + '-' + cpu,
- fixtures=(program,),
- verifiers=verifiers,
- config=joinpath(config.base_dir, 'configs',
- 'example','se.py'),
- config_args=['--cmd', joinpath(path, binary),
- '--cpu-type', cpu, '--caches'],
- valid_isas=(isa,),
- length = constants.long_tag,
- )
--
To view, visit https://gem5-review.googlesource.com/c/public/gem5/+/49555
To unsubscribe, or for help writing mail filters, visit
https://gem5-review.googlesource.com/settings
Gerrit-Project: public/gem5
Gerrit-Branch: develop
Gerrit-Change-Id: If813c80e15a019502c60ab09fb62484fc2cdf0c6
Gerrit-Change-Number: 49555
Gerrit-PatchSet: 26
Gerrit-Owner: Bobby R. Bruce <[email protected]>
Gerrit-Reviewer: Bobby R. Bruce <[email protected]>
Gerrit-Reviewer: Jason Lowe-Power <[email protected]>
Gerrit-Reviewer: kokoro <[email protected]>
Gerrit-MessageType: merged
_______________________________________________
gem5-dev mailing list -- [email protected]
To unsubscribe send an email to [email protected]
%(web_page_url)slistinfo%(cgiext)s/%(_internal_name)s