forked from dotnet/wcf
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.override.targets
63 lines (53 loc) · 3.91 KB
/
build.override.targets
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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<TraversalBuildDependsOn>
<!-- WcfCopyProjectJson; -->
$(TraversalBuildDependsOn);
WcfCleanup;
</TraversalBuildDependsOn>
</PropertyGroup>
<PropertyGroup>
<WcfSelfHostSetupLog>$(MSBuildThisFileDirectory)\SelfHostedWcfServiceSetup.log</WcfSelfHostSetupLog>
<WcfSelfHostCleanupLog>$(MSBuildThisFileDirectory)\SelfHostedWcfServiceCleanup.log</WcfSelfHostCleanupLog>
</PropertyGroup>
<PropertyGroup>
<UseLatestDependencies Condition="'$(UseLatestDependencies)'==''">false</UseLatestDependencies>
</PropertyGroup>
<PropertyGroup Condition = "'$(UseLatestDependencies)' == 'true'" >
<ScenarioDependencyJson>$(MSBuildThisFileDirectory)\src\System.Private.ServiceModel\tools\test\JsonFiles\latest.dependencies.json</ScenarioDependencyJson>
</PropertyGroup>
<!-- If $(UseLatestDependencies) is 'false' and $(ScenarioDependencyJson) has not been set in command line use 'stable.dependencies.json' as the default value. -->
<PropertyGroup Condition = "'$(ScenarioDependencyJson)' == ''" >
<ScenarioDependencyJson>$(MSBuildThisFileDirectory)\src\System.Private.ServiceModel\tools\test\JsonFiles\stable.dependencies.json</ScenarioDependencyJson>
</PropertyGroup>
<!--if ServiceUri is set, the service has been already started on another machine-->
<Target Name="WcfSetup" BeforeTargets="BuildAllProjects" Condition="($(WithCategories.Contains('OuterLoop')) or '$(OuterLoop)' == 'true') and ('$(ServiceUri)' == '') and $(FilterToOSGroup) == 'Windows_NT'" >
<Delete Files="$(WcfSelfHostSetupLog)" Condition="Exists('$(WcfSelfHostSetupLog)')" />
<Exec Command="$(MSBuildThisFileDirectory)\src\System.Private.ServiceModel\tools\scripts\StartWCFSelfHostedSvc.cmd" ContinueOnError="true">
<Output TaskParameter="ExitCode" PropertyName="WcfSetupErrorCode"/>
</Exec>
<Message Text="WcfSetupErrorCode: $(WcfSetupErrorCode)" />
<!-- Log the console output generated by the scripts we invoked -->
<Message Text="-------------- WCF self-host outerloop setup start --------------" Importance="High" />
<Message Text="$([System.IO.File]::ReadAllText($(WcfSelfHostSetupLog)))" Condition="Exists('$(WcfSelfHostSetupLog)')" Importance="High"/>
<Message Text="-------------- WCF self-host outerloop setup end --------------" Importance="High"/>
</Target>
<Target Name="WcfCleanUp" Condition="$(WcfSetupErrorCode)!='-1' and $(WcfSetupErrorCode)!=''" >
<Message Text="-------------- WCF self-host outerloop cleanup start --------------" Importance="High" />
<Delete Files="$(WcfSelfHostCleanupLog)" Condition="Exists('$(WcfSelfHostCleanupLog)')" />
<Exec Command="$(MSBuildThisFileDirectory)\src\System.Private.ServiceModel\tools\scripts\StopWcfSelfHostedSvc.cmd" ContinueOnError="true" />
<Message Text="$([System.IO.File]::ReadAllText($(WcfSelfHostCleanupLog)))" Condition="Exists('$(WcfSelfHostCleanupLog)')" Importance="High" />
<Message Text="-------------- WCF self-host outerloop cleanup end --------------" Importance="High" />
</Target>
<!-- This target will copy a master version of project.json to the scenario test dirs. -->
<!-- There are different versions of the master project.json based on the value of $(ScenarioDependencyJson). -->
<Target Name="WcfCopyProjectJson">
<Message Text="-------------- WCF Start copying scenario project.json file to test directories --------------" Importance="High" />
<ItemGroup>
<CsProj Include="$(MSBuildThisFileDirectory)\src\System.Private.ServiceModel\tests\Scenarios\**\*.csproj"/>
</ItemGroup>
<Copy SourceFiles="$(ScenarioDependencyJson)" DestinationFiles="%(CsProj.RelativeDir)project.json"/>
<Message Text="-------------- WCF Finished copying scenario project.json file to test directories --------------" Importance="High" />
</Target>
</Project>