multi-proc test execution
This commit is contained in:
parent
e08da40a1f
commit
43c5a2c59b
4 changed files with 49 additions and 34 deletions
|
@ -5,14 +5,14 @@
|
||||||
|
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<BinaryToCorehostifyRelDir>runtimes/any/native</BinaryToCorehostifyRelDir>
|
<BinaryToCorehostifyRelDir>runtimes/any/native</BinaryToCorehostifyRelDir>
|
||||||
<CoreSDKDir>$(RepoRoot)/resources/MSBuildImports</CoreSDKDir>
|
<MSBuildImportsDir>$(RepoRoot)/resources/MSBuildImports</MSBuildImportsDir>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<PublishOutputExtensions Include="$(ExeExtension);.dll;.pdb;.deps.json;.runtimeconfig.json" />
|
<PublishOutputExtensions Include="$(ExeExtension);.dll;.pdb;.deps.json;.runtimeconfig.json" />
|
||||||
<FilesToMove Include="$(BinaryToCorehostifyRelDir)/csc.exe;$(BinaryToCorehostifyRelDir)/MSBuild.exe;" />
|
<FilesToMove Include="$(BinaryToCorehostifyRelDir)/csc.exe;$(BinaryToCorehostifyRelDir)/MSBuild.exe;" />
|
||||||
<BundledTools Include="csc;MSBuild;NuGet.CommandLine.XPlat;dotnet" />
|
<BundledTools Include="csc;MSBuild;NuGet.CommandLine.XPlat;dotnet" />
|
||||||
<CoreSDKContent Include="$(CoreSDKDir)/**/*" />
|
<MSBuildImportsContent Include="$(MSBuildImportsDir)/**/*" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
<Target Name="Compile" DependsOnTargets="Prepare;
|
<Target Name="Compile" DependsOnTargets="Prepare;
|
||||||
|
@ -165,7 +165,7 @@
|
||||||
DestinationFiles="$(SdkOutputDirectory)/$(HostPolicyBaseName)" />
|
DestinationFiles="$(SdkOutputDirectory)/$(HostPolicyBaseName)" />
|
||||||
|
|
||||||
<!-- copy core sdk -->
|
<!-- copy core sdk -->
|
||||||
<Copy SourceFiles="@(CoreSDKContent)"
|
<Copy SourceFiles="@(MSBuildImportsContent)"
|
||||||
DestinationFolder="$(SdkOutputDirectory)/%(RecursiveDir)" />
|
DestinationFolder="$(SdkOutputDirectory)/%(RecursiveDir)" />
|
||||||
|
|
||||||
<!-- Crossgen the Shared Framework -->
|
<!-- Crossgen the Shared Framework -->
|
||||||
|
|
|
@ -27,13 +27,28 @@
|
||||||
<TestTaskEnvironmentVariables Include="TEST_ARTIFACTS=$(TestArtifactsEnv)" />
|
<TestTaskEnvironmentVariables Include="TEST_ARTIFACTS=$(TestArtifactsEnv)" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
<DotNetTest WorkingDirectory="%(TestProjects.ProjectDir)"
|
<PropertyGroup>
|
||||||
EnvironmentVariables="@(TestTaskEnvironmentVariables)"
|
<RunTestEnvironmentVariables>@(TestTaskEnvironmentVariables)</RunTestEnvironmentVariables>
|
||||||
ToolPath="$(Stage2Directory)"
|
</PropertyGroup>
|
||||||
Configuration="$(Configuration)"
|
|
||||||
NoBuild="True"
|
<ItemGroup>
|
||||||
NoTrait="category=failing"
|
<ProjectsToTest Include="build/test/RunTest.proj">
|
||||||
Xml="$(TestResultXmlDir)/%(TestProjects.OutputName)-testResults.xml" />
|
<Properties>
|
||||||
|
CLIBuildDll=$(CLIBuildDll);
|
||||||
|
Configuration=$(Configuration);
|
||||||
|
EnvironmentVariables=$(RunTestEnvironmentVariables);
|
||||||
|
TestProjectName=%(TestProjects.OutputName);
|
||||||
|
TestResultXmlDir=$(TestResultXmlDir);
|
||||||
|
ToolPath=$(Stage2Directory);
|
||||||
|
WorkingDirectory=%(TestProjects.ProjectDir)
|
||||||
|
</Properties>
|
||||||
|
</ProjectsToTest>
|
||||||
|
</ItemGroup>
|
||||||
|
|
||||||
|
<MSBuild
|
||||||
|
BuildInParallel="True"
|
||||||
|
Projects="@(ProjectsToTest)">
|
||||||
|
</MSBuild>
|
||||||
</Target>
|
</Target>
|
||||||
|
|
||||||
<Target Name="PrepareTests"
|
<Target Name="PrepareTests"
|
||||||
|
|
|
@ -71,10 +71,10 @@ $env:DOTNET_SKIP_FIRST_TIME_EXPERIENCE=1
|
||||||
if ($NoBuild)
|
if ($NoBuild)
|
||||||
{
|
{
|
||||||
Write-Host "Not building due to --nobuild"
|
Write-Host "Not building due to --nobuild"
|
||||||
Write-Host "Command that would be run: 'dotnet build3 build.proj /p:Architecture=$Architecture $ExtraParameters'"
|
Write-Host "Command that would be run: 'dotnet build3 build.proj /m /p:Architecture=$Architecture $ExtraParameters'"
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
dotnet build3 build.proj /p:Architecture=$Architecture $ExtraParameters
|
dotnet build3 build.proj /m /p:Architecture=$Architecture $ExtraParameters
|
||||||
if($LASTEXITCODE -ne 0) { throw "Failed to build" }
|
if($LASTEXITCODE -ne 0) { throw "Failed to build" }
|
||||||
}
|
}
|
||||||
|
|
|
@ -117,8 +117,8 @@ export DOTNET_SKIP_FIRST_TIME_EXPERIENCE=1
|
||||||
echo "${args[@]}"
|
echo "${args[@]}"
|
||||||
|
|
||||||
if [ $BUILD -eq 1 ]; then
|
if [ $BUILD -eq 1 ]; then
|
||||||
dotnet build3 build.proj /p:Architecture=$ARCHITECTURE "${args[@]}"
|
dotnet build3 build.proj /m /p:Architecture=$ARCHITECTURE "${args[@]}"
|
||||||
else
|
else
|
||||||
echo "Not building due to --nobuild"
|
echo "Not building due to --nobuild"
|
||||||
echo "Command that would be run is: 'dotnet build3 build.proj /p:Architecture=$ARCHITECTURE ${args[@]}'"
|
echo "Command that would be run is: 'dotnet build3 build.proj /m /p:Architecture=$ARCHITECTURE ${args[@]}'"
|
||||||
fi
|
fi
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue