Skip to content
This repository was archived by the owner on Jan 23, 2023. It is now read-only.

Split unix test builds in slices #17785

Merged
merged 2 commits into from
May 4, 2018
Merged

Conversation

sdmaclea
Copy link

Ports #17161 to linux

@4creators @AndyAyersMS @weshaggard @BruceForstall @RussKeldorph @jkotas

I can confirm this allows tests to be built on my Ubuntu SkyLake desktop. As it hung before this is infinite improvement. It took 102 minutes to build the priority 1 Linux Arm64 Checked managed tests.

@4creators
Copy link

4creators commented Apr 26, 2018

@sdmaclea That's great you have ported it to *nixes.

The 102 min build time on Skylake laptop is pretty good as I would expect that CI build would be around 50 - 60 minutes or even shorter.

I will go through the code review tomorrow.

@BruceForstall @janvorli @AndyAyersMS @RussKeldorph

Perhaps if we would confirm that CI test build performance is at satisfactory level we should consider switching to native *nix build in CI instead of using Windows cross build step.

Copy link

@4creators 4creators left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Passing of slice build parameters via MSBuild command line will be added in next iteration which I am working on now.

build-test.sh Outdated

# Invoke MSBuild
# $__ProjectRoot/run.sh build -Project=$projectName -MsBuildLog="$__msbuildLog" -MsBuildWrn="$__msbuildWrn" -MsBuildErr="$__msbuildErr" $extraBuildParameters $__RunArgs $__UnprocessedBuildArgs
for (( slice=1 ; slice < __BuildLoopCount; slice = slice + 1 ))

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Doesn't this need to be <= or else you'll not build the final slice?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would guess you are right, but I looked at the build logs, not sure how I missed that the last slice wasn't being build

build-test.sh Outdated

echo "Building step '$stepName' via $buildCommand"
export __SkipPackageRestore=false

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you add a comment that references tests/src/dirs.proj, and says that these variables are consumed there?

fi
export __SkipPackageRestore=true
export __SkipTargetingPackBuild=true
__AppendToLog=true

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you initialize __AppendToLog=false before the slice loop? Even if passing Append= (empty) to msbuild works, it seems like being explicit would be better (it looks like build-test.cmd does this).

build-test.sh Outdated
@@ -615,6 +660,10 @@ while :; do
msbuildonunsupportedplatform)
__msbuildonunsupportedplatform=1
;;
priority)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you update the usage() function?

Ideally, I'd think priority would take a number, which would default to zero, but if you decide not to do that, at least make the argument "priority_one", as just "priority" seems ambiguous to me.

@sdmaclea
Copy link
Author

sdmaclea commented May 3, 2018

@BruceForstall done

build-test.sh Outdated

# Invoke MSBuild
eval $buildCommand
if [ -n __Priority ]; then

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are variables case-sensitive? You define this as:

__priority=1

using lower case. No matter the answer, it's probably better to use the same casing.

Since the script argument is not "priority1" maybe you can change this to __priority1 to match.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed. I think my tree must have been dirty when I first pushed this...

Any way. I built locally with and without priority1 with the most recently pushed version and it looks OK.

@BruceForstall BruceForstall merged commit ad0f22c into dotnet:master May 4, 2018
jashook pushed a commit to jashook/coreclr that referenced this pull request May 11, 2018
* Split unix test builds in slices

Ports dotnet#17161 to linux

* Address review feedback
@sdmaclea sdmaclea deleted the PR-LINUX-TESTS branch May 24, 2018 19:20
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants