File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -20,6 +20,7 @@ public class xunit : MSBuildTask, ICancelableTask
2020 XunitFilters filters ;
2121 IRunnerLogger logger ;
2222 int ? maxThreadCount ;
23+ ParallelAlgorithm ? parallelAlgorithm ;
2324 bool ? parallelizeAssemblies ;
2425 bool ? parallelizeTestCollections ;
2526 IMessageSinkWithTypes reporterMessageHandler ;
@@ -75,6 +76,8 @@ protected bool NeedsXml
7576
7677 public ITaskItem NUnit { get ; set ; }
7778
79+ public ParallelAlgorithm ParallelAlgorithm { set { parallelAlgorithm = value ; } }
80+
7881 public bool ParallelizeAssemblies { set { parallelizeAssemblies = value ; } }
7982
8083 public bool ParallelizeTestCollections { set { parallelizeTestCollections = value ; } }
@@ -277,6 +280,8 @@ protected virtual XElement ExecuteAssembly(XunitProjectAssembly assembly, AppDom
277280 var executionOptions = TestFrameworkOptions . ForExecution ( assembly . Configuration ) ;
278281 if ( maxThreadCount . HasValue && maxThreadCount . Value > - 1 )
279282 executionOptions . SetMaxParallelThreads ( maxThreadCount ) ;
283+ if ( parallelAlgorithm . HasValue )
284+ executionOptions . SetParallelAlgorithm ( parallelAlgorithm ) ;
280285 if ( parallelizeTestCollections . HasValue )
281286 executionOptions . SetDisableParallelization ( ! parallelizeTestCollections ) ;
282287 if ( stopOnFail . HasValue )
You can’t perform that action at this time.
0 commit comments