forked from OSchip/llvm-project
[libcxx] [test] Split the TEST_HAS_SANITIZERS define into TEST_IS_EXECUTED_IN_A_SLOW_ENVIRONMENT
This makes its role clearer. It's plausible that one may want to manually define TEST_IS_EXECUTED_IN_A_SLOW_ENVIRONMENT when running the tests in some environments - in particular, it seems to be necessary to use the higher tolerance timeouts if running the tests on Windows runners on Github Actions. Also add the descriptive comment in one file where it was missing. Differential Revision: https://reviews.llvm.org/D131484
This commit is contained in:
parent
e78223e79e
commit
63d88ed5bf
|
@ -42,7 +42,7 @@ ms WaitTime = ms(250);
|
|||
// Thread sanitizer causes more overhead and will sometimes cause this test
|
||||
// to fail. To prevent this we give Thread sanitizer more time to complete the
|
||||
// test.
|
||||
#if !defined(TEST_HAS_SANITIZERS)
|
||||
#if !defined(TEST_IS_EXECUTED_IN_A_SLOW_ENVIRONMENT)
|
||||
ms Tolerance = ms(50);
|
||||
#else
|
||||
ms Tolerance = ms(50 * 5);
|
||||
|
|
|
@ -41,7 +41,7 @@ ms WaitTime = ms(250);
|
|||
// Thread sanitizer causes more overhead and will sometimes cause this test
|
||||
// to fail. To prevent this we give Thread sanitizer more time to complete the
|
||||
// test.
|
||||
#if !defined(TEST_HAS_SANITIZERS)
|
||||
#if !defined(TEST_IS_EXECUTED_IN_A_SLOW_ENVIRONMENT)
|
||||
ms Tolerance = ms(25);
|
||||
#else
|
||||
ms Tolerance = ms(25 * 5);
|
||||
|
|
|
@ -41,7 +41,7 @@ ms WaitTime = ms(250);
|
|||
// Thread sanitizer causes more overhead and will sometimes cause this test
|
||||
// to fail. To prevent this we give Thread sanitizer more time to complete the
|
||||
// test.
|
||||
#if !defined(TEST_HAS_SANITIZERS)
|
||||
#if !defined(TEST_IS_EXECUTED_IN_A_SLOW_ENVIRONMENT)
|
||||
ms Tolerance = ms(50);
|
||||
#else
|
||||
ms Tolerance = ms(50 * 5);
|
||||
|
|
|
@ -42,7 +42,7 @@ ms WaitTime = ms(250);
|
|||
// Thread sanitizer causes more overhead and will sometimes cause this test
|
||||
// to fail. To prevent this we give Thread sanitizer more time to complete the
|
||||
// test.
|
||||
#if !defined(TEST_HAS_SANITIZERS)
|
||||
#if !defined(TEST_IS_EXECUTED_IN_A_SLOW_ENVIRONMENT)
|
||||
ms Tolerance = ms(50);
|
||||
#else
|
||||
ms Tolerance = ms(50 * 5);
|
||||
|
|
|
@ -42,7 +42,7 @@ ms WaitTime = ms(250);
|
|||
// Thread sanitizer causes more overhead and will sometimes cause this test
|
||||
// to fail. To prevent this we give Thread sanitizer more time to complete the
|
||||
// test.
|
||||
#if !defined(TEST_HAS_SANITIZERS)
|
||||
#if !defined(TEST_IS_EXECUTED_IN_A_SLOW_ENVIRONMENT)
|
||||
ms Tolerance = ms(50);
|
||||
#else
|
||||
ms Tolerance = ms(50 * 5);
|
||||
|
|
|
@ -38,7 +38,10 @@ typedef std::chrono::milliseconds ms;
|
|||
typedef std::chrono::nanoseconds ns;
|
||||
|
||||
|
||||
#if !defined(TEST_HAS_SANITIZERS)
|
||||
// Thread sanitizer causes more overhead and will sometimes cause this test
|
||||
// to fail. To prevent this we give Thread sanitizer more time to complete the
|
||||
// test.
|
||||
#if !defined(TEST_IS_EXECUTED_IN_A_SLOW_ENVIRONMENT)
|
||||
ms Tolerance = ms(200);
|
||||
#else
|
||||
ms Tolerance = ms(200 * 5);
|
||||
|
|
|
@ -43,7 +43,7 @@ ms WaitTime = ms(250);
|
|||
// Thread sanitizer causes more overhead and will sometimes cause this test
|
||||
// to fail. To prevent this we give Thread sanitizer more time to complete the
|
||||
// test.
|
||||
#if !defined(TEST_HAS_SANITIZERS)
|
||||
#if !defined(TEST_IS_EXECUTED_IN_A_SLOW_ENVIRONMENT)
|
||||
ms Tolerance = ms(50);
|
||||
#else
|
||||
ms Tolerance = ms(50 * 5);
|
||||
|
|
|
@ -43,7 +43,7 @@ ms WaitTime = ms(250);
|
|||
// Thread sanitizer causes more overhead and will sometimes cause this test
|
||||
// to fail. To prevent this we give Thread sanitizer more time to complete the
|
||||
// test.
|
||||
#if !defined(TEST_HAS_SANITIZERS)
|
||||
#if !defined(TEST_IS_EXECUTED_IN_A_SLOW_ENVIRONMENT)
|
||||
ms Tolerance = ms(50);
|
||||
#else
|
||||
ms Tolerance = ms(50 * 5);
|
||||
|
|
|
@ -193,6 +193,7 @@
|
|||
#if TEST_HAS_FEATURE(address_sanitizer) || TEST_HAS_FEATURE(hwaddress_sanitizer) || \
|
||||
TEST_HAS_FEATURE(memory_sanitizer) || TEST_HAS_FEATURE(thread_sanitizer)
|
||||
#define TEST_HAS_SANITIZERS
|
||||
#define TEST_IS_EXECUTED_IN_A_SLOW_ENVIRONMENT
|
||||
#endif
|
||||
|
||||
#if defined(_LIBCPP_NORETURN)
|
||||
|
|
Loading…
Reference in New Issue