From 19db90581b0fd626d068da54c065f05e192e676b Mon Sep 17 00:00:00 2001 From: James Jackson-South Date: Thu, 16 Jan 2020 10:49:54 +1100 Subject: [PATCH] Use dotnet test on linux --- test.ps1 | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/test.ps1 b/test.ps1 index 61995ca7f6..c45074329f 100644 --- a/test.ps1 +++ b/test.ps1 @@ -11,15 +11,19 @@ param( if ($codecov -eq 'true') { - # xunit doesn't understand custom params so use dotnet test + # xunit doesn't understand custom params so use dotnet test. # Coverage tests are run in debug because the coverage tools are triggering a JIT error in filter processors # that causes the blue component of transformed values to be corrupted. dotnet clean -c Debug dotnet test -c Debug -f $targetFramework /p:codecov=true } +elseif ($os -ne 'windows-latest') { + # xunit doesn't run without mono on linux and macos. + dotnet test --no-build -c Release -f $targetFramework +} else { - # There were issues matching the correct installed runtime if we do not specify it explicitly: + # xunit has issues matching the correct installed runtime if we do not specify it explicitly. # https://github.com/xunit/xunit/issues/1476 # This fix assumes the base version is installed. $coreTargetFrameworkRegex = '^netcoreapp(\d+\.\d+)$' @@ -27,16 +31,15 @@ else { $fxVersion = "--fx-version ${matches[1]}.0" } - # xunit requires explicit path + # xunit requires explicit path. Set-Location $env:XUNIT_PATH - # xunit doesn't actually understand -x64 as an option + # xunit doesn't actually understand -x64 as an option. if ($platform -ne '-x86') { $platform = '' } - dotnet clean -c Release - dotnet xunit -c Release -f $targetFramework ${fxVersion} $platform + dotnet xunit --no-build -c Release -f $targetFramework ${fxVersion} $platform Set-Location $PSScriptRoot }