forked from dotnet/iot
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsendToHelix.proj
94 lines (83 loc) · 4.22 KB
/
sendToHelix.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
<Project Sdk="Microsoft.DotNet.Helix.Sdk">
<PropertyGroup>
<TestOS Condition="'$(TestOS)' == ''">$(OS)</TestOS>
<HelixSourcePrefix>pr</HelixSourcePrefix>
<HelixSourcePrefix Condition="'$(HelixAccessToken)' != ''">official</HelixSourcePrefix>
<HelixSource>$(HelixSourcePrefix)/dotnet/iot/$(BUILD_SOURCEBRANCH)/</HelixSource>
<HelixType>test/product/</HelixType>
<HelixBuild>$(BUILD_BUILDNUMBER)</HelixBuild>
<HelixBuild Condition="'$(HelixBuild)' == ''">123460.01</HelixBuild>
<HelixConfiguration>$(Configuration)</HelixConfiguration>
<XUnitArguments>$(XUnitArguments) -nocolor -verbose -serialize -maxthreads 1</XUnitArguments>
<IncludeDotNetCli>true</IncludeDotNetCli>
<DotNetCliPackageType>sdk</DotNetCliPackageType>
<DotNetCliVersion>3.1.405</DotNetCliVersion>
<EnableAzurePipelinesReporter Condition="'$(SYSTEM_ACCESSTOKEN)' != ''">true</EnableAzurePipelinesReporter>
<TestRunNamePrefix>$(AGENT_JOBNAME)</TestRunNamePrefix>
<EnableXUnitReporter>true</EnableXUnitReporter>
<FailOnMissionControlTestFailure>true</FailOnMissionControlTestFailure>
</PropertyGroup>
<PropertyGroup Condition=" '$(HelixAccessToken)' == '' ">
<Creator>$(BUILD_SOURCEVERSIONAUTHOR)</Creator>
<Creator Condition=" '$(Creator)' == ''">dotnet-bot</Creator>
</PropertyGroup>
<ItemGroup Condition="'$(HelixTargetQueue)' != ''">
<HelixTargetQueue Include="$(HelixTargetQueue)"/>
</ItemGroup>
<!-- Windows-specific settings -->
<ItemGroup Condition="'$(TestOS)' == 'Windows_NT'">
<!-- Xunit project to test -->
<XUnitProject Include="..\src\System.Device.Gpio.Tests\System.Device.Gpio.Tests.csproj">
<TargetFramework>netcoreapp3.1</TargetFramework>
<RuntimeTargetFramework>netcoreapp2.0</RuntimeTargetFramework>
</XUnitProject>
<!-- Target queues -->
<HelixTargetQueue Condition="'$(HelixAccessToken)' != ''" Include="Windows.10.Arm32.IoT"/>
<HelixTargetQueue Condition="'$(HelixAccessToken)' == ''" Include="Windows.10.Arm32.IoT.Open"/>
</ItemGroup>
<PropertyGroup Condition="'$(TestOS)' == 'Windows_NT'">
<DotNetCliRuntime>win-arm</DotNetCliRuntime>
<XUnitArguments>$(XUnitArguments) -notrait "SkipOnTestRun=Windows_NT"</XUnitArguments>
<!-- Issue: https://github.com/dotnet/iot/issues/934 -->
<XUnitArguments>$(XUnitArguments) -notrait feature=pwm</XUnitArguments>
</PropertyGroup>
<!-- Linux-specific settings -->
<ItemGroup Condition="'$(TestOS)' == 'Unix'">
<!-- Xunit project to test -->
<XUnitProject Include="..\src\System.Device.Gpio.Tests\System.Device.Gpio.Tests.csproj">
<TargetFramework>netcoreapp3.1</TargetFramework>
<RuntimeTargetFramework>netcoreapp2.0</RuntimeTargetFramework>
</XUnitProject>
<!-- Target queues -->
<HelixTargetQueue Condition="'$(HelixAccessToken)' != ''" Include="Raspbian.9.Arm32.IoT"/>
<HelixTargetQueue Condition="'$(HelixAccessToken)' == ''" Include="Raspbian.9.Arm32.IoT.Open"/>
</ItemGroup>
<PropertyGroup Condition="'$(TestOS)' == 'Unix'">
<XUnitArguments>$(XUnitArguments) -notrait "SkipOnTestRun=Unix"</XUnitArguments>
</PropertyGroup>
<!-- Our Unix tests require to run as elevated. -->
<Target Name="AppendSudoToHelixWorkItems"
Condition="'$(TestOS)' == 'Unix'"
Inputs="%(HelixWorkItem.Identity)%(HelixWorkItem.Command)"
Outputs="unused"
AfterTargets="CreateXUnitWorkItems">
<PropertyGroup>
<!-- Because our tests need to run as sudo, PATH environment variable is reset so we need to set
a different variable to the full path of dotnet -->
<HelixPreCommands>$(HelixPreCommands);export _dotnet="%24(which dotnet)"</HelixPreCommands>
<!-- Pre append sudo and the full path to dotnet to the command, along with a dollarsign throwAway
which will remove the initial dotnet from the helix command as it will be interpreted as a
variable -->
<_newCommand>sudo -E $_dotnet $throwAway%(HelixWorkItem.Command)</_newCommand>
</PropertyGroup>
<ItemGroup>
<HelixWorkItem>
<Command>$(_newCommand)</Command>
</HelixWorkItem>
</ItemGroup>
</Target>
<!-- Useless stuff to make Arcade SDK happy -->
<PropertyGroup>
<Language>msbuild</Language>
</PropertyGroup>
</Project>