forked from Azzhag/azure-sdk-tools
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.proj
308 lines (277 loc) · 14.4 KB
/
build.proj
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
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
<?xml version="1.0" encoding="utf-8"?>
<Project
xmlns="http://schemas.microsoft.com/developer/msbuild/2003"
ToolsVersion="4.0"
DefaultTargets="Clean;BuildDebug;BuildReleaseSigned;BuildSetupDebug">
<!-- Define build properties -->
<PropertyGroup>
<ManagementCmdletBinDirectory>.\WindowsAzurePowershell\src\Management\bin</ManagementCmdletBinDirectory>
<ManagementTestDirectory>.\WindowsAzurePowershell\src\Management.Test\bin</ManagementTestDirectory>
<ManagementTestAssemblyName>Microsoft.WindowsAzure.Management.Test.dll</ManagementTestAssemblyName>
<TestSettings>.\WindowsAzurePowershell\src\Local.testsettings</TestSettings>
<ScenarioTestSettings>.\WindowsAzurePowershell\src\Scenario.testsettings</ScenarioTestSettings>
<AzureRTTestSettings>.\WindowsAzurePowershell\src\AzureRT.testsettings</AzureRTTestSettings>
<ScenarioTestDebug>.\WindowsAzurePowershell\src\Management.ScenarioTest\bin\Debug\Microsoft.WindowsAzure.Management.ScenarioTest.dll</ScenarioTestDebug>
<AzureRTTestContainer>.\WindowsAzurePowershell\src\Management.ServiceManagement.Test\bin\Debug\Microsoft.WindowsAzure.Management.ServiceManagement.Test.dll</AzureRTTestContainer>
<StorageScenarioTestDebug>WindowsAzurePowershell\src\Management.Storage.ScenarioTest\bin\Debug\CLITest.dll</StorageScenarioTestDebug>
<ManagementTestDebug>.\WindowsAzurePowershell\src\Management.Test\bin\Debug\Microsoft.WindowsAzure.Management.Test.dll</ManagementTestDebug>
<ServiceManagementTestDebug>.\WindowsAzurePowershell\src\Management.ServiceManagement.Test\bin\Debug\Microsoft.WindowsAzure.Management.ServiceManagement.Test.dll</ServiceManagementTestDebug>
<SqlDatabaseTestDebug>.\WindowsAzurePowershell\src\Management.SqlDatabase.Test\bin\Debug\Microsoft.WindowsAzure.Management.SqlDatabase.Test.dll</SqlDatabaseTestDebug>
<StorageTestDebug>.\WindowsAzurePowershell\src\Management.Storage.Test\bin\Debug\Microsoft.WindowsAzure.Management.Storage.Test.dll</StorageTestDebug>
<SetupDirectory>.\WindowsAzurePowershell\setup\build</SetupDirectory>
<PublishDirectory>.\Publish</PublishDirectory>
<PackageDirectory>.\Package</PackageDirectory>
<BuildOutputDirectory>$(PublishDirectory)\Build</BuildOutputDirectory>
<SetupOutputDirectory>$(PublishDirectory)\Setup</SetupOutputDirectory>
<TestFilter>"!Functional&!Scenario&!LongRunningTest&!Sequential&!PIRTest"</TestFilter>
<ScenarioTestFilter>All</ScenarioTestFilter>
<OneSDKCITFilter>"OneSDK&CIT"</OneSDKCITFilter>
<TestOutputDirectory>$(PublishDirectory)\TestResults</TestOutputDirectory>
<DebugBuildConfig>Configuration=Debug;Platform=Any CPU</DebugBuildConfig>
<ReleaseBuildConfig>Configuration=Release;Platform=Any CPU</ReleaseBuildConfig>
<ReleaseSignedBuildConfig>Configuration=ReleaseSigned;Platform=Any CPU</ReleaseSignedBuildConfig>
</PropertyGroup>
<ItemGroup>
<CmdletSln Include=".\WindowsAzurePowershell\src\WindowsAzurePowershell.sln" />
<SetupSln Include=".\WindowsAzurePowershell\setup\azurepowershell.sln" />
</ItemGroup>
<!-- Clean the build in all configurations -->
<Target Name="Clean">
<!-- Clean the solutions -->
<Message Importance="high" Text="Cleaning Cmdlets..." ContinueOnError="false" />
<MSBuild
Projects="@(CmdletSln)"
Targets="Clean"
Properties="$(DebugBuildConfig)"
ContinueOnError="false" />
<MSBuild
Projects="@(CmdletSln)"
Targets="Clean"
Properties="$(ReleaseSignedBuildConfig)"
ContinueOnError="false" />
<MSBuild
Projects="@(SetupSln)"
Targets="Clean"
Properties="$(ReleaseBuildConfig)"
ContinueOnError="false" />
<MSBuild
Projects="@(SetupSln)"
Targets="Clean"
Properties="$(DebugBuildConfig)"
ContinueOnError="false" />
<!-- Delete the publish files -->
<Message Importance="high" Text="Cleaning publish files..." ContinueOnError="false" />
<ItemGroup>
<PublishFiles Include="$(PublishDirectory)\**\*.*" />
</ItemGroup>
<Delete
Files="@(PublishFiles)"
ContinueOnError="false" />
<RemoveDir
Directories="$(PublishDirectory)"
ContinueOnError="false" />
<!-- Delete the package files -->
<Message Importance="high" Text="Cleaning package files..." ContinueOnError="false" />
<ItemGroup>
<PackageFiles Include="$(PackageDirectory)\**\*.*" />
</ItemGroup>
<Delete
Files="@(PackageFiles)"
ContinueOnError="false" />
<RemoveDir
Directories="$(PackageDirectory)"
ContinueOnError="false" />
</Target>
<!-- Build all flavors of the Cmdlets -->
<Target Name="BuildCmdlets">
<Message Importance="high" Text="Building Cmdlets..." />
<MSBuild
Projects="@(CmdletSln)"
Targets="Build"
Properties="$(DebugBuildConfig)"
ContinueOnError="false" />
<MSBuild
Projects="@(CmdletSln)"
Targets="Build"
Properties="$(ReleaseSignedBuildConfig)"
ContinueOnError="false" />
</Target>
<!-- Build the Setup -->
<Target Name="BuildSetupDebug">
<Message
Importance="high"
Text="Building Setup..."
ContinueOnError="false" />
<Message
Importance="high"
Text="You are required to have installed the WiX Toolset at http://wix.codeplex.com/releases/view/60102 (Wix35.msi)"
ContinueOnError="false" />
<MSBuild
Projects="@(SetupSln)"
Targets="Build"
Properties="$(DebugBuildConfig)"
ContinueOnError="false" />
</Target>
<!-- Build the Setup -->
<Target Name="BuildSetup">
<Message
Importance="high"
Text="Building Setup..."
ContinueOnError="false" />
<Message
Importance="high"
Text="You are required to have installed the WiX Toolset at http://wix.codeplex.com/releases/view/60102 (Wix35.msi)"
ContinueOnError="false" />
<MSBuild
Projects="@(SetupSln)"
Targets="Build"
Properties="$(ReleaseBuildConfig)"
ContinueOnError="false" />
</Target>
<!-- Build the Cmdlets and Setup in all configurations -->
<Target Name="Build" DependsOnTargets="BuildCmdlets;BuildSetup" />
<!-- Publish any build artificates to the Publish directory -->
<Target Name="Publish" DependsOnTargets="Build">
<!-- Copy code artifacts -->
<Message Importance="high" Text="Publishing Cmdlets..." ContinueOnError="false" />
<ItemGroup>
<DebugFiles Include="$(CloudServiceCmdletBinDirectory)\Debug\**\*.*" />
<DebugFiles Include="$(ManagementCmdletBinDirectory)\Debug\**\*.*" />
<DebugFiles Include="$(ServiceManagementCmdletBinDirectory)\Debug\**\*.*" />
<ReleaseFiles Include="$(CloudServiceCmdletBinDirectory)\Release\**\*.*" />
<ReleaseFiles Include="$(ManagementCmdletBinDirectory)\Release\**\*.*" />
<ReleaseFiles Include="$(ServiceManagementCmdletBinDirectory)\Release\**\*.*" />
</ItemGroup>
<MakeDir
Directories="$(BuildOutputDirectory)"
ContinueOnError="false" />
<Copy
SourceFiles="@(DebugFiles)"
DestinationFiles="@(DebugFiles->'$(BuildOutputDirectory)\Debug\%(RecursiveDir)%(Filename)%(Extension)')"
SkipUnchangedFiles="true"
ContinueOnError="false" />
<Copy
SourceFiles="@(ReleaseFiles)"
DestinationFiles="@(ReleaseFiles->'$(BuildOutputDirectory)\Release\%(RecursiveDir)%(Filename)%(Extension)')"
SkipUnchangedFiles="true"
ContinueOnError="false" />
<!-- Copy the Setup artifacts -->
<Message Importance="high" Text="Publishing Setup..." ContinueOnError="false" />
<ItemGroup>
<SetupFiles Include="$(SetupDirectory)\**\*.*" />
</ItemGroup>
<Copy
SourceFiles="@(SetupFiles)"
DestinationFiles="@(SetupFiles->'$(PublishDirectory)\Setup\%(RecursiveDir)%(Filename)%(Extension)')"
SkipUnchangedFiles="true"
ContinueOnError="false" />
</Target>
<!-- Run the unit tests -->
<Target Name="Test" DependsOnTargets="BuildDebug">
<Message Importance="high" Text="Running tests..." />
<Message Importance="high" Text="You are required to have installed a version of Visual Studio with support for MSTest (and MSTest on your path)." />
<MakeDir Directories="$(TestOutputDirectory)" ContinueOnError="false" />
<Message Importance="high" Text="Debug tests:" />
<Exec
Command="MSTest.exe /testcontainer:$(ManagementTestDebug) /testsettings:$(TestSettings) /category:$(TestFilter) /resultsfile:$(TestOutputDirectory)\ManagementDebug.trx"
ContinueOnError="false" />
<Exec
Command="MSTest.exe /testcontainer:$(ServiceManagementTestDebug) /testsettings:$(TestSettings) /category:$(TestFilter) /resultsfile:$(TestOutputDirectory)\ServiceManagementDebug.trx"
ContinueOnError="false" />
<Exec
Command="MSTest.exe /testcontainer:$(SqlDatabaseTestDebug) /testsettings:$(TestSettings) /category:$(TestFilter) /resultsfile:$(TestOutputDirectory)\SqlDatabaseDebug.trx"
ContinueOnError="false" />
<Exec
Command="MSTest.exe /testcontainer:$(StorageTestDebug) /testsettings:$(TestSettings) /category:$(TestFilter) /resultsfile:$(TestOutputDirectory)\StorageDebug.trx"
ContinueOnError="false" />
</Target>
<!-- Run the scenario tests -->
<Target Name="ScenarioTest" DependsOnTargets="Clean;BuildDebug">
<Message Importance="high" Text="Running scenario tests..." />
<Message Importance="high" Text="You are required to have installed a version of Visual Studio with support for MSTest (and MSTest on your path)." />
<MakeDir Directories="$(TestOutputDirectory)" ContinueOnError="false" />
<Message Importance="high" Text="Scenario tests:" />
<Exec
Command="MSTest.exe /testcontainer:$(ScenarioTestDebug) /testsettings:$(TestSettings) /category:$(ScenarioTestFilter) /resultsfile:$(TestOutputDirectory)\Debug.trx"
ContinueOnError="false" />
<Exec
Command="MSTest.exe /testcontainer:$(StorageScenarioTestDebug) /testsettings:$(TestSettings) /category:$(ScenarioTestFilter) /resultsfile:$(TestOutputDirectory)\StorageScenarioDebug.trx"
ContinueOnError="false" />
</Target>
<!-- Run the CITs -->
<Target Name="RunOneSDKCIT" DependsOnTargets="Clean;BuildDebug">
<Message Importance="high" Text="Running CITs..." />
<Message Importance="high" Text="You are required to have installed a version of Visual Studio with support for MSTest (and MSTest on your path)." />
<MakeDir Directories="$(TestOutputDirectory)" ContinueOnError="false" />
<Message Importance="high" Text="Scenario tests:" />
<Exec
Command="MSTest.exe /testcontainer:$(ScenarioTestDebug) /testsettings:$(TestSettings) /category:$(OneSDKCITFilter) /resultsfile:$(TestOutputDirectory)\Debug.trx"
ContinueOnError="false" />
</Target>
<!-- Run the scenario tests -->
<Target Name="AzureRTScenarioTest2" DependsOnTargets="Clean;BuildDebug">
<Message Importance="high" Text="Running scenario tests..." />
<Message Importance="high" Text="You are required to have installed a version of Visual Studio with support for MSTest (and MSTest on your path)." />
<MakeDir Directories="$(TestOutputDirectory)" ContinueOnError="false" />
<Message Importance="high" Text="Scenario tests:" />
<Exec
Command="MSTest.exe /testcontainer:$(ScenarioTestDebug) /testsettings:$(TestSettings) /category:ServiceManagement /resultsfile:$(TestOutputDirectory)\Debug.trx"
ContinueOnError="false" />
</Target>
<Target Name="AzureRTBVTs" DependsOnTargets="Clean;BuildDebug">
<Message Importance="high" Text="Running AzureRT BVT tests..." />
<Message Importance="high" Text="You are required to have installed a version of Visual Studio with support for MSTest (and MSTest on your path)." />
<MakeDir Directories="$(TestOutputDirectory)" ContinueOnError="false" />
<Message Importance="high" Text="BVT tests:" />
<Exec
Command="MSTest.exe /testcontainer:$(AzureRTTestContainer) /testsettings:$(AzureRTTestSettings) /category:BVT /resultsfile:$(TestOutputDirectory)\RTBVTDebug.trx"
ContinueOnError="false" />
</Target>
<Target Name="AzureRTScenarios" DependsOnTargets="Clean;BuildDebug">
<Message Importance="high" Text="Running scenario tests..." />
<Message Importance="high" Text="You are required to have installed a version of Visual Studio with support for MSTest (and MSTest on your path)." />
<MakeDir Directories="$(TestOutputDirectory)" ContinueOnError="false" />
<Message Importance="high" Text="Scenario tests:" />
<Exec
Command="MSTest.exe /testcontainer:$(AzureRTTestContainer) /testsettings:$(AzureRTTestSettings) /category:Scenario /resultsfile:$(TestOutputDirectory)\RTScenarioDebug.trx"
ContinueOnError="false" />
</Target>
<Target Name="AzureRTFunctionals" DependsOnTargets="Clean;BuildDebug">
<Message Importance="high" Text="Running AzureRT functional tests..." />
<Message Importance="high" Text="You are required to have installed a version of Visual Studio with support for MSTest (and MSTest on your path)." />
<MakeDir Directories="$(TestOutputDirectory)" ContinueOnError="false" />
<Message Importance="high" Text="Functional tests:" />
<Exec
Command="MSTest.exe /testcontainer:$(AzureRTTestContainer) /testsettings:$(TestSettings) /category:Sequential /resultsfile:$(TestOutputDirectory)\RTAddVhdDebug.trx"
ContinueOnError="true" />
<Exec
Command="MSTest.exe /testcontainer:$(AzureRTTestContainer) /testsettings:$(AzureRTTestSettings) /category:Functional /resultsfile:$(TestOutputDirectory)\RTFunctionalDebug.trx"
ContinueOnError="false" />
</Target>
<!-- Do everything possible -->
<Target
Name="Full"
DependsOnTargets="Clean;BuildDebug;BuildReleaseSigned;Test;BuildSetupDebug;BuildSetup" />
<!-- Run Full switch with scenario tests -->
<Target
Name="FullWithScenarioTests"
DependsOnTargets="Clean;BuildDebug;BuildReleaseSigned;Test;BuildSetupDebug;BuildSetup;RunOneSDKCIT" />
<!-- Build the Cmdlets in ReleaseSigned configuration -->
<Target Name="BuildReleaseSigned">
<Message Importance="high" Text="Building Cmdlets in ReleaseSigned config..." />
<MSBuild
Projects="@(CmdletSln)"
Targets="Build"
Properties="$(ReleaseSignedBuildConfig)"
ContinueOnError="false" />
</Target>
<!-- Build the Cmdlets in Debug configuration -->
<Target Name="BuildDebug">
<Message Importance="high" Text="Building Cmdlets in Debug config..." />
<MSBuild
Projects="@(CmdletSln)"
Targets="Build"
Properties="$(DebugBuildConfig)"
ContinueOnError="false" />
</Target>
</Project>