forked from morelinq/MoreLINQ
-
Notifications
You must be signed in to change notification settings - Fork 0
/
test.cmd
37 lines (34 loc) · 889 Bytes
/
test.cmd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
@echo off
pushd "%~dp0"
call :main %*
popd
goto :EOF
:main
setlocal
set NUNIT_CONSOLE_PATH=tools\NUnit.ConsoleRunner.3.5.0\tools\nunit3-console.exe
if exist %NUNIT_CONSOLE_PATH% goto :test-all
for %%i in (NuGet.exe) do set nuget=%%~dpnx$PATH:i
if "%nuget%"=="" goto :nonuget
nuget.exe install NUnit.Console -Version 3.5.0 -OutputDirectory tools || exit /b 1
:test-all
call build ^
&& call :test netcore10 Debug ^
&& call :test netcore10 Release ^
&& call :test net451 Debug ^
&& call :test net451 Release
goto :EOF
:test
setlocal
echo Testing %1 (%2)...
if %1==netcore10 (
dotnet test -f netcoreapp1.0 -c %2 MoreLinq.Test
) else (
for /d %%d in (MoreLinq.Test\bin\%2\%1\win*) do (
%NUNIT_CONSOLE_PATH% %%d\MoreLinq.Test.dll
)
)
goto :EOF
:nonuget
echo>&2 NuGet executable not found in PATH
echo>&2 To download a version, see https://dist.nuget.org/
exit /b 2