|
3 | 3 | using System.IO; |
4 | 4 | using System.Text.RegularExpressions; |
5 | 5 | using System.Threading.Tasks; |
| 6 | +using System.Runtime.InteropServices; |
6 | 7 | using Microsoft.Xunit.Performance.Api; |
7 | 8 |
|
8 | 9 | namespace JitBench |
@@ -99,11 +100,12 @@ async Task ExecuteGitCommand(string arguments, ITestOutputHelper output, string |
99 | 100 | private async Task CreateStore(DotNetInstallation dotNetInstall, string outputDir, ITestOutputHelper output) |
100 | 101 | { |
101 | 102 | string tfm = DotNetSetup.GetTargetFrameworkMonikerForFrameworkVersion(dotNetInstall.FrameworkVersion); |
102 | | - string rid = $"win7-{dotNetInstall.Architecture}"; |
103 | 103 | string storeDirName = ".store"; |
104 | | - await new ProcessRunner("powershell.exe", $".\\AspNet-GenerateStore.ps1 -InstallDir {storeDirName} -Architecture {dotNetInstall.Architecture} -Runtime {rid}") |
| 104 | + await (RuntimeInformation.IsOSPlatform(OSPlatform.Windows) ? |
| 105 | + new ProcessRunner("powershell.exe", $".\\AspNet-GenerateStore.ps1 -InstallDir {storeDirName} -Architecture {dotNetInstall.Architecture} -Runtime win7-{dotNetInstall.Architecture}") : |
| 106 | + new ProcessRunner("bash", $"./aspnet-generatestore.sh --install-dir {storeDirName} --architecture {dotNetInstall.Architecture} --runtime-id linux-{dotNetInstall.Architecture} -f {tfm} --fx-version {dotNetInstall.FrameworkVersion}")) |
105 | 107 | .WithWorkingDirectory(GetJitBenchRepoRootDir(outputDir)) |
106 | | - .WithEnvironmentVariable("PATH", $"{dotNetInstall.DotNetDir};{Environment.GetEnvironmentVariable("PATH")}") |
| 108 | + .WithEnvironmentVariable("PATH", $"{dotNetInstall.DotNetDir}{Path.PathSeparator}{Environment.GetEnvironmentVariable("PATH")}") |
107 | 109 | .WithEnvironmentVariable("DOTNET_MULTILEVEL_LOOKUP", "0") |
108 | 110 | .WithEnvironmentVariable("JITBENCH_TARGET_FRAMEWORK_MONIKER", tfm) |
109 | 111 | .WithEnvironmentVariable("JITBENCH_FRAMEWORK_VERSION", dotNetInstall.FrameworkVersion) |
@@ -273,7 +275,7 @@ string GetWebAppStoreDir(string outputDir) |
273 | 275 | } |
274 | 276 |
|
275 | 277 | private const string JitBenchRepoUrl = "https://github.com/aspnet/JitBench"; |
276 | | - private const string JitBenchCommitSha1Id = "6bee730486f272d31f23f1033225090511f856f3"; |
| 278 | + private const string JitBenchCommitSha1Id = "e863c5f9543b4101c41fdd04730ca30684d1f913"; |
277 | 279 | private const string StoreDirName = ".store"; |
278 | 280 | private readonly Metric StartupMetric = new Metric("Startup", "ms"); |
279 | 281 | private readonly Metric FirstRequestMetric = new Metric("First Request", "ms"); |
|
0 commit comments