From a00cd6dfea9f071c042c1eacd3ed9b587fe44feb Mon Sep 17 00:00:00 2001 From: Mitch Phillips <31459023+hctim@users.noreply.github.com> Date: Fri, 13 Dec 2019 09:43:51 -0800 Subject: [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. --- compiler-rt/lib/scudo/standalone/tests/flags_test.cpp | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'compiler-rt/lib/scudo/standalone/tests/flags_test.cpp') diff --git a/compiler-rt/lib/scudo/standalone/tests/flags_test.cpp b/compiler-rt/lib/scudo/standalone/tests/flags_test.cpp index 85ae422e70f..0205052edd2 100644 --- a/compiler-rt/lib/scudo/standalone/tests/flags_test.cpp +++ b/compiler-rt/lib/scudo/standalone/tests/flags_test.cpp @@ -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 -- cgit v1.2.3