Skip to content

Commit 7350112

Browse files
[CAS] Disable CAS unittests that requires threads (#153434)
Disable parallel CAS tests when LLVM is configured to not having threads.
1 parent 3a36070 commit 7350112

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

llvm/unittests/CAS/ObjectStoreTest.cpp

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
//===----------------------------------------------------------------------===//
88

99
#include "llvm/CAS/ObjectStore.h"
10+
#include "llvm/Config/llvm-config.h"
1011
#include "llvm/Support/Process.h"
1112
#include "llvm/Support/RandomNumberGenerator.h"
1213
#include "llvm/Support/ThreadPool.h"
@@ -268,6 +269,7 @@ TEST_P(CASTest, NodesBig) {
268269
ASSERT_THAT_ERROR(CAS->validate(CAS->getID(ID)), Succeeded());
269270
}
270271

272+
#if LLVM_ENABLE_THREADS
271273
/// Common test functionality for creating blobs in parallel. You can vary which
272274
/// cas instances are the same or different, and the size of the created blobs.
273275
static void testBlobsParallel(ObjectStore &Read1, ObjectStore &Read2,
@@ -342,4 +344,5 @@ TEST_P(CASTest, BlobsBigParallel) {
342344
uint64_t Size = 100ULL * 1024;
343345
ASSERT_NO_FATAL_FAILURE(testBlobsParallel1(*CAS, Size));
344346
}
345-
#endif
347+
#endif // EXPENSIVE_CHECKS
348+
#endif // LLVM_ENABLE_THREADS

0 commit comments

Comments
 (0)