[Lldb-commits] [lldb] [lldb][Telemetry] Fix unit test compile failure with LLVM_ENABLE_TELEMETRY=0 (PR #136115)
via lldb-commits
lldb-commits at lists.llvm.org
Thu Apr 17 02:28:34 PDT 2025
llvmbot wrote:
<!--LLVM PR SUMMARY COMMENT-->
@llvm/pr-subscribers-lldb
Author: Raul Tambre (tambry)
<details>
<summary>Changes</summary>
It needs to be `TEST_F` to access `received_entries`.
Disabling also works based on the test not the fixture name.
Build failure:
```
lldb/unittests/Core/TelemetryTest.cpp:110:17: error: use of undeclared identifier 'received_entries'
110 | ASSERT_EQ(1U, received_entries.size());
| ^
lldb/unittests/Core/TelemetryTest.cpp:112:61: error: use of undeclared identifier 'received_entries'
112 | llvm::dyn_cast<lldb_private::FakeTelemetryInfo>(received_entries[0])
| ^
```
Fixes: 159b872b37363511a359c800bcc9230bb09f2457
---
Full diff: https://github.com/llvm/llvm-project/pull/136115.diff
1 Files Affected:
- (modified) lldb/unittests/Core/TelemetryTest.cpp (+1-1)
``````````diff
diff --git a/lldb/unittests/Core/TelemetryTest.cpp b/lldb/unittests/Core/TelemetryTest.cpp
index 1e41424bac3ce..910149d865c13 100644
--- a/lldb/unittests/Core/TelemetryTest.cpp
+++ b/lldb/unittests/Core/TelemetryTest.cpp
@@ -96,7 +96,7 @@ class TelemetryTest : public testing::Test {
#if LLVM_ENABLE_TELEMETRY
#define TELEMETRY_TEST(suite, test) TEST_F(suite, test)
#else
-#define TELEMETRY_TEST(suite, test) TEST(DISABLED_##suite, test)
+#define TELEMETRY_TEST(suite, test) TEST_F(suite, DISABLED_##test)
#endif
TELEMETRY_TEST(TelemetryTest, PluginTest) {
``````````
</details>
https://github.com/llvm/llvm-project/pull/136115
More information about the lldb-commits
mailing list