From c87c7a48418a4b74a23b1108abcbb510dc59d899 Mon Sep 17 00:00:00 2001 From: Anton Firszov Date: Sat, 31 Mar 2018 20:35:11 +0200 Subject: [PATCH] oops --- run-tests.ps1 | 27 +++++++++++++++------------ 1 file changed, 15 insertions(+), 12 deletions(-) diff --git a/run-tests.ps1 b/run-tests.ps1 index 99de68120..bf9ac3aef 100644 --- a/run-tests.ps1 +++ b/run-tests.ps1 @@ -21,18 +21,6 @@ if ( ($targetFramework -eq "netcoreapp2.0") -and ($env:CI -eq "True") -and ($is3 } elseif ($targetFramework -eq "mono") { $testDllPath = "$PSScriptRoot\tests\ImageSharp.Tests\bin\Release\net462\SixLabors.ImageSharp.Tests.dll" - cd "$env:HOMEPATH\.nuget\packages\xunit.runner.console\2.3.1\tools\net452\" - if ($is32Bit -ne "True") { - $monoPath = "$env:PROGRAMFILES\Mono\bin\mono.exe" - } - else { - $monoPath = "${env:ProgramFiles(x86)}\Mono\bin\mono.exe" - } - - $testRunnerCmd = '"$monoPath" .\xunit.console.exe $testDllPath' -} -else { - $testDllPath = "${PSScriptRoot}\AppVeyorDotnetSandbox\bin\Release\net461\AppVeyorDotnetSandbox.dll" VerifyPath($testDllPath, "test dll missing:") $xunitRunnerPath = "${env:HOMEPATH}\.nuget\packages\xunit.runner.console\2.3.1\tools\net452\" @@ -52,6 +40,21 @@ else { $testRunnerCmd = "& `"${monoPath}`" .\xunit.console.exe `"${testDllPath}`"" } +else { + cd .\tests\ImageSharp.Tests + $xunitArgs = "-nobuild -c Release -framework $targetFramework" + + if ($targetFramework -eq "netcoreapp2.0") { + # There were issues matching the correct installed runtime if we do not specify it explicitly: + $xunitArgs += " --fx-version 2.0.0" + } + + if ($is32Bit -eq "True") { + $xunitArgs += " -x86" + } + + $testRunnerCmd = "dotnet xunit $xunitArgs" +} Write-Host "running:" Write-Host $testRunnerCmd