forked from libgit2/libgit2sharp
-
Notifications
You must be signed in to change notification settings - Fork 0
/
buildandtest.cmd
39 lines (29 loc) · 1 KB
/
buildandtest.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
38
39
@ECHO OFF
REM Sample usages:
REM
REM Building and running tests
REM - buildandtest.cmd
REM
REM Building and identifying potential leaks while running tests
REM - buildandtest.cmd "LEAKS_IDENTIFYING"
SETLOCAL
SET EXTRADEFINE=%~1
where dotnet 1>nul 2>nul
IF ERRORLEVEL 1 (
ECHO Cannot find dotnet.exe. Run from a VS2017 Developer Prompt.
EXIT /B 1
)
ECHO ON
SET Configuration=Release
:: Restore packages
dotnet restore "%~dp0\"
@IF ERRORLEVEL 1 EXIT /B %ERRORLEVEL%
:: Build
dotnet build "%~dp0\" /v:minimal /nologo /property:ExtraDefine="%EXTRADEFINE%"
@IF ERRORLEVEL 1 EXIT /B %ERRORLEVEL%
:: Run tests on Desktop and CoreCLR
"%userprofile%\.nuget\packages\xunit.runner.console\2.4.1\tools\net46\xunit.console.exe" "%~dp0bin\LibGit2Sharp.Tests\%Configuration%\net46\LibGit2Sharp.Tests.dll" -noshadow
@IF ERRORLEVEL 1 EXIT /B %ERRORLEVEL%
dotnet test "%~dp0LibGit2Sharp.Tests/LibGit2Sharp.Tests.csproj" -f netcoreapp2.1 --no-restore --no-build
@IF ERRORLEVEL 1 EXIT /B %ERRORLEVEL%
EXIT /B %ERRORLEVEL%