[GWP-ASan] [Scudo] ifdef entire GWP-ASan tests.

Turns out that gtest in LLVM is only 1.8.0 (the newest version 1.10.0)
supports the GTEST_SKIP() macro, and apparently I didn't build w/o
GWP-ASan.

Should fix the GN bot, as well as any bots that may spuriously break on
platforms where the code wasn't correctly ifdef'd out as well.
This commit is contained in:
Mitch Phillips 2019-12-13 09:43:51 -08:00
parent 17063abd1e
commit a00cd6dfea
1 changed files with 2 additions and 4 deletions

View File

@ -118,11 +118,8 @@ TEST(ScudoFlagsTest, AllocatorFlags) {
EXPECT_EQ(2048, Flags.quarantine_max_chunk_size);
}
#ifdef GWP_ASAN_HOOKS
TEST(ScudoFlagsTest, GWPASanFlags) {
#ifndef GWP_ASAN_HOOKS
GTEST_SKIP() << "GWP-ASan wasn't built as part of Scudo Standalone.";
#endif // GWP_ASAN_HOOKS
scudo::FlagParser Parser;
scudo::Flags Flags;
scudo::registerFlags(&Parser, &Flags);
@ -134,3 +131,4 @@ TEST(ScudoFlagsTest, GWPASanFlags) {
EXPECT_FALSE(Flags.GWP_ASAN_InstallSignalHandlers);
EXPECT_EQ(1, Flags.GWP_ASAN_SampleRate);
}
#endif // GWP_ASAN_HOOKS