Bobby Bruce has uploaded this change for review. ( https://gem5-review.googlesource.com/c/public/gem5/+/53903 )

Change subject: tests: Add test for the lupv example
......................................................................

tests: Add test for the lupv example

Change-Id: Ib17f59b5b6ab9704be14e73d203bbab61caada90
---
M configs/example/lupv/run_lupv.py
M tests/gem5/gem5_library_example_tests/test_gem5_library_examples.py
2 files changed, 34 insertions(+), 1 deletion(-)



diff --git a/configs/example/lupv/run_lupv.py b/configs/example/lupv/run_lupv.py
index 721adcd..93eaa86 100644
--- a/configs/example/lupv/run_lupv.py
+++ b/configs/example/lupv/run_lupv.py
@@ -64,6 +64,13 @@
 parser.add_argument(
     "num_cpus", type=int, help="The number of CPU in the system"
 )
+parser.add_argument(
+    "--max-ticks",
+    type=int,
+    required=False,
+    default=m5.MaxTick,
+    help="The maximum number of ticks to simulate. Used for testing.",
+)

 args = parser.parse_args()

@@ -105,7 +112,7 @@
 m5.instantiate()
 print("Beginning simulation!")

-exit_event = m5.simulate()
+exit_event = m5.simulate(args.max_ticks)

 print(
"Exiting @ tick {} because {}.".format(m5.curTick(), exit_event.getCause()) diff --git a/tests/gem5/gem5_library_example_tests/test_gem5_library_examples.py b/tests/gem5/gem5_library_example_tests/test_gem5_library_examples.py
index 8b0c48b..2aca184 100644
--- a/tests/gem5/gem5_library_example_tests/test_gem5_library_examples.py
+++ b/tests/gem5/gem5_library_example_tests/test_gem5_library_examples.py
@@ -174,3 +174,20 @@
     valid_hosts=constants.supported_hosts,
     length=constants.long_tag,
 )
+
+gem5_verify_config(
+    name="test-lupv-example",
+    fixtures=(),
+    verifiers=(),
+    config=joinpath(
+        config.base_dir,
+        "configs",
+        "example",
+        "lupv",
+        "run_lupv.py",
+    ),
+    config_args=["timing", "1", "--max-ticks", "1000000000"],
+    valid_isas=(constants.riscv_tag,),
+    valid_hosts=constants.supported_hosts,
+    length=constants.long_tag,
+)

--
To view, visit https://gem5-review.googlesource.com/c/public/gem5/+/53903
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: Ib17f59b5b6ab9704be14e73d203bbab61caada90
Gerrit-Change-Number: 53903
Gerrit-PatchSet: 1
Gerrit-Owner: Bobby Bruce <[email protected]>
Gerrit-MessageType: newchange
_______________________________________________
gem5-dev mailing list -- [email protected]
To unsubscribe send an email to [email protected]
%(web_page_url)slistinfo%(cgiext)s/%(_internal_name)s

Reply via email to