1 <Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
4 <__BuildType>$(ConfigurationGroup)</__BuildType>
7 <Import Project="..\dir.props" />
8 <Import Project="$(ToolsDir)CloudTest.targets" Condition="Exists('$(ToolsDir)CloudTest.targets')" />
10 <!-- Define test payload & Correlation (Core_Root) payload -->
12 <TestList Include="$(TestWorkingDir)\archive\tests\*" ></TestList>
13 <CoreRootUri Include="$(TestWorkingDir)\archive\Core_Root*\*.zip" ></CoreRootUri>
14 <DummyPackages Include="$(TestWorkingDir)\archive\packages\*" ></DummyPackages>
15 <ForUpload Include="@(TestList)" ></ForUpload>
16 <ForUpload Include="@(CoreRootUri)" ></ForUpload>
19 <!-- Define name & location of test JSON blob -->
21 <SkipArchive>true</SkipArchive>
22 <PayloadTestListFilename>Tests.$(ConfigurationGroup).json</PayloadTestListFilename>
23 <PayloadTestListFile>$(TestWorkingDir)$(PayloadTestListFilename)</PayloadTestListFile>
26 <Target Name="CreateTestListJson"
27 DependsOnTargets="CreateAzureStorage">
30 <SupplementalPayload Include="@(DummyPackages)" >
31 <RelativeBlobPath>$(Platform)$(ConfigurationGroup)/Packages.zip</RelativeBlobPath>
32 </SupplementalPayload>
33 <CorrelationPayloadUri Include="@(SupplementalPayload->'$(DropUri)%(RelativeBlobPath)$(DropUriReadOnlyToken)')" />
37 <!-- flatten it into a property as msbuild chokes on @(CorrelationPayloadUri) -->
38 <CorrelationPayloadUris>@(CorrelationPayloadUri)</CorrelationPayloadUris>
39 <!-- Define Correlation Payload as a property -->
40 <CoreRootUris>$(DropUri)$(Platform)$(ConfigurationGroup)/Tests/$([System.String]::Copy('%(RecursiveDir)').Replace('\', '/'))%(CoreRootUri.Filename)%(CoreRootUri.Extension)$(DropUriReadOnlyToken)</CoreRootUris>
41 <CorrelationPayloadProperty>$(CorrelationPayloadUris);$(CoreRootUris)</CorrelationPayloadProperty>
46 <Command Condition="'$(TargetsWindows)' == 'true'">$(HelixPythonPath) $(RunnerScript) --script %HELIX_WORKITEM_PAYLOAD%\runtests.cmd</Command>
47 <Command Condition="'$(TargetsWindows)' != 'true'">chmod +x $HELIX_WORKITEM_PAYLOAD/runtests.sh && $(HelixPythonPath) $(RunnerScript) --script $HELIX_WORKITEM_PAYLOAD/runtests.sh</Command>
48 <CorrelationPayloadUris>[$(CorrelationPayloadProperty)]</CorrelationPayloadUris>
49 <PayloadUri>$(DropUri)$(Platform)$(ConfigurationGroup)/Tests/$([System.String]::Copy('%(RecursiveDir)').Replace('\', '/'))%(Filename)%(Extension)$(DropUriReadOnlyToken)</PayloadUri>
50 <WorkItemId>%(Filename)</WorkItemId>
51 <TimeoutInSeconds>$(TimeoutInSeconds)</TimeoutInSeconds>
54 <WriteItemsToJson JsonFileName="$(PayloadTestListFile)" Items="@(TestList)" />
55 <!-- add test lists to the list of items for upload -->
57 <ForUpload Include="$(PayloadTestListFile)">
58 <RelativeBlobPath>$(PayloadTestListFilename)</RelativeBlobPath>
61 <!-- for completion event -->
63 <TestListFile Include="$(PayloadTestListFile)">
64 <BuildCompleteJson>$(TestWorkingDir)$(OSPlatformConfig)/FuncBuildComplete.json</BuildCompleteJson>
65 <OfficialBuildJson>$(TestWorkingDir)$(OSPlatformConfig)/FuncOfficialBuild.json</OfficialBuildJson>
66 <HelixJobUploadCompletePath>$(TestWorkingDir)$(OSPlatformConfig)/helixjobuploadcomplete.sem</HelixJobUploadCompletePath>
71 <Target Name="Build" />