Skip to content

Commit 691bae5

Browse files
authored
Merge pull request #241 from mathworks/mbt-plugin-updates
Only ship mbt plugin if gRPC is installed
2 parents 5f42133 + ff6ca73 commit 691bae5

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -627,13 +627,13 @@ install(DIRECTORY ${METRICS_SDK_MATLAB_SOURCES} DESTINATION .)
627627
install(DIRECTORY ${LOGS_SDK_MATLAB_SOURCES} DESTINATION .)
628628
install(DIRECTORY ${COMMON_SDK_MATLAB_SOURCES} DESTINATION .)
629629
install(DIRECTORY ${AUTO_INSTRUMENTATION_MATLAB_SOURCES} DESTINATION .)
630-
install(DIRECTORY ${INSTRUMENTATION_MBT_MATLAB_SOURCES} DESTINATION .)
631630
install(FILES ${EXPORTER_MATLAB_SOURCES} DESTINATION ${OTLP_EXPORTERS_DIR})
632631
if(WITH_OTLP_HTTP)
633632
install(FILES ${OTLP_HTTP_EXPORTER_MATLAB_SOURCES} DESTINATION ${OTLP_EXPORTERS_DIR})
634633
endif()
635634
if(WITH_OTLP_GRPC)
636635
install(FILES ${OTLP_GRPC_EXPORTER_MATLAB_SOURCES} DESTINATION ${OTLP_EXPORTERS_DIR})
636+
install(DIRECTORY ${INSTRUMENTATION_MBT_MATLAB_SOURCES} DESTINATION .)
637637
endif()
638638
if(WITH_OTLP_FILE)
639639
install(FILES ${OTLP_FILE_EXPORTER_MATLAB_SOURCES} DESTINATION ${OTLP_EXPORTERS_DIR})

test/tbuildtoolplugin.m

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -29,11 +29,11 @@ function setup(testCase)
2929
end
3030

3131
function onlyTestIfgRPCIsInstalled(testCase)
32+
% Do not run if gRPC is not installed
3233
testCase.assumeTrue(logical(exist("opentelemetry.exporters.otlp.OtlpGrpcSpanExporter", "class")), ...
3334
"Otlp gRPC exporter must be installed.");
34-
end
35-
36-
function createBuildRunner(testCase)
35+
36+
% Set up build runner
3737
plugin = matlab.buildtool.plugins.OpenTelemetryPlugin();
3838
testCase.BuildRunner = matlab.buildtool.BuildRunner.withNoPlugins();
3939
testCase.BuildRunner.addPlugin(plugin);
@@ -474,4 +474,4 @@ function buildToolDoesNotConfigureOTelWhenEnvVariableSet(testCase)
474474
end
475475

476476
error("No span found");
477-
end
477+
end

0 commit comments

Comments
 (0)