Skip to content

Commit

Permalink
Fix NGEN helper (and add display for debugging purposes
Browse files Browse the repository at this point in the history
  • Loading branch information
andrewlock committed Oct 25, 2024
1 parent 4e78e5f commit ea180ac
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion tracer/test/Datadog.Trace.TestHelpers/NgenHelper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -21,15 +21,21 @@ public static void InstallToNativeImageCache(ITestOutputHelper output, string ap

var install = $"install \"{appFilename}\"";
RunNgen(output, workingDirectory, install);

// display NGEN'd assemblies
RunNgen(output, "display");
}

public static void UninstallFromNativeImageCache(ITestOutputHelper output, string applicationPath)
{
var appFilename = Path.GetFileName(applicationPath);
var workingDirectory = Path.GetDirectoryName(applicationPath);

var install = $"install \"{appFilename}\"";
var install = $"uninstall \"{appFilename}\"";
RunNgen(output, workingDirectory, install);

// display NGEN'd assemblies
RunNgen(output, "display");
}

private static void RunNgen(ITestOutputHelper output, string workingDirectory, string arguments)
Expand Down

0 comments on commit ea180ac

Please sign in to comment.