[llvm] 7350112 - [CAS] Disable CAS unittests that requires threads (#153434)
via llvm-commits
llvm-commits at lists.llvm.org
Wed Aug 13 11:11:59 PDT 2025
Author: Steven Wu
Date: 2025-08-13T11:11:56-07:00
New Revision: 7350112c40d65bcbdf76e29a8edd2fb5643a4cf1
URL: https://github.com/llvm/llvm-project/commit/7350112c40d65bcbdf76e29a8edd2fb5643a4cf1
DIFF: https://github.com/llvm/llvm-project/commit/7350112c40d65bcbdf76e29a8edd2fb5643a4cf1.diff
LOG: [CAS] Disable CAS unittests that requires threads (#153434)
Disable parallel CAS tests when LLVM is configured to not having
threads.
Added:
Modified:
llvm/unittests/CAS/ObjectStoreTest.cpp
Removed:
################################################################################
diff --git a/llvm/unittests/CAS/ObjectStoreTest.cpp b/llvm/unittests/CAS/ObjectStoreTest.cpp
index 884cf886e720c..b3c408758a007 100644
--- a/llvm/unittests/CAS/ObjectStoreTest.cpp
+++ b/llvm/unittests/CAS/ObjectStoreTest.cpp
@@ -7,6 +7,7 @@
//===----------------------------------------------------------------------===//
#include "llvm/CAS/ObjectStore.h"
+#include "llvm/Config/llvm-config.h"
#include "llvm/Support/Process.h"
#include "llvm/Support/RandomNumberGenerator.h"
#include "llvm/Support/ThreadPool.h"
@@ -268,6 +269,7 @@ TEST_P(CASTest, NodesBig) {
ASSERT_THAT_ERROR(CAS->validate(CAS->getID(ID)), Succeeded());
}
+#if LLVM_ENABLE_THREADS
/// Common test functionality for creating blobs in parallel. You can vary which
/// cas instances are the same or
diff erent, and the size of the created blobs.
static void testBlobsParallel(ObjectStore &Read1, ObjectStore &Read2,
@@ -342,4 +344,5 @@ TEST_P(CASTest, BlobsBigParallel) {
uint64_t Size = 100ULL * 1024;
ASSERT_NO_FATAL_FAILURE(testBlobsParallel1(*CAS, Size));
}
-#endif
+#endif // EXPENSIVE_CHECKS
+#endif // LLVM_ENABLE_THREADS
More information about the llvm-commits
mailing list