|
5 | 5 | to send test jobs to helix. --> |
6 | 6 |
|
7 | 7 | <Import Sdk="Microsoft.DotNet.Helix.Sdk" Project="Sdk.props" Condition=" '$(UsesHelixSdk)' == 'true' " /> |
8 | | - <Import Project="Directory.Build.props" Condition=" '$(UsesHelixSdk)' != 'true' "/> |
| 8 | + <Import Sdk="Microsoft.Build.NoTargets" Project="Sdk.props" Condition=" '$(UsesHelixSdk)' != 'true' " /> |
9 | 9 |
|
10 | 10 | <!-- This target runs once and creates several instances of this project (one for each scenario) |
11 | 11 | that will run in parallel. --> |
|
33 | 33 | RunInUnloadableContext=$(_RunInUnloadableContext); |
34 | 34 | TimeoutPerTestCollectionInMinutes=$(_TimeoutPerTestCollectionInMinutes); |
35 | 35 | TimeoutPerTestInMinutes=$(_TimeoutPerTestInMinutes); |
36 | | - RuntimeMode=$(_RuntimeMode) |
| 36 | + RuntimeMode=$(_RuntimeMode); |
| 37 | + BundledNETCoreAppPackageVersion=$(BundledNETCoreAppPackageVersion) |
37 | 38 | </_PropertiesToPass> |
38 | 39 | </PropertyGroup> |
39 | 40 |
|
| 41 | + <Message Text="DotNetCliVersion: $(DotNetCliVersion)" Importance="High" /> |
| 42 | + <Message Text="DotNetCliPackageType: $(DotNetCliPackageType)" Importance="High" /> |
| 43 | + <Message Text="HelixRuntimeRid: $(HelixRuntimeRid)" Importance="High" /> |
40 | 44 | <Error Condition="'$(_Scenarios)' == ''" Text="_Scenarios not set" /> |
41 | 45 |
|
42 | 46 | <MSBuild Projects="$(MSBuildProjectFile)" Targets="PrepareCorrelationPayloadDirectory" /> |
|
59 | 63 | <MSBuild Projects="@(_ProjectsToBuild)" Targets="Test" BuildInParallel="$(_BuildInParallel)" StopOnFirstFailure="false" Properties="UsesHelixSdk=true" /> |
60 | 64 | </Target> |
61 | 65 |
|
| 66 | + <!-- Choose a suitable runtime RID for Helix to restore the dotnet cli --> |
| 67 | + <PropertyGroup> |
| 68 | + <HelixRuntimeRid Condition="'$(TargetOS)' == 'Windows_NT'">win-$(TargetArchitecture)</HelixRuntimeRid> |
| 69 | + <HelixRuntimeRid Condition="'$(TargetOS)' == 'OSX'">osx-$(TargetArchitecture)</HelixRuntimeRid> |
| 70 | + <HelixRuntimeRid Condition="'$(TargetOS)' == 'Linux' or '$(TargetOS)' == 'Linux_musl'">linux-$(TargetArchitecture)</HelixRuntimeRid> |
| 71 | + </PropertyGroup> |
| 72 | + |
62 | 73 | <PropertyGroup> |
63 | 74 | <BinDir>$([MSBuild]::NormalizeDirectory($(TestWorkingDir)))</BinDir> |
64 | 75 | <CoreRootDirectory>$(BinDir)Tests\Core_Root\</CoreRootDirectory> |
65 | 76 | <PayloadsRootDirectory>$(BinDir)Payloads\</PayloadsRootDirectory> |
66 | 77 | <TestEnvFileName Condition=" '$(TargetsWindows)' == 'true' ">SetStressModes_$(Scenario).cmd</TestEnvFileName> |
67 | 78 | <TestEnvFileName Condition=" '$(TargetsWindows)' != 'true' ">SetStressModes_$(Scenario).sh</TestEnvFileName> |
| 79 | + |
| 80 | + <IncludeDotNetCli>true</IncludeDotNetCli> |
| 81 | + <DotNetCliPackageType>runtime</DotNetCliPackageType> |
| 82 | + <DotNetCliVersion>$(BundledNETCoreAppPackageVersion)</DotNetCliVersion> |
| 83 | + <DotNetCliRuntime>$(HelixRuntimeRid)</DotNetCliRuntime> |
68 | 84 | </PropertyGroup> |
69 | 85 |
|
70 | 86 | <Import Project="testgrouping.proj" /> |
|
236 | 252 | </PropertyGroup> |
237 | 253 |
|
238 | 254 | <PropertyGroup Condition=" '$(TargetsWindows)' == 'true' "> |
239 | | - <CoreRun>%CORE_ROOT%\CoreRun.exe</CoreRun> |
240 | 255 | <XUnitRunnerDll>%CORE_ROOT%\xunit.console.dll</XUnitRunnerDll> |
241 | 256 | </PropertyGroup> |
242 | 257 |
|
243 | 258 | <PropertyGroup Condition=" '$(TargetsWindows)' != 'true' "> |
244 | | - <CoreRun>$CORE_ROOT/corerun</CoreRun> |
245 | 259 | <XUnitRunnerDll>$CORE_ROOT/xunit.console.dll</XUnitRunnerDll> |
246 | 260 | </PropertyGroup> |
247 | 261 |
|
|
263 | 277 |
|
264 | 278 | <HelixWorkItem Include="@(Payloads->Metadata('PayloadGroup'))"> |
265 | 279 | <PayloadDirectory>%(PayloadDirectory)</PayloadDirectory> |
266 | | - <Command>$(CoreRun) $(XUnitRunnerDll) %(XUnitWrapperDlls) $(XUnitRunnerArgs)</Command> |
267 | | - <Command Condition=" '%(TestGroup)' != '' ">$(CoreRun) $(XUnitRunnerDll) %(XUnitWrapperDlls) $(XUnitRunnerArgs) -trait TestGroup=%(TestGroup)</Command> |
| 280 | + <Command>dotnet $(XUnitRunnerDll) %(XUnitWrapperDlls) $(XUnitRunnerArgs)</Command> |
| 281 | + <Command Condition=" '%(TestGroup)' != '' ">dotnet $(XUnitRunnerDll) %(XUnitWrapperDlls) $(XUnitRunnerArgs) -trait TestGroup=%(TestGroup)</Command> |
268 | 282 | <Timeout Condition=" '$(TimeoutPerTestCollectionInMinutes)' != '' ">$([System.TimeSpan]::FromMinutes($(TimeoutPerTestCollectionInMinutes)))</Timeout> |
269 | 283 | </HelixWorkItem> |
270 | 284 | </ItemGroup> |
271 | 285 |
|
272 | 286 | <Import Sdk="Microsoft.DotNet.Helix.Sdk" Project="Sdk.targets" Condition=" '$(UsesHelixSdk)' == 'true' " /> |
| 287 | + <Import Sdk="Microsoft.Build.NoTargets" Project="Sdk.targets" Condition=" '$(UsesHelixSdk)' != 'true' " /> |
273 | 288 |
|
274 | 289 | </Project> |
0 commit comments