Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[tests] Run tests in parallel on non-Windows #2224

Merged
merged 1 commit into from
Oct 15, 2018

Commits on Oct 13, 2018

  1. [tests] Run tests in parallel on non-Windows

    What do we want?  Faster unit test execution!
    
    How do we do that?  By running things in parallel!
    
    Some of our existing tests are already run in parallel, such as the
    `src/Xamarin.Android.Build.Tasks/Tests` tests which use NUnit's
    `[Parallelizable (ParallelScope.Children)]`, but there is currently no
    way to run the `Xamarin.Android.Build.Tasks` NUnit tests
    *concurrently* with the on-device `.apk` tests concurrently with the
    Java.Interop unit tests concurrently with...
    
    We *think* there might be a "win" here, as the
    `Xamarin.Android.Build.Tasks` unit tests are heavily I/O bound, while
    the `.apk` BCL tests are -- presumably -- CPU bound, so executing
    these at the same time might net some nice time savings.
    
    Spike the idea by updating the `RunAllTests` target to *generate a
    shell script* which executes `msbuild` to run the appropriate test
    target, in the background, then waiting for all jobs to finish.
    
    The generated `bin/Test$(Configuration)/parallel-targets.sh` file
    resembles:
    
    	echo Executing in background: msbuild …/build-tools/scripts/RunTests.targets /v:normal /binaryLogger:"…/msbuild-20181012T083249-Target-RunNUnitTests.binlog" /t:RunNUnitTests
    	msbuild …/build-tools/scripts/RunTests.targets /v:normal /binaryLogger:"…/msbuild-20181012T083249-Target-RunNUnitTests.binlog" /t:RunNUnitTests &
    	wait
    	exit 0
    jonpryor committed Oct 13, 2018
    Configuration menu
    Copy the full SHA
    3bcbfe3 View commit details
    Browse the repository at this point in the history