Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 029fe10

Browse files
jdomsergeybykov
authored andcommittedOct 28, 2016
Run vNext tests from command line
Create an additional build in Jenkins to run .NET Standard tests
1 parent 53ad899 commit 029fe10

10 files changed

+140
-28
lines changed
 

‎Build.cmd

+21-1
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,22 @@
1+
@if not defined _echo @echo off
2+
setlocal
3+
4+
if [%1]==[] GOTO NETFX
5+
if [%1]==[netfx] GOTO NETFX
6+
if [%1]==[netstandard-win] GOTO VNEXT
7+
if [%1]==[netstandard] GOTO VNEXT
8+
if [%1]==[all] GOTO ALL
9+
10+
:NETFX
111
cmd /c "%~dp0src\Build.cmd"
2-
REM cmd /c "%~dp0vNext\src\Build.cmd"
12+
GOTO END
13+
14+
:VNEXT
15+
cmd /c "%~dp0vNext\src\Build.cmd"
16+
GOTO END
17+
18+
:ALL
19+
cmd /c "%~dp0src\Build.cmd"
20+
cmd /c "%~dp0vNext\src\Build.cmd"
21+
22+
:END

‎Test.cmd

+22-1
Original file line numberDiff line numberDiff line change
@@ -1 +1,22 @@
1-
"%~dp0src\Test.cmd"
1+
@if not defined _echo @echo off
2+
setlocal
3+
4+
if [%1]==[] GOTO NETFX
5+
if [%1]==[netfx] GOTO NETFX
6+
if [%1]==[netstandard-win] GOTO VNEXT
7+
if [%1]==[netstandard] GOTO VNEXT
8+
if [%1]==[all] GOTO ALL
9+
10+
:NETFX
11+
cmd /c "%~dp0src\Test.cmd"
12+
GOTO END
13+
14+
:VNEXT
15+
cmd /c "%~dp0vNext\src\Test.cmd"
16+
GOTO END
17+
18+
:ALL
19+
cmd /c "%~dp0src\Test.cmd"
20+
cmd /c "%~dp0vNext\src\Test.cmd"
21+
22+
:END

‎TestAll.cmd

+22-1
Original file line numberDiff line numberDiff line change
@@ -1 +1,22 @@
1-
"%~dp0src\TestAll.cmd"
1+
@if not defined _echo @echo off
2+
setlocal
3+
4+
if [%1]==[] GOTO NETFX
5+
if [%1]==[netfx] GOTO NETFX
6+
if [%1]==[netstandard-win] GOTO VNEXT
7+
if [%1]==[netstandard] GOTO VNEXT
8+
if [%1]==[all] GOTO ALL
9+
10+
:NETFX
11+
cmd /c "%~dp0src\TestAll.cmd"
12+
GOTO END
13+
14+
:VNEXT
15+
cmd /c "%~dp0vNext\src\TestAll.cmd"
16+
GOTO END
17+
18+
:ALL
19+
cmd /c "%~dp0src\TestAll.cmd"
20+
cmd /c "%~dp0vNext\src\TestAll.cmd"
21+
22+
:END

‎netci.groovy

+25-16
Original file line numberDiff line numberDiff line change
@@ -10,21 +10,30 @@ def buildString = '''call Build.cmd && Test.cmd'''
1010
// Generate the builds for debug and release
1111

1212
[true, false].each { isPR ->
13-
def newJob = job(Utilities.getFullJobName(project, '', isPR)) {
14-
steps {
15-
batchFile(buildString)
13+
['netfx', 'netstandard-win'].each { platform ->
14+
def newJobName = platform
15+
def newJob = job(Utilities.getFullJobName(project, newJobName, isPR)) {
16+
steps {
17+
batchFile("call Build.cmd ${platform} && Test.cmd ${platform}")
18+
}
19+
}
20+
21+
if (platform == 'netfx') {
22+
Utilities.setMachineAffinity(newJob, 'Windows_NT', 'latest-or-auto')
23+
} else {
24+
// need to use a machine that has .NET 4.6.2 installed in the system
25+
Utilities.setMachineAffinity(newJob, 'Windows_NT', '20161027')
1626
}
17-
}
18-
19-
Utilities.setMachineAffinity(newJob, 'Windows_NT', 'latest-or-auto')
20-
Utilities.standardJobSetup(newJob, project, isPR, "*/${branch}")
21-
Utilities.addXUnitDotNETResults(newJob, '**/xUnit-Results*.xml')
22-
// Archive only on commit builds.
23-
if (!isPR) {
24-
Utilities.addArchival(newJob, 'Binaries/**')
25-
Utilities.addGithubPushTrigger(newJob)
26-
}
27-
else {
28-
Utilities.addGithubPRTriggerForBranch(newJob, branch, "Windows Debug and Release")
29-
}
27+
28+
Utilities.standardJobSetup(newJob, project, isPR, "*/${branch}")
29+
Utilities.addXUnitDotNETResults(newJob, '**/xUnit-Results*.xml')
30+
// Archive only on commit builds.
31+
if (!isPR) {
32+
Utilities.addArchival(newJob, 'Binaries/**')
33+
Utilities.addGithubPushTrigger(newJob)
34+
}
35+
else {
36+
Utilities.addGithubPRTriggerForBranch(newJob, branch, "${platform} Windows Debug and Release")
37+
}
38+
}
3039
}

‎vNext/.nuget/packages.config

-7
This file was deleted.
File renamed without changes.

‎vNext/src/.nuget/packages.config

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<packages>
3+
<package id="xunit.runner.console" version="2.1.0" />
4+
</packages>

‎vNext/src/Orleans.vNext.sln

+2-2
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,8 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "TestExtensions", "..\test\T
2727
EndProject
2828
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = ".nuget", ".nuget", "{5478B454-0E48-4631-B338-D45DD21124BF}"
2929
ProjectSection(SolutionItems) = preProject
30-
..\.nuget\NuGet.Config = ..\.nuget\NuGet.Config
31-
..\.nuget\packages.config = ..\.nuget\packages.config
30+
.nuget\NuGet.Config = .nuget\NuGet.Config
31+
.nuget\packages.config = .nuget\packages.config
3232
EndProjectSection
3333
EndProject
3434
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "TestInternalGrains", "..\test\TestInternalGrains\TestInternalGrains.csproj", "{A682ABC1-1A51-4794-8012-DA8E59EBC72A}"

‎vNext/src/Test.cmd

+28
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
@setlocal
2+
@ECHO off
3+
4+
SET CONFIGURATION=Release
5+
6+
SET CMDHOME=%~dp0
7+
@REM Remove trailing backslash \
8+
set CMDHOME=%CMDHOME:~0,-1%
9+
10+
pushd "%CMDHOME%"
11+
@cd
12+
13+
SET OutDir=%CMDHOME%\..\Binaries\%CONFIGURATION%
14+
15+
REM set TESTS=%OutDir%\Tester.dll,%OutDir%\TesterInternal.dll,%OutDir%\Orleans.NonSiloTests.dll
16+
set TESTS=%OutDir%\Tester.dll,%OutDir%\Orleans.NonSiloTests.dll
17+
if []==[%TEST_FILTERS%] set TEST_FILTERS=-trait 'Category=BVT' -trait 'Category=SlowBVT'
18+
19+
@Echo Test assemblies = %TESTS%
20+
@Echo Test filters = %TEST_FILTERS%
21+
@echo on
22+
REM call "%CMDHOME%\SetupTestScript.cmd" "%OutDir%"
23+
24+
PowerShell -NoProfile -ExecutionPolicy Bypass -Command "& ../../src/Parallel-Tests.ps1 -assemblies %TESTS% -testFilter \"%TEST_FILTERS%\" -outDir '%OutDir%'"
25+
set testresult=%errorlevel%
26+
popd
27+
endlocal&set testresult=%testresult%
28+
exit /B %testresult%

‎vNext/src/TestAll.cmd

+16
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
@setlocal
2+
@ECHO off
3+
4+
SET CMDHOME=%~dp0
5+
@REM Remove trailing backslash \
6+
set CMDHOME=%CMDHOME:~0,-1%
7+
8+
@REM Due to more of Windows .cmd script parameter passing quirks, we can't pass this value as cmdline argument,
9+
@REM so we need to pass it in through the back door as environment variable, scoped by setlocal
10+
set TEST_FILTERS=-trait "Category=BVT" -trait "Category=SlowBVT" -trait "Category=Functional"
11+
12+
@REM Note: We transfer _complete_ control to the Test.cmd script here because we don't use CALL.
13+
14+
"%CMDHOME%\Test.cmd"
15+
16+
@REM Note: Execution will NOT return here, and the exit code returned to the caller will be whatever the other script returned.

0 commit comments

Comments
 (0)
Please sign in to comment.