Bobby Bruce has submitted this change. (
https://gem5-review.googlesource.com/c/public/gem5/+/66613?usp=email )
Change subject: tests: Add missing `_pre_instantiate()`
......................................................................
tests: Add missing `_pre_instantiate()`
As of this change:
https://gem5-review.googlesource.com/c/public/gem5/+/65051, the
`_pre_instantiate` function must be called prior to `m5.instantiate`
when using the stdlib without the Simulator module. The
"test/gem5/replacement-policies/run_replacement_policy_test.py" lacked
this and was causing errors when running replacement policy tests.
In addition we also fix the incorrect type of size in`createArtifact'.
This was causing problems with the Kokoro build system.
The typing here was `int` but had a default value of `None`. The correct
type is therefore `Optional[int]`.
Change-Id: Ibaf63151196b15f68e643fa5c1b290439d6618c8
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/66371
Maintainer: Bobby Bruce <bbr...@ucdavis.edu>
Tested-by: kokoro <noreply+kok...@google.com>
Reviewed-by: Bobby Bruce <bbr...@ucdavis.edu>
(cherry picked from commit a3fd9631cc209914fad2e2c1fb24006d6d5adc2d)
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/66613
---
M tests/gem5/replacement-policies/run_replacement_policy_test.py
M util/gem5art/artifact/gem5art/artifact/artifact.py
2 files changed, 29 insertions(+), 1 deletion(-)
Approvals:
Bobby Bruce: Looks good to me, approved; Looks good to me, approved
kokoro: Regressions pass
diff --git a/tests/gem5/replacement-policies/run_replacement_policy_test.py
b/tests/gem5/replacement-policies/run_replacement_policy_test.py
index 1006109..31076c6 100644
--- a/tests/gem5/replacement-policies/run_replacement_policy_test.py
+++ b/tests/gem5/replacement-policies/run_replacement_policy_test.py
@@ -85,6 +85,7 @@
)
root = Root(full_system=False, system=motherboard)
+motherboard._pre_instantiate()
m5.instantiate()
generator.start_traffic()
diff --git a/util/gem5art/artifact/gem5art/artifact/artifact.py
b/util/gem5art/artifact/gem5art/artifact/artifact.py
index 91ffc64..46664e8 100644
--- a/util/gem5art/artifact/gem5art/artifact/artifact.py
+++ b/util/gem5art/artifact/gem5art/artifact/artifact.py
@@ -158,7 +158,7 @@
documentation: str,
inputs: List["Artifact"] = [],
architecture: str = "",
- size: int = None,
+ size: Optional[int] = None,
is_zipped: bool = False,
md5sum: str = "",
url: str = "",
--
To view, visit
https://gem5-review.googlesource.com/c/public/gem5/+/66613?usp=email
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: Ibaf63151196b15f68e643fa5c1b290439d6618c8
Gerrit-Change-Number: 66613
Gerrit-PatchSet: 6
Gerrit-Owner: Bobby Bruce <bbr...@ucdavis.edu>
Gerrit-Reviewer: Bobby Bruce <bbr...@ucdavis.edu>
Gerrit-Reviewer: Jarvis JIA <ji...@wisc.edu.test-google-a.com>
Gerrit-Reviewer: Jason Lowe-Power <ja...@lowepower.com>
Gerrit-Reviewer: Jason Lowe-Power <power...@gmail.com>
Gerrit-Reviewer: Matt Sinclair <mattdsincl...@gmail.com>
Gerrit-Reviewer: kokoro <noreply+kok...@google.com>
Gerrit-CC: Yu-hsin Wang <yuhsi...@google.com>
Gerrit-MessageType: merged
_______________________________________________
gem5-dev mailing list -- gem5-dev@gem5.org
To unsubscribe send an email to gem5-dev-le...@gem5.org