File tree Expand file tree Collapse file tree 2 files changed +17
-7
lines changed Expand file tree Collapse file tree 2 files changed +17
-7
lines changed Original file line number Diff line number Diff line change @@ -66,7 +66,14 @@ class FakePlugin : public telemetry::TelemetryManager {
6666
6767} // namespace lldb_private
6868
69- TEST (TelemetryTest, PluginTest) {
69+ #if LLVM_ENABLE_TELEMETRY
70+ #define TELEMETRY_TEST (suite, test ) TEST(suite, test)
71+ #else
72+ #define TELEMETRY_TEST (suite, test ) TEST(DISABLED_##suite, test)
73+ #endif
74+
75+
76+ TELEMETRY_TEST (TelemetryTest, PluginTest) {
7077 // This would have been called by the plugin reg in a "real" plugin
7178 // For tests, we just call it directly.
7279 lldb_private::FakePlugin::Initialize ();
Original file line number Diff line number Diff line change @@ -212,9 +212,14 @@ std::shared_ptr<Config> getTelemetryConfig(const TestContext &Ctxt) {
212212 return std::make_shared<Config>(false );
213213}
214214
215- TEST (TelemetryTest, TelemetryDisabled) {
216- if (!Config::BuildTimeEnableTelemetry)
217- GTEST_SKIP ();
215+ #if LLVM_ENABLE_TELEMETRY
216+ #define TELEMETRY_TEST (suite, test ) TEST(suite, test)
217+ #else
218+ #define TELEMETRY_TEST (suite, test ) TEST(DISABLED_##suite, test)
219+ #endif
220+
221+
222+ TELEMETRY_TEST (TelemetryTest, TelemetryDisabled) {
218223 TestContext Context;
219224 Context.HasVendorPlugin = false ;
220225
@@ -223,9 +228,7 @@ TEST(TelemetryTest, TelemetryDisabled) {
223228 EXPECT_EQ (nullptr , Manager);
224229}
225230
226- TEST (TelemetryTest, TelemetryEnabled) {
227- if (!Config::BuildTimeEnableTelemetry)
228- GTEST_SKIP ();
231+ TELEMETRY_TEST (TelemetryTest, TelemetryEnabled) {
229232 const std::string ToolName = " TelemetryTestTool" ;
230233
231234 // Preset some params.
You can’t perform that action at this time.
0 commit comments