Skip to content

Commit 83869bf

Browse files
Final set of changes to complete the port of CoreFx PR 10231
* Changes related to build.override.targets so that the needed targets are called at the correct time. * Moved a cleaning step for the self hosted service from build.override.targets to the clean.cmd because it has to occur before the call to "git clean -xdf". * Ran "git update-index --chmod=+x" against several .sh files so they are marked as an executable on Linux. * Including changes to netci.groovy
1 parent 4c76ca6 commit 83869bf

12 files changed

+86
-42
lines changed

build-managed.sh

100644100755
File mode changed.

build-packages.sh

100644100755
File mode changed.

build-tests.sh

100644100755
File mode changed.

build.override.targets

Lines changed: 1 addition & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -4,19 +4,11 @@
44
<PropertyGroup>
55
<TraversalBuildDependsOn>
66
<!-- WcfCopyProjectJson; -->
7-
WcfSetup;
87
$(TraversalBuildDependsOn);
98
WcfCleanup;
109
</TraversalBuildDependsOn>
1110
</PropertyGroup>
1211

13-
<PropertyGroup>
14-
<TraversalCleanDependsOn>
15-
WcfClean;
16-
$(TraversalCleanDependsOn);
17-
</TraversalCleanDependsOn>
18-
</PropertyGroup>
19-
2012
<PropertyGroup>
2113
<WcfSelfHostSetupLog>$(MSBuildThisFileDirectory)\SelfHostedWcfServiceSetup.log</WcfSelfHostSetupLog>
2214
<WcfSelfHostCleanupLog>$(MSBuildThisFileDirectory)\SelfHostedWcfServiceCleanup.log</WcfSelfHostCleanupLog>
@@ -36,7 +28,7 @@
3628
</PropertyGroup>
3729

3830
<!--if ServiceUri is set, the service has been already started on another machine-->
39-
<Target Name="WcfSetup" Condition="($(WithCategories.Contains('OuterLoop')) or '$(OuterLoop)' == 'true') and ('$(ServiceUri)' == '') and $(OSEnvironment) == 'Windows_NT'" >
31+
<Target Name="WcfSetup" BeforeTargets="BuildAllProjects" Condition="($(WithCategories.Contains('OuterLoop')) or '$(OuterLoop)' == 'true') and ('$(ServiceUri)' == '') and $(FilterToOSGroup) == 'Windows_NT'" >
4032
<Delete Files="$(WcfSelfHostSetupLog)" Condition="Exists('$(WcfSelfHostSetupLog)')" />
4133
<Exec Command="$(MSBuildThisFileDirectory)\src\System.Private.ServiceModel\tools\scripts\StartWCFSelfHostedSvc.cmd" ContinueOnError="true">
4234
<Output TaskParameter="ExitCode" PropertyName="WcfSetupErrorCode"/>
@@ -57,18 +49,6 @@
5749
<Message Text="-------------- WCF self-host outerloop cleanup end --------------" Importance="High" />
5850
</Target>
5951

60-
<!-- The WcfClean target executes via clean.cmd or build /t:Clean.
61-
Currently it runs only on Windows in order to ensure the SelfHost
62-
WCF service has been closed to ensure the bin folder can be deleted.
63-
-->
64-
<Target Name="WcfClean" Condition="$(OSEnvironment) == 'Windows_NT'">
65-
<Message Text="-------------- WCF clean start --------------" Importance="High" />
66-
<Delete Files="$(WcfSelfHostCleanupLog)" Condition="Exists('$(WcfSelfHostCleanupLog)')" />
67-
<Exec Command="$(MSBuildThisFileDirectory)\src\System.Private.ServiceModel\tools\scripts\StopWcfSelfHostedSvc.cmd" ContinueOnError="true" />
68-
<Message Text="$([System.IO.File]::ReadAllText($(WcfSelfHostCleanupLog)))" Condition="Exists('$(WcfSelfHostCleanupLog)')" Importance="High" />
69-
<Message Text="-------------- WCF clean end --------------" Importance="High" />
70-
</Target>
71-
7252
<!-- This target will copy a master version of project.json to the scenario test dirs. -->
7353
<!-- There are different versions of the master project.json based on the value of $(ScenarioDependencyJson). -->
7454
<Target Name="WcfCopyProjectJson">

clean.cmd

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,10 @@ setlocal EnableDelayedExpansion
44
echo Stop VBCSCompiler.exe execution.
55
for /f "tokens=2 delims=," %%F in ('tasklist /nh /fi "imagename eq VBCSCompiler.exe" /fo csv') do taskkill /f /PID %%~F
66

7+
echo Cleanup StopWcfSelfHostedSvc.cmd
8+
call src\System.Private.ServiceModel\tools\scripts\StopWcfSelfHostedSvc.cmd
9+
type SelfHostedWcfServiceCleanup.log
10+
711
if [%1] == [-all] (
812
echo Cleaning entire working directory ...
913
call git clean -xdf

config.json

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -162,12 +162,6 @@
162162
"values": ["x86", "arm", "arm-softfp", "x64", "arm64"],
163163
"defaultValue": "${CPUArch}"
164164
},
165-
"CmakeBuildType": {
166-
"description": "Sets the value of the build configuration.",
167-
"valueType": "passThrough",
168-
"values": [],
169-
"defaultValue": "Debug"
170-
},
171165
"HostOs": {
172166
"description": "OS for result binaries.",
173167
"valueType": "passThrough",

netci.groovy

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ def branch = GithubBranchName
1010

1111
// Globals
1212

13-
// Map of os -> osGroup.
13+
// Map of osName -> osGroup.
1414
def osGroupMap = ['Ubuntu':'Linux',
1515
'Ubuntu14.04':'Linux',
1616
'Ubuntu16.04':'Linux',
@@ -21,7 +21,7 @@ def osGroupMap = ['Ubuntu':'Linux',
2121
'OpenSUSE13.2': 'Linux',
2222
'RHEL7.2': 'Linux']
2323

24-
// Map of os -> nuget runtime
24+
// Map of osName -> nuget runtime
2525
def targetNugetRuntimeMap = ['OSX' : 'osx.10.10-x64',
2626
'Ubuntu' : 'ubuntu.14.04-x64',
2727
'Ubuntu14.04' : 'ubuntu.14.04-x64',
@@ -109,7 +109,7 @@ wcfUtilities = new WcfUtilities()
109109

110110
newJob.with {
111111
steps {
112-
batchFile("build.cmd /p:ShouldCreatePackage=false /p:ShouldGenerateNuSpec=false /p:OSGroup=${osGroupMap[os]} /p:ConfigurationGroup=${configurationGroup} /p:Coverage=true /p:WithCategories=\"InnerLoop;OuterLoop\" /p:ServiceUri=%WcfServiceUri%")
112+
batchFile("build.cmd -coverage -outerloop -${configurationGroup} -- /p:ShouldGenerateNuSpec=false /p:OSGroup=${osGroupMap[os]} /p:WithCategories=\"InnerLoop;OuterLoop\" /p:ServiceUri=%WcfServiceUri%")
113113
}
114114
}
115115

@@ -152,7 +152,7 @@ wcfUtilities = new WcfUtilities()
152152

153153
newJob.with {
154154
steps {
155-
batchFile("build.cmd /p:ConfigurationGroup=${configurationGroup} /p:OSGroup=${osGroupMap[os]} /p:WithCategories=OuterLoop")
155+
batchFile("build.cmd -${configurationGroup} -outerloop -- /p:OSGroup=${osGroupMap[os]}")
156156
}
157157
}
158158

@@ -193,14 +193,14 @@ def supportedFullCycleOuterloopPlatforms = ['Windows_NT', 'Ubuntu14.04', 'Ubuntu
193193
if (osGroupMap[os] == 'Windows_NT') {
194194
newJob.with {
195195
steps {
196-
batchFile("build.cmd /p:ConfigurationGroup=${configurationGroup} /p:OSGroup=${osGroupMap[os]} /p:WithCategories=OuterLoop /p:ServiceUri=%WcfServiceUri% /p:SSL_Available=true /p:Root_Certificate_Installed=true /p:Client_Certificate_Installed=true /p:Peer_Certificate_Installed=true")
196+
batchFile("build.cmd -${configurationGroup} -outerloop -- /p:OSGroup=${osGroupMap[os]} /p:ServiceUri=%WcfServiceUri% /p:SSL_Available=true /p:Root_Certificate_Installed=true /p:Client_Certificate_Installed=true /p:Peer_Certificate_Installed=true")
197197
}
198198
}
199199
}
200200
else {
201201
newJob.with {
202202
steps {
203-
shell("HOME=\$WORKSPACE/tempHome ./build.sh /p:ConfigurationGroup=${configurationGroup} /p:OSGroup=${osGroupMap[os]} /p:WithCategories=OuterLoop /p:TestWithLocalLibraries=true /p:ServiceUri=\$WcfServiceUri /p:SSL_Available=true /p:Root_Certificate_Installed=true /p:Client_Certificate_Installed=true /p:Peer_Certificate_Installed=true")
203+
shell("HOME=\$WORKSPACE/tempHome ./build.sh -${configurationGroup.toLowerCase()} -outerloop -testWithLocalLibraries -- /p:OSGroup=${osGroupMap[os]} /p:ServiceUri=\$WcfServiceUri /p:SSL_Available=true /p:Root_Certificate_Installed=true /p:Client_Certificate_Installed=true /p:Peer_Certificate_Installed=true")
204204
}
205205
}
206206
}
@@ -266,15 +266,15 @@ def supportedFullCycleInnerloopPlatforms = ['Windows_NT', 'Ubuntu14.04', 'Ubuntu
266266
{
267267
newJob.with {
268268
steps {
269-
batchFile("call \"C:\\Program Files (x86)\\Microsoft Visual Studio 14.0\\VC\\vcvarsall.bat\" x86 && build.cmd /p:ConfigurationGroup=${configurationGroup} /p:OSGroup=${osGroupMap[os]}")
269+
batchFile("call \"C:\\Program Files (x86)\\Microsoft Visual Studio 14.0\\VC\\vcvarsall.bat\" x86 && build.cmd -${configurationGroup} -- /p:OSGroup=${osGroupMap[os]}")
270270
batchFile("C:\\Packer\\Packer.exe .\\bin\\build.pack .\\bin")
271271
}
272272
}
273273
}
274274
else {
275275
newJob.with {
276276
steps {
277-
shell("HOME=\$WORKSPACE/tempHome ./build.sh /p:ShouldCreatePackage=false /p:ShouldGenerateNuSpec=false /p:OSGroup=${osGroupMap[os]} /p:ConfigurationGroup=${configurationGroup}")
277+
shell("HOME=\$WORKSPACE/tempHome ./build.sh -${configurationGroup.toLowerCase()} -- /p:ShouldGenerateNuSpec=false /p:OSGroup=${osGroupMap[os]}")
278278
}
279279
}
280280
}

publish-packages.sh

100644100755
File mode changed.

run.sh

100644100755
File mode changed.
Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
{
22
"dependencies": {
33
"System.Collections.Concurrent": "4.0.12",
4+
"System.Runtime.Extensions": "4.1.0",
45
"System.ServiceModel.Duplex": "4.0.2-beta-24431-01",
56
"System.ServiceModel.Http": "4.1.1-beta-24431-01",
67
"System.ServiceModel.NetTcp": "4.1.1-beta-24431-01",
@@ -13,14 +14,14 @@
1314
}
1415
},
1516
"frameworks": {
16-
"netstandard1.3": {}
17+
"netstandard1.3": { }
1718
},
1819
"supports": {
19-
"coreFx.Test.netcore50": {},
20-
"coreFx.Test.netcoreapp1.0": {},
21-
"coreFx.Test.net46": {},
22-
"coreFx.Test.net461": {},
23-
"coreFx.Test.net462": {},
24-
"coreFx.Test.net463": {}
20+
"coreFx.Test.netcore50": { },
21+
"coreFx.Test.netcoreapp1.0": { },
22+
"coreFx.Test.net46": { },
23+
"coreFx.Test.net461": { },
24+
"coreFx.Test.net462": { },
25+
"coreFx.Test.net463": { }
2526
}
2627
}

src/test.override.targets

Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
3+
4+
<PropertyGroup>
5+
<TraversalBuildDependsOn>
6+
<!-- WcfCopyProjectJson; -->
7+
$(TraversalBuildDependsOn);
8+
WcfCleanup;
9+
</TraversalBuildDependsOn>
10+
</PropertyGroup>
11+
12+
<PropertyGroup>
13+
<WcfSelfHostSetupLog>$(MSBuildThisFileDirectory)\SelfHostedWcfServiceSetup.log</WcfSelfHostSetupLog>
14+
<WcfSelfHostCleanupLog>$(MSBuildThisFileDirectory)\SelfHostedWcfServiceCleanup.log</WcfSelfHostCleanupLog>
15+
</PropertyGroup>
16+
17+
<PropertyGroup>
18+
<UseLatestDependencies Condition="'$(UseLatestDependencies)'==''">false</UseLatestDependencies>
19+
</PropertyGroup>
20+
21+
<PropertyGroup Condition = "'$(UseLatestDependencies)' == 'true'" >
22+
<ScenarioDependencyJson>$(MSBuildThisFileDirectory)\src\System.Private.ServiceModel\tools\test\JsonFiles\latest.dependencies.json</ScenarioDependencyJson>
23+
</PropertyGroup>
24+
25+
<!-- If $(UseLatestDependencies) is 'false' and $(ScenarioDependencyJson) has not been set in command line use 'stable.dependencies.json' as the default value. -->
26+
<PropertyGroup Condition = "'$(ScenarioDependencyJson)' == ''" >
27+
<ScenarioDependencyJson>$(MSBuildThisFileDirectory)\src\System.Private.ServiceModel\tools\test\JsonFiles\stable.dependencies.json</ScenarioDependencyJson>
28+
</PropertyGroup>
29+
30+
<!--if ServiceUri is set, the service has been already started on another machine-->
31+
<Target Name="WcfSetup" BeforeTargets="BuildAllProjects" Condition="($(WithCategories.Contains('OuterLoop')) or '$(OuterLoop)' == 'true') and ('$(ServiceUri)' == '') and $(FilterToOSGroup) == 'Windows_NT'" >
32+
<Delete Files="$(WcfSelfHostSetupLog)" Condition="Exists('$(WcfSelfHostSetupLog)')" />
33+
<Exec Command="$(MSBuildThisFileDirectory)\System.Private.ServiceModel\tools\scripts\StartWCFSelfHostedSvc.cmd" ContinueOnError="true">
34+
<Output TaskParameter="ExitCode" PropertyName="WcfSetupErrorCode"/>
35+
</Exec>
36+
<Message Text="WcfSetupErrorCode: $(WcfSetupErrorCode)" />
37+
38+
<!-- Log the console output generated by the scripts we invoked -->
39+
<Message Text="-------------- WCF self-host outerloop setup start --------------" Importance="High" />
40+
<Message Text="$([System.IO.File]::ReadAllText($(WcfSelfHostSetupLog)))" Condition="Exists('$(WcfSelfHostSetupLog)')" Importance="High"/>
41+
<Message Text="-------------- WCF self-host outerloop setup end --------------" Importance="High"/>
42+
</Target>
43+
44+
<Target Name="WcfCleanUp" Condition="$(WcfSetupErrorCode)!='-1' and $(WcfSetupErrorCode)!=''" >
45+
<Message Text="-------------- WCF self-host outerloop cleanup start --------------" Importance="High" />
46+
<Delete Files="$(WcfSelfHostCleanupLog)" Condition="Exists('$(WcfSelfHostCleanupLog)')" />
47+
<Exec Command="$(MSBuildThisFileDirectory)\System.Private.ServiceModel\tools\scripts\StopWcfSelfHostedSvc.cmd" ContinueOnError="true" />
48+
<Message Text="$([System.IO.File]::ReadAllText($(WcfSelfHostCleanupLog)))" Condition="Exists('$(WcfSelfHostCleanupLog)')" Importance="High" />
49+
<Message Text="-------------- WCF self-host outerloop cleanup end --------------" Importance="High" />
50+
</Target>
51+
52+
<!-- This target will copy a master version of project.json to the scenario test dirs. -->
53+
<!-- There are different versions of the master project.json based on the value of $(ScenarioDependencyJson). -->
54+
<Target Name="WcfCopyProjectJson">
55+
<Message Text="-------------- WCF Start copying scenario project.json file to test directories --------------" Importance="High" />
56+
<ItemGroup>
57+
<CsProj Include="$(MSBuildThisFileDirectory)\src\System.Private.ServiceModel\tests\Scenarios\**\*.csproj"/>
58+
</ItemGroup>
59+
<Copy SourceFiles="$(ScenarioDependencyJson)" DestinationFiles="%(CsProj.RelativeDir)project.json"/>
60+
<Message Text="-------------- WCF Finished copying scenario project.json file to test directories --------------" Importance="High" />
61+
</Target>
62+
63+
</Project>

src/tests.builds

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,8 @@
2020

2121
<Import Project="$(ToolsDir)versioning.targets" Condition="Exists('$(ToolsDir)versioning.targets')" />
2222
<Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.traversal.targets))\dir.traversal.targets" />
23+
<!-- Hook that can be used to insert custom build tasks to the build process such as setup and/or cleanup tasks -->
24+
<Import Project="test.override.targets" Condition="Exists('test.override.targets')" />
2325

2426
<!-- Make Sure that CreateOrUpdateCurrentVersionFile is the first target that runs. -->
2527
<PropertyGroup>

0 commit comments

Comments
 (0)