Hello Ciro Santilli,
I'd like you to do a code review. Please visit
https://gem5-review.googlesource.com/c/public/gem5/+/24528
to review the following change.
Change subject: tests: hello_se using dynamic tag
......................................................................
tests: hello_se using dynamic tag
This patch is rewriting hello_se to distinguish between statically and
dynamically linked hello worlds.
Change-Id: I03c1add1d1ca568d150f4bacd89b2838a6d27035
Signed-off-by: Giacomo Travaglini <giacomo.travagl...@arm.com>
Reviewed-by: Ciro Santilli <ciro.santi...@arm.com>
---
M tests/gem5/hello_se/test_hello_se.py
1 file changed, 32 insertions(+), 20 deletions(-)
diff --git a/tests/gem5/hello_se/test_hello_se.py
b/tests/gem5/hello_se/test_hello_se.py
index 74d7fb1..b6b78f0 100644
--- a/tests/gem5/hello_se/test_hello_se.py
+++ b/tests/gem5/hello_se/test_hello_se.py
@@ -43,8 +43,8 @@
'''
from testlib import *
-test_progs = {
- 'x86': ('hello64-static', 'hello64-dynamic', 'hello32-static'),
+static_progs = {
+ 'x86': ('hello64-static', 'hello32-static'),
'arm': ('hello64-static', 'hello32-static'),
'alpha': ('hello',),
'mips': ('hello',),
@@ -52,6 +52,10 @@
'sparc': ('hello',)
}
+dynamic_progs = {
+ 'x86': ('hello64-dynamic',)
+}
+
if config.bin_path:
base_path = config.bin_path
else:
@@ -59,24 +63,32 @@
'bin')
urlbase = 'http://dist.gem5.org/dist/current/test-progs/hello/bin/'
-for isa in test_progs:
- for binary in test_progs[isa]:
- import os
- url = urlbase + isa + '/linux/' + binary
- path = joinpath(base_path, isa, 'linux')
- hello_program = DownloadedProgram(url, path, binary)
+ref_path = joinpath(getcwd(), 'ref')
+verifiers = (
+ verifier.MatchStdoutNoPerf(joinpath(ref_path, 'simout')),
+)
- ref_path = joinpath(getcwd(), 'ref')
+def verify_config(isa, binary, compilation):
+ url = urlbase + isa + '/linux/' + binary
+ path = joinpath(base_path, isa, 'linux')
+ hello_program = DownloadedProgram(url, path, binary)
- verifiers = (
- verifier.MatchStdoutNoPerf(joinpath(ref_path, 'simout')),
- )
+ gem5_verify_config(
+ name='test-'+binary,
+ fixtures=(hello_program,),
+ verifiers=verifiers,
+ config=joinpath(config.base_dir, 'configs', 'example','se.py'),
+ config_args=['--cmd', joinpath(path, binary)],
+ valid_isas=(isa.upper(),),
+ compilation=compilation,
+ )
- gem5_verify_config(
- name='test-'+binary,
- fixtures=(hello_program,),
- verifiers=verifiers,
-
config=joinpath(config.base_dir, 'configs', 'example','se.py'),
- config_args=['--cmd', joinpath(path, binary)],
- valid_isas=(isa.upper(),),
- )
+# Run statically linked hello worlds
+for isa in static_progs:
+ for binary in static_progs[isa]:
+ verify_config(isa, binary, constants.static_tag)
+
+# Run dynamically linked hello worlds
+for isa in dynamic_progs:
+ for binary in dynamic_progs[isa]:
+ verify_config(isa, binary, constants.dynamic_tag)
--
To view, visit https://gem5-review.googlesource.com/c/public/gem5/+/24528
To unsubscribe, or for help writing mail filters, visit
https://gem5-review.googlesource.com/settings
Gerrit-Project: public/gem5
Gerrit-Branch: master
Gerrit-Change-Id: I03c1add1d1ca568d150f4bacd89b2838a6d27035
Gerrit-Change-Number: 24528
Gerrit-PatchSet: 1
Gerrit-Owner: Giacomo Travaglini <giacomo.travagl...@arm.com>
Gerrit-Reviewer: Ciro Santilli <ciro.santi...@arm.com>
Gerrit-MessageType: newchange
_______________________________________________
gem5-dev mailing list
gem5-dev@gem5.org
http://m5sim.org/mailman/listinfo/gem5-dev