[llvm] [llvm/CAS] Improve layering and decouple `UnifiedOnDiskCache` from the builtin hash implementation (PR #177280)
Nico Weber via llvm-commits
llvm-commits at lists.llvm.org
Mon Jan 26 16:00:21 PST 2026
================
@@ -42,25 +42,29 @@ static Expected<size_t> countFileSizes(StringRef Path) {
return TotalSize;
}
-TEST_F(OnDiskCASTest, UnifiedOnDiskCacheTest) {
+TEST_P(CustomHasherOnDiskCASTest, UnifiedOnDiskCacheTest) {
----------------
nico wrote:
I'm getting a bunch of
```
../../llvm/unittests/CAS/UnifiedOnDiskCacheTest.cpp:45: Failure
Parameterized test suite CustomHasherOnDiskCASTest is defined via TEST_P, but never instantiated. None of the test cases will run. Either no INSTANTIATE_TEST_SUITE_P is provided or the only ones provided expand to nothing.
Ideally, TEST_P definitions should only ever be included as part of binaries that intend to use them. (As opposed to, for example, being placed in a library that may be linked in to get other utilities.)
To suppress this error for this test suite, insert the following line (in a non-header) in the namespace it is defined in:
GTEST_ALLOW_UNINSTANTIATED_PARAMETERIZED_TEST(CustomHasherOnDiskCASTest);
```
and looking at the diff, that seems accurate. Did you try running this test locally?
https://github.com/llvm/llvm-project/pull/177280
More information about the llvm-commits
mailing list