| 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 165 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 176 #endif | 176 #endif |
| 177 | 177 |
| 178 // NaCl glibc tests are included for x86 only, as there is no glibc support | 178 // NaCl glibc tests are included for x86 only, as there is no glibc support |
| 179 // for other architectures (ARM/MIPS). | 179 // for other architectures (ARM/MIPS). |
| 180 #if defined(ARCH_CPU_X86_FAMILY) | 180 #if defined(ARCH_CPU_X86_FAMILY) |
| 181 # define MAYBE_GLIBC(test_name) test_name | 181 # define MAYBE_GLIBC(test_name) test_name |
| 182 #else | 182 #else |
| 183 # define MAYBE_GLIBC(test_name) DISABLED_##test_name | 183 # define MAYBE_GLIBC(test_name) DISABLED_##test_name |
| 184 #endif | 184 #endif |
| 185 | 185 |
| 186 // ASan does not work with libc-free context, so disable the test. | 186 // Sanitizers internally use some syscalls which non-SFI NaCl disallows. |
| 187 #if defined(OS_LINUX) && !defined(ADDRESS_SANITIZER) | 187 #if defined(OS_LINUX) && !defined(ADDRESS_SANITIZER) && \ |
| 188 !defined(THREAD_SANITIZER) && !defined(MEMORY_SANITIZER) && \ |
| 189 !defined(LEAK_SANITIZER) |
| 188 # define MAYBE_NONSFI(test_case) test_case | 190 # define MAYBE_NONSFI(test_case) test_case |
| 189 #else | 191 #else |
| 190 # define MAYBE_NONSFI(test_case) DISABLED_##test_case | 192 # define MAYBE_NONSFI(test_case) DISABLED_##test_case |
| 191 #endif | 193 #endif |
| 192 | 194 |
| 193 // Currently, translation from pexe to non-sfi nexe is supported only for | 195 // Currently, translation from pexe to non-sfi nexe is supported only for |
| 194 // x86-32 binary. | 196 // x86-32 binary. |
| 195 #if defined(OS_LINUX) && defined(ARCH_CPU_X86) | 197 #if defined(OS_LINUX) && defined(ARCH_CPU_X86) |
| 196 # define MAYBE_PNACL_NONSFI(test_case) test_case | 198 # define MAYBE_PNACL_NONSFI(test_case) test_case |
| 197 #else | 199 #else |
| 198 # define MAYBE_PNACL_NONSFI(test_case) DISABLED_##test_case | 200 # define MAYBE_PNACL_NONSFI(test_case) DISABLED_##test_case |
| 199 #endif | 201 #endif |
| 200 | 202 |
| 201 #define NACL_BROWSER_TEST_F(suite, name, body) \ | 203 #define NACL_BROWSER_TEST_F(suite, name, body) \ |
| 202 IN_PROC_BROWSER_TEST_F(suite##Newlib, name) \ | 204 IN_PROC_BROWSER_TEST_F(suite##Newlib, name) \ |
| 203 body \ | 205 body \ |
| 204 IN_PROC_BROWSER_TEST_F(suite##GLibc, MAYBE_GLIBC(name)) \ | 206 IN_PROC_BROWSER_TEST_F(suite##GLibc, MAYBE_GLIBC(name)) \ |
| 205 body \ | 207 body \ |
| 206 IN_PROC_BROWSER_TEST_F(suite##Pnacl, MAYBE_PNACL(name)) \ | 208 IN_PROC_BROWSER_TEST_F(suite##Pnacl, MAYBE_PNACL(name)) \ |
| 207 body | 209 body |
| 208 | 210 |
| 209 #endif // CHROME_TEST_NACL_NACL_BROWSERTEST_UTIL_H_ | 211 #endif // CHROME_TEST_NACL_NACL_BROWSERTEST_UTIL_H_ |
| OLD | NEW |