Skip to content

Commit 3dbe273

Browse files
committed
use integration test directory for profiler lib
1 parent 193223a commit 3dbe273

File tree

2 files changed

+10
-19
lines changed

2 files changed

+10
-19
lines changed

test/Datadog.Trace.ClrProfiler.IntegrationTests/Datadog.Trace.ClrProfiler.IntegrationTests.csproj

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,14 @@
77
</PropertyGroup>
88

99
<ItemGroup>
10-
<Content Include="..\..\integrations.json" Link="integrations.json">
11-
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
12-
</Content>
13-
<Content Include="..\..\src\Datadog.Trace.ClrProfiler.Native\bin\**"
14-
CopyToOutputDirectory="PreserveNewest"
15-
CopyToPublishDirectory="PreserveNewest" />
10+
<None Include="..\..\src\Datadog.Trace.ClrProfiler.Native\bin\$(Configuration)\$(Platform)\**"
11+
CopyToOutputDirectory="Always"
12+
CopyToPublishDirectory="Always"
13+
Link="profiler-lib\%(RecursiveDir)\%(Filename)%(Extension)" />
14+
<Content Include="..\..\integrations.json"
15+
CopyToOutputDirectory="Always"
16+
CopyToPublishDirectory="Always"
17+
Link="profiler-lib\integrations.json" />
1618
</ItemGroup>
1719

1820
<ItemGroup>

test/Datadog.Trace.TestHelpers/EnvironmentHelper.cs

Lines changed: 2 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -239,9 +239,9 @@ public string GetProfilerPath()
239239

240240
if (!File.Exists(_profilerFileLocation))
241241
{
242-
// Let's try the project directory, as dotnet publish ignores the Copy attributes we currently use
242+
// Let's try the executing directory, as dotnet publish ignores the Copy attributes we currently use
243243
_profilerFileLocation = Path.Combine(
244-
GetProfilerProjectDirectory(),
244+
ExecutingAssembly.Location,
245245
fileName);
246246
}
247247

@@ -305,16 +305,5 @@ public string GetTargetFramework()
305305

306306
return $"net{_major}{_minor}{_patch ?? string.Empty}";
307307
}
308-
309-
private static string GetProfilerProjectDirectory()
310-
{
311-
return Path.Combine(
312-
GetSolutionDirectory(),
313-
"src",
314-
"Datadog.Trace.ClrProfiler.Native",
315-
"bin",
316-
GetBuildConfiguration(),
317-
GetPlatform());
318-
}
319308
}
320309
}

0 commit comments

Comments
 (0)