2 * Copyright (c) 2012 The WebM project authors. All Rights Reserved.
4 * Use of this source code is governed by a BSD-style license
5 * that can be found in the LICENSE file in the root of the source
6 * tree. An additional intellectual property rights grant can be found
7 * in the file PATENTS. All contributing project authors may
8 * be found in the AUTHORS file in the root of the source tree.
11 #include "./vpx_config.h"
12 #if ARCH_X86 || ARCH_X86_64
13 #include "vpx_ports/x86.h"
17 extern void vp8_rtcd();
20 extern void vp9_rtcd();
23 #include "third_party/googletest/src/include/gtest/gtest.h"
25 static void append_negative_gtest_filter(const char *str) {
26 std::string filter = ::testing::FLAGS_gtest_filter;
27 // Negative patterns begin with one '-' followed by a ':' separated list.
28 if (filter.find('-') == std::string::npos) filter += '-';
30 ::testing::FLAGS_gtest_filter = filter;
33 int main(int argc, char **argv) {
34 ::testing::InitGoogleTest(&argc, argv);
36 #if ARCH_X86 || ARCH_X86_64
37 const int simd_caps = x86_simd_caps();
38 if (!(simd_caps & HAS_MMX))
39 append_negative_gtest_filter(":MMX/*");
40 if (!(simd_caps & HAS_SSE))
41 append_negative_gtest_filter(":SSE/*");
42 if (!(simd_caps & HAS_SSE2))
43 append_negative_gtest_filter(":SSE2/*");
44 if (!(simd_caps & HAS_SSE3))
45 append_negative_gtest_filter(":SSE3/*");
46 if (!(simd_caps & HAS_SSSE3))
47 append_negative_gtest_filter(":SSSE3/*");
48 if (!(simd_caps & HAS_SSE4_1))
49 append_negative_gtest_filter(":SSE4_1/*");
50 if (!(simd_caps & HAS_AVX))
51 append_negative_gtest_filter(":AVX/*");
52 if (!(simd_caps & HAS_AVX2))
53 append_negative_gtest_filter(":AVX2/*");
57 // Shared library builds don't support whitebox tests
58 // that exercise internal symbols.
68 return RUN_ALL_TESTS();