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 SANDBOX_LINUX_TESTS_UNIT_TESTS_H__ | 5 #ifndef SANDBOX_LINUX_TESTS_UNIT_TESTS_H__ |
6 #define SANDBOX_LINUX_TESTS_UNIT_TESTS_H__ | 6 #define SANDBOX_LINUX_TESTS_UNIT_TESTS_H__ |
7 | 7 |
8 #include "base/basictypes.h" | 8 #include "base/basictypes.h" |
9 #include "build/build_config.h" | 9 #include "build/build_config.h" |
10 #include "sandbox/linux/tests/sandbox_test_runner_function_pointer.h" | 10 #include "sandbox/linux/tests/sandbox_test_runner_function_pointer.h" |
(...skipping 20 matching lines...) Expand all Loading... |
31 #else | 31 #else |
32 #define DISABLE_ON_LSAN(test_name) test_name | 32 #define DISABLE_ON_LSAN(test_name) test_name |
33 #endif | 33 #endif |
34 | 34 |
35 #if defined(THREAD_SANITIZER) | 35 #if defined(THREAD_SANITIZER) |
36 #define DISABLE_ON_TSAN(test_name) DISABLED_##test_name | 36 #define DISABLE_ON_TSAN(test_name) DISABLED_##test_name |
37 #else | 37 #else |
38 #define DISABLE_ON_TSAN(test_name) test_name | 38 #define DISABLE_ON_TSAN(test_name) test_name |
39 #endif // defined(THREAD_SANITIZER) | 39 #endif // defined(THREAD_SANITIZER) |
40 | 40 |
| 41 #if defined(ADDRESS_SANITIZER) || defined(MEMORY_SANITIZER) || \ |
| 42 defined(THREAD_SANITIZER) || defined(LEAK_SANITIZER) || \ |
| 43 defined(UNDEFINED_SANITIZER) || defined(SANITIZER_COVERAGE) |
| 44 #define DISABLE_ON_SANITIZERS(test_name) DISABLED_##test_name |
| 45 #else |
| 46 #define DISABLE_ON_SANITIZERS(test_name) test_name |
| 47 #endif |
| 48 |
41 #if defined(OS_ANDROID) | 49 #if defined(OS_ANDROID) |
42 #define DISABLE_ON_ANDROID(test_name) DISABLED_##test_name | 50 #define DISABLE_ON_ANDROID(test_name) DISABLED_##test_name |
43 #else | 51 #else |
44 #define DISABLE_ON_ANDROID(test_name) test_name | 52 #define DISABLE_ON_ANDROID(test_name) test_name |
45 #endif | 53 #endif |
46 | 54 |
47 // While it is perfectly OK for a complex test to provide its own DeathCheck | 55 // While it is perfectly OK for a complex test to provide its own DeathCheck |
48 // function. Most death tests have very simple requirements. These tests should | 56 // function. Most death tests have very simple requirements. These tests should |
49 // use one of the predefined DEATH_XXX macros as an argument to | 57 // use one of the predefined DEATH_XXX macros as an argument to |
50 // SANDBOX_DEATH_TEST(). You can check for a (sub-)string in the output of the | 58 // SANDBOX_DEATH_TEST(). You can check for a (sub-)string in the output of the |
(...skipping 133 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
184 const std::string& msg, | 192 const std::string& msg, |
185 const void* aux); | 193 const void* aux); |
186 | 194 |
187 private: | 195 private: |
188 DISALLOW_IMPLICIT_CONSTRUCTORS(UnitTests); | 196 DISALLOW_IMPLICIT_CONSTRUCTORS(UnitTests); |
189 }; | 197 }; |
190 | 198 |
191 } // namespace | 199 } // namespace |
192 | 200 |
193 #endif // SANDBOX_LINUX_TESTS_UNIT_TESTS_H__ | 201 #endif // SANDBOX_LINUX_TESTS_UNIT_TESTS_H__ |
OLD | NEW |