| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef CHROME_TEST_NACL_NACL_BROWSERTEST_UTIL_H_ | 5 #ifndef CHROME_TEST_NACL_NACL_BROWSERTEST_UTIL_H_ |
| 6 #define CHROME_TEST_NACL_NACL_BROWSERTEST_UTIL_H_ | 6 #define CHROME_TEST_NACL_NACL_BROWSERTEST_UTIL_H_ |
| 7 | 7 |
| 8 #include "base/files/file_path.h" | 8 #include "base/files/file_path.h" |
| 9 #include "base/memory/scoped_ptr.h" | 9 #include "base/memory/scoped_ptr.h" |
| 10 #include "chrome/test/base/in_process_browser_test.h" | 10 #include "chrome/test/base/in_process_browser_test.h" |
| (...skipping 156 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 167 // and sometimes time out. Disable until it is made faster: | 167 // and sometimes time out. Disable until it is made faster: |
| 168 // https://code.google.com/p/chromium/issues/detail?id=177555 | 168 // https://code.google.com/p/chromium/issues/detail?id=177555 |
| 169 #if (defined(OS_WIN) && !defined(NDEBUG)) | 169 #if (defined(OS_WIN) && !defined(NDEBUG)) |
| 170 # define MAYBE_PNACL(test_name) DISABLED_##test_name | 170 # define MAYBE_PNACL(test_name) DISABLED_##test_name |
| 171 #else | 171 #else |
| 172 # define MAYBE_PNACL(test_name) test_name | 172 # define MAYBE_PNACL(test_name) test_name |
| 173 #endif | 173 #endif |
| 174 | 174 |
| 175 // NaCl glibc tests are included for x86 only, as there is no glibc support | 175 // NaCl glibc tests are included for x86 only, as there is no glibc support |
| 176 // for other architectures (ARM/MIPS). | 176 // for other architectures (ARM/MIPS). |
| 177 #if defined(ARCH_CPU_X86_FAMILY) | 177 #if defined(ARCH_CPU_X86_FAMILY) && \ |
| 178 !defined(DISABLE_NACL_BROWSERTESTS) |
| 178 # define MAYBE_GLIBC(test_name) test_name | 179 # define MAYBE_GLIBC(test_name) test_name |
| 179 #else | 180 #else |
| 180 # define MAYBE_GLIBC(test_name) DISABLED_##test_name | 181 # define MAYBE_GLIBC(test_name) DISABLED_##test_name |
| 181 #endif | 182 #endif |
| 182 | 183 |
| 183 // Currently, we only support it on x86-32 or ARM architecture. | 184 // Currently, we only support it on x86-32 or ARM architecture. |
| 184 // TODO(hidehiko,mazda): Enable this on x86-64, too, when it is supported. | 185 // TODO(hidehiko,mazda): Enable this on x86-64, too, when it is supported. |
| 185 #if defined(OS_LINUX) && !defined(ADDRESS_SANITIZER) && \ | 186 #if defined(OS_LINUX) && !defined(ADDRESS_SANITIZER) && \ |
| 186 !defined(THREAD_SANITIZER) && !defined(MEMORY_SANITIZER) && \ | 187 !defined(THREAD_SANITIZER) && !defined(MEMORY_SANITIZER) && \ |
| 187 !defined(LEAK_SANITIZER) && \ | 188 !defined(LEAK_SANITIZER) && \ |
| 188 (defined(ARCH_CPU_X86) || defined(ARCH_CPU_ARMEL)) | 189 (defined(ARCH_CPU_X86) || defined(ARCH_CPU_ARMEL)) |
| 189 # define MAYBE_NONSFI(test_case) test_case | 190 # define MAYBE_NONSFI(test_case) test_case |
| 190 #else | 191 #else |
| 191 # define MAYBE_NONSFI(test_case) DISABLED_##test_case | 192 # define MAYBE_NONSFI(test_case) DISABLED_##test_case |
| 192 #endif | 193 #endif |
| 193 | 194 |
| 194 // Similar to MAYBE_NONSFI, this is available only on x86-32, x86-64 or | 195 // Similar to MAYBE_NONSFI, this is available only on x86-32, x86-64 or |
| 195 // ARM linux. | 196 // ARM linux. |
| 196 #if defined(OS_LINUX) && \ | 197 #if defined(OS_LINUX) && \ |
| 197 (defined(ARCH_CPU_X86_FAMILY) || defined(ARCH_CPU_ARMEL)) | 198 (defined(ARCH_CPU_X86_FAMILY) || defined(ARCH_CPU_ARMEL)) && \ |
| 199 !defined(DISABLE_NACL_BROWSERTESTS) |
| 198 # define MAYBE_PNACL_NONSFI(test_case) test_case | 200 # define MAYBE_PNACL_NONSFI(test_case) test_case |
| 199 #else | 201 #else |
| 200 # define MAYBE_PNACL_NONSFI(test_case) DISABLED_##test_case | 202 # define MAYBE_PNACL_NONSFI(test_case) DISABLED_##test_case |
| 201 #endif | 203 #endif |
| 202 | 204 |
| 203 | 205 |
| 204 #define NACL_BROWSER_TEST_F(suite, name, body) \ | 206 #define NACL_BROWSER_TEST_F(suite, name, body) \ |
| 205 IN_PROC_BROWSER_TEST_F(suite##Newlib, name) \ | 207 IN_PROC_BROWSER_TEST_F(suite##Newlib, name) \ |
| 206 body \ | 208 body \ |
| 207 IN_PROC_BROWSER_TEST_F(suite##GLibc, MAYBE_GLIBC(name)) \ | 209 IN_PROC_BROWSER_TEST_F(suite##GLibc, MAYBE_GLIBC(name)) \ |
| 208 body \ | 210 body \ |
| 209 IN_PROC_BROWSER_TEST_F(suite##Pnacl, MAYBE_PNACL(name)) \ | 211 IN_PROC_BROWSER_TEST_F(suite##Pnacl, MAYBE_PNACL(name)) \ |
| 210 body | 212 body |
| 211 | 213 |
| 212 #endif // CHROME_TEST_NACL_NACL_BROWSERTEST_UTIL_H_ | 214 #endif // CHROME_TEST_NACL_NACL_BROWSERTEST_UTIL_H_ |
| OLD | NEW |