From cf5b1acc6c6114de662aec5770a2d06ea198dc40 Mon Sep 17 00:00:00 2001 From: Anton Firszov Date: Sat, 31 Mar 2018 16:54:01 +0200 Subject: [PATCH] adding mono execution --- appveyor.yml | 14 ++++++++++++++ run-tests.ps1 | 11 ++++++++++- 2 files changed, 24 insertions(+), 1 deletion(-) diff --git a/appveyor.yml b/appveyor.yml index 808851ba0e..934e0273ea 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -22,6 +22,20 @@ environment: is_32bit: False - target_framework: net471 is_32bit: True + - target_framework: mono + is_32bit: False + - target_framework: mono + is_32bit: True + +install: + - ps: | + if ($env:target_framework -eq "mono") { + if ($env:is_32bit -eq "True") { + cinst mono --x86 + } else { + cinst mono + } + } before_build: - git submodule -q update --init diff --git a/run-tests.ps1 b/run-tests.ps1 index f006eab1dd..e9beabd073 100644 --- a/run-tests.ps1 +++ b/run-tests.ps1 @@ -13,7 +13,16 @@ if ( ($targetFramework -eq "netcoreapp2.0") -and ($env:CI -eq "True") -and ($is3 $testRunnerCmd = ".\tests\CodeCoverage\CodeCoverage.cmd" } elseif ($targetFramework -eq "mono") { - $testRunnerCmd = "Write-Host '**** placeholder for mono test execution ****'" + $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 { cd .\tests\ImageSharp.Tests