tests: Fix ExcludeInterleavingRanges test for .fast comp
Change-Id: Ie3ebfc0caa52f11649f479066022734ac82e6d1b Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/49065 Maintainer: Bobby R. Bruce <bbruce@ucdavis.edu> Maintainer: Daniel Carvalho <odanrc@yahoo.com.br> Reviewed-by: Daniel Carvalho <odanrc@yahoo.com.br> Tested-by: kokoro <noreply+kokoro@google.com>
This commit is contained in:
@@ -1416,6 +1416,16 @@ TEST(AddrRangeTest, MultipleExclusionUnsorted)
|
||||
*/
|
||||
TEST(AddrRangeDeathTest, ExcludeInterleavingRanges)
|
||||
{
|
||||
/* An `assert(!interleaved());` exists at the top of the `exclude(...)`
|
||||
* method. This means EXPECT_DEATH will only function when DEBUG is enabled
|
||||
* (as when compiled to `.opt`). When disabled (as when compiled to `.fast`),
|
||||
* `r.exclude` fails more catastrophically via a `panic` which GTest cannot
|
||||
* handle correctly. We therefore include a `#ifdef NDEBUG` guard so this
|
||||
* test is skipped when DEBUG is disabled.
|
||||
*/
|
||||
#ifdef NDEBUG
|
||||
GTEST_SKIP() << "Skipping as assetions are stripped from fast builds.";
|
||||
#endif
|
||||
const std::vector<AddrRange> exclude_ranges{
|
||||
AddrRange(0x180, 0x210),
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user