Sean Wilson has uploaded this change for review. ( https://gem5-review.googlesource.com/4422

Change subject: tests: Add a simple example test
......................................................................

tests: Add a simple example test

Change-Id: I0753db61d6344b9ed95c0d90a1ab097de7e2af12
Signed-off-by: Sean Wilson <[email protected]>
---
A tests/gem5/example/ref/X86/linux/se-default/simout
A tests/gem5/example/test_basic_example.py
2 files changed, 32 insertions(+), 0 deletions(-)



diff --git a/tests/gem5/example/ref/X86/linux/se-default/simout b/tests/gem5/example/ref/X86/linux/se-default/simout
new file mode 100644
index 0000000..109b754
--- /dev/null
+++ b/tests/gem5/example/ref/X86/linux/se-default/simout
@@ -0,0 +1,8 @@
+gem5 Simulator System.  http://gem5.org
+gem5 is copyrighted software; use the --copyright option for details.
+
+
+Global frequency set at 1000000000000 ticks per second
+**** REAL SIMULATION ****
+Hello world!
+Exiting @ tick 5891000 because exiting with last active thread context
diff --git a/tests/gem5/example/test_basic_example.py b/tests/gem5/example/test_basic_example.py
new file mode 100644
index 0000000..ae88378
--- /dev/null
+++ b/tests/gem5/example/test_basic_example.py
@@ -0,0 +1,24 @@
+'''
+Test file for the util m5 exit assembly instruction.
+'''
+from testlib import *
+
+ref_path = joinpath(getcwd(), 'ref', 'X86', 'linux', 'se-default')
+
+verifiers = (
+        verifier.MatchStdout(joinpath(ref_path, 'simout')),
+
+ # The se.py script is dumb and sets a strange return code on success.
+        verifier.VerifyReturncode(1),
+)
+
+hello_program = TestProgram('hello', 'X86', 'linux')
+
+gem5_verify_config(
+        name='test_hello',
+        fixtures=(hello_program,),
+        verifiers=verifiers,
+        config=joinpath(config.base_dir, 'configs', 'example','se.py'),
+        config_args=['--cmd', hello_program.path],
+        valid_isas=('X86',)
+)

--
To view, visit https://gem5-review.googlesource.com/4422
To unsubscribe, or for help writing mail filters, visit https://gem5-review.googlesource.com/settings

Gerrit-Project: public/gem5
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: I0753db61d6344b9ed95c0d90a1ab097de7e2af12
Gerrit-Change-Number: 4422
Gerrit-PatchSet: 1
Gerrit-Owner: Sean Wilson <[email protected]>
_______________________________________________
gem5-dev mailing list
[email protected]
http://m5sim.org/mailman/listinfo/gem5-dev

Reply via email to