Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Autodetect processor architecture used for tests #1837

Merged
merged 2 commits into from
Dec 11, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 11 additions & 5 deletions make.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ Param(
[String] $target = "build",
[String] $configuration = "Release",
[String[]] $frameworks=@('net462','netcoreapp3.1','net6.0','net8.0'),
[String] $platform = "x64",
[String] $platform = $null, # auto-detect
[switch] $runIgnored,
[int] $jobs = [System.Environment]::ProcessorCount
)
Expand Down Expand Up @@ -62,21 +62,27 @@ function GenerateRunSettings([String] $framework, [String] $platform, [String] $
[System.Xml.XmlDocument]$doc = New-Object System.Xml.XmlDocument

# <RunSettings>
# <RunConfiguration>
# <TargetPlatform>x64</TargetPlatform>
# </RunConfiguration>
# <TestRunParameters>
# <Parameter name="FRAMEWORK" value="net462" />
# <Parameter name="CONFIGURATION" value="Release" />
# </TestRunParameters>
# </RunSettings>

$dec = $doc.CreateXmlDeclaration("1.0","UTF-8",$null)
$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
Expand Down
Loading