Skip to content

Commit ba8c5ab

Browse files
committed
Swap publish to be self contained
Attempting to fix issue where it can't find the correct .NET runtime
1 parent 263840f commit ba8c5ab

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

tracer/test/Datadog.Trace.ClrProfiler.IntegrationTests/InstrumentationTests.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,7 @@ public async Task DoesNotInstrumentExcludedNames(string excludedProcess)
135135
// Currently, today, we instrument dotnet run, which results in some "spurious" spans (e.g. command_execution)
136136
// In the future, we may change that. But hte important part is that we don't instrument the target process itself
137137
var publishDir = Path.Combine(Path.GetTempPath(), Path.GetFileNameWithoutExtension(Path.GetRandomFileName()));
138-
logDir = await RunDotnet($"publish -o \"{publishDir}\"");
138+
logDir = await RunDotnet($"publish -o \"{publishDir}\" --self-contained");
139139
AssertNotInstrumented(agent, logDir);
140140

141141
// this _should NOT_ be instrumented
@@ -183,7 +183,7 @@ public async Task DoesInstrumentAllowedProcesses(string allowedProcess)
183183
// Currently, today, we instrument dotnet run, which results in some "spurious" spans (e.g. command_execution)
184184
// In the future, we may change that. But hte important part is that we don't instrument the target process itself
185185
var publishDir = Path.Combine(Path.GetTempPath(), Path.GetFileNameWithoutExtension(Path.GetRandomFileName()));
186-
logDir = await RunDotnet($"publish -o \"{publishDir}\"");
186+
logDir = await RunDotnet($"publish -o \"{publishDir}\" --self-contained");
187187
AssertNotInstrumented(agent, logDir);
188188

189189
// this _SHOULD_ be instrumented

0 commit comments

Comments
 (0)