Only build append_negative_gtest_filter when it is used.

Change-Id: If6fec02fd8125b368ea83c99208575ac0d4a662b
This commit is contained in:
Johann 2015-09-01 12:47:43 -07:00
parent e5b76ba26e
commit 95633d0e80

View File

@ -26,6 +26,7 @@ extern void vpx_dsp_rtcd();
extern void vpx_scale_rtcd(); extern void vpx_scale_rtcd();
} }
#if ARCH_X86 || ARCH_X86_64
static void append_negative_gtest_filter(const char *str) { static void append_negative_gtest_filter(const char *str) {
std::string filter = ::testing::FLAGS_gtest_filter; std::string filter = ::testing::FLAGS_gtest_filter;
// Negative patterns begin with one '-' followed by a ':' separated list. // Negative patterns begin with one '-' followed by a ':' separated list.
@ -33,6 +34,7 @@ static void append_negative_gtest_filter(const char *str) {
filter += str; filter += str;
::testing::FLAGS_gtest_filter = filter; ::testing::FLAGS_gtest_filter = filter;
} }
#endif // ARCH_X86 || ARCH_X86_64
int main(int argc, char **argv) { int main(int argc, char **argv) {
::testing::InitGoogleTest(&argc, argv); ::testing::InitGoogleTest(&argc, argv);
@ -55,7 +57,7 @@ int main(int argc, char **argv) {
append_negative_gtest_filter(":AVX.*:AVX/*"); append_negative_gtest_filter(":AVX.*:AVX/*");
if (!(simd_caps & HAS_AVX2)) if (!(simd_caps & HAS_AVX2))
append_negative_gtest_filter(":AVX2.*:AVX2/*"); append_negative_gtest_filter(":AVX2.*:AVX2/*");
#endif #endif // ARCH_X86 || ARCH_X86_64
#if !CONFIG_SHARED #if !CONFIG_SHARED
// Shared library builds don't support whitebox tests // Shared library builds don't support whitebox tests