You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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
0 commit comments