From 39b643fa45e62cd016b36c173d6166c41d85f0f7 Mon Sep 17 00:00:00 2001 From: Egor Chesakov Date: Thu, 28 Feb 2019 09:55:28 -0800 Subject: Re-partition MSBuild test groups (#22885) This changes a tests partitioning scheme of coreclr tests in several different ways: 1. Make the test groups are of equal (to some extent) sizes keeping the number of tests in one group less than 1000; 2. As a resulf of 1) this increases a number of groups needed for Pri0 tests to 3 and decreases a number of groups for Pri1 tests to 10; 3. This also changes a way of tests partitioning scheme is defined - instead of explicitly specifying MSBuild Include-patterns this defines a boundaries between test groups in a form of _StartsWith ItemGroup. Then I use StringComparer.Ordinal to pick tests that belong to a particular group. --- build-test.sh | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) (limited to 'build-test.sh') diff --git a/build-test.sh b/build-test.sh index 87a185dbd0..3b3ff61c5c 100755 --- a/build-test.sh +++ b/build-test.sh @@ -312,22 +312,21 @@ build_MSBuild_projects() # __SkipPackageRestore and __SkipTargetingPackBuild used to control build by tests/src/dirs.proj export __SkipPackageRestore=false export __SkipTargetingPackBuild=false - export __BuildLoopCount=2 - export __TestGroupToBuild=1 + export __NumberOfTestGroups=3 + __AppendToLog=false if [ -n "$__priority1" ]; then - export __BuildLoopCount=16 - export __TestGroupToBuild=2 + export __NumberOfTestGroups=10 fi - for (( slice=1 ; slice <= __BuildLoopCount; slice = slice + 1 )) + for (( testGroupToBuild=1 ; testGroupToBuild <= __NumberOfTestGroups; testGroupToBuild = testGroupToBuild + 1 )) do __msbuildLog="\"/flp:Verbosity=normal;LogFile=${__BuildLog};Append=${__AppendToLog}\"" __msbuildWrn="\"/flp1:WarningsOnly;LogFile=${__BuildWrn};Append=${__AppendToLog}\"" __msbuildErr="\"/flp2:ErrorsOnly;LogFile=${__BuildErr};Append=${__AppendToLog}\"" - export TestBuildSlice=$slice + export __TestGroupToBuild=$testGroupToBuild # Generate build command buildArgs=("/nologo" "/verbosity:minimal" "/clp:Summary") @@ -341,7 +340,7 @@ build_MSBuild_projects() buildArgs+=("${__UnprocessedBuildArgs[@]}") nextCommand="\"$__ProjectRoot/dotnet.sh\" msbuild ${buildArgs[@]}" - echo "Building step '$stepName' slice=$slice via $nextCommand" + echo "Building step '$stepName' testGroupToBuild=$testGroupToBuild via $nextCommand" eval $nextCommand # Make sure everything is OK -- cgit v1.2.3