tests: Add test for the lupv example

Change-Id: Ib17f59b5b6ab9704be14e73d203bbab61caada90
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/53903
Reviewed-by: Jason Lowe-Power <power.jg@gmail.com>
Maintainer: Jason Lowe-Power <power.jg@gmail.com>
Tested-by: kokoro <noreply+kokoro@google.com>
This commit is contained in:
Bobby R. Bruce
2021-12-09 14:49:24 -08:00
committed by Bobby Bruce
parent 10dcd71716
commit 9bd3f9588a
2 changed files with 25 additions and 1 deletions

View File

@@ -64,6 +64,13 @@ parser.add_argument(
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 @@ root = Root(full_system=True, system=board)
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())

View File

@@ -174,3 +174,20 @@ gem5_verify_config(
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,
)