From aac4ab9dd5b42e8a89d26dd1e291f74e39f2def9 Mon Sep 17 00:00:00 2001 From: Pavel Koneski Date: Mon, 9 Dec 2024 20:35:56 -0800 Subject: [PATCH 1/2] Autodetect processor architecture used for tests --- make.ps1 | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/make.ps1 b/make.ps1 index 16e082c1b..9a8be02b3 100755 --- a/make.ps1 +++ b/make.ps1 @@ -5,12 +5,13 @@ Param( [String] $target = "build", [String] $configuration = "Release", [String[]] $frameworks=@('net462','netcoreapp3.1','net6.0','net8.0'), - [String] $platform = "x64", + [String] $platform = [Runtime.InteropServices.RuntimeInformation]::ProcessArchitecture, [switch] $runIgnored, [int] $jobs = [System.Environment]::ProcessorCount ) $ErrorActionPreference="Continue" +if (-not $platform) { $platform = "x64"; } [int] $global:Result = 0 [bool] $global:isUnix = [System.Environment]::OSVersion.Platform -eq [System.PlatformID]::Unix @@ -62,8 +63,12 @@ function GenerateRunSettings([String] $framework, [String] $platform, [String] $ [System.Xml.XmlDocument]$doc = New-Object System.Xml.XmlDocument # +# +# x64 +# # # +# # # From e84039302d6a44fd712999b7185260e2a4f7a6b3 Mon Sep 17 00:00:00 2001 From: Pavel Koneski Date: Tue, 10 Dec 2024 19:44:17 -0800 Subject: [PATCH 2/2] Use dotnet runner autodetect mechanism --- make.ps1 | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/make.ps1 b/make.ps1 index 9a8be02b3..32786dd37 100755 --- a/make.ps1 +++ b/make.ps1 @@ -5,13 +5,12 @@ Param( [String] $target = "build", [String] $configuration = "Release", [String[]] $frameworks=@('net462','netcoreapp3.1','net6.0','net8.0'), - [String] $platform = [Runtime.InteropServices.RuntimeInformation]::ProcessArchitecture, + [String] $platform = $null, # auto-detect [switch] $runIgnored, [int] $jobs = [System.Environment]::ProcessorCount ) $ErrorActionPreference="Continue" -if (-not $platform) { $platform = "x64"; } [int] $global:Result = 0 [bool] $global:isUnix = [System.Environment]::OSVersion.Platform -eq [System.PlatformID]::Unix @@ -76,12 +75,14 @@ function GenerateRunSettings([String] $framework, [String] $platform, [String] $ $doc.AppendChild($dec) | Out-Null $runSettings = $doc.CreateElement("RunSettings") - + $runConfiguration = $doc.CreateElement("RunConfiguration") $runSettings.AppendChild($runConfiguration) | Out-Null - $targetPlatform = $doc.CreateElement("TargetPlatform") - $targetPlatform.InnerText = $platform - $runConfiguration.AppendChild($targetPlatform) | Out-Null + if ($platform) { + $targetPlatform = $doc.CreateElement("TargetPlatform") + $targetPlatform.InnerText = $platform + $runConfiguration.AppendChild($targetPlatform) | Out-Null + } $testRunParameters = $doc.CreateElement("TestRunParameters") $runSettings.AppendChild($testRunParameters) | Out-Null