diff --git a/configs/example/gem5_library/checkpoints/simpoints-se-restore.py b/configs/example/gem5_library/checkpoints/simpoints-se-restore.py index 1a1bb05496..4d49d9d4e1 100644 --- a/configs/example/gem5_library/checkpoints/simpoints-se-restore.py +++ b/configs/example/gem5_library/checkpoints/simpoints-se-restore.py @@ -107,12 +107,13 @@ board.set_se_binary_workload( binary=Resource("x86-print-this"), arguments=["print this", 15000] ) -# configs/example/gem5_library/checkpoints/simpoints-se-checkpoint.py has to -# run before running this script. -# In here, it will get the path of the first SimPoint checkpoint taken by the -# simpoints-se-checkpoint.py -dir = Path("se_checkpoint_folder") -subfolder = [int(str(name).split(".")[1]) for name in dir.iterdir()] +# Here we obtain the checkpoints from gem5 resources, but these are generated +# from `configs/example/gem5_library/checkpoints/simpoints-se-checkpoint.py`.If +# run prior to this script the `dir = Path("se_checkpoint_folder")` line may be +# used. The resource is pulled so we may run this script as a test. +# dir = Path("se_checkpoint_folder") +dir = Path(Resource("simpoints-se-checkpoints-v22-1").get_local_path()) +subfolder = [int(str(name).rsplit(".", 1)[1]) for name in dir.iterdir()] dir = Path(dir / f"cpt.{min(subfolder)}").as_posix() 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 0acc1ae8e0..ee212ae455 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 @@ -86,6 +86,42 @@ gem5_verify_config( length=constants.quick_tag, ) +gem5_verify_config( + name="test-simpoints-se-checkpoint", + fixtures=(), + verifiers=(), + config=joinpath( + config.base_dir, + "configs", + "example", + "gem5_library", + "checkpoints", + "simpoints-se-checkpoint.py", + ), + config_args=[], + valid_isas=(constants.all_compiled_tag,), + valid_hosts=constants.supported_hosts, + length=constants.quick_tag, +) + +gem5_verify_config( + name="test-simpoints-se-restore", + fixtures=(), + verifiers=(), + config=joinpath( + config.base_dir, + "configs", + "example", + "gem5_library", + "checkpoints", + "simpoints-se-restore.py", + ), + config_args=[], + valid_isas=(constants.all_compiled_tag,), + valid_hosts=constants.supported_hosts, + length=constants.quick_tag, +) + if os.access("/dev/kvm", mode=os.R_OK | os.W_OK): # The x86-ubuntu-run uses KVM cores, this test will therefore only be run # on systems that support KVM.