@@ -67,7 +67,7 @@ public static (IEnumerable<ParallelizableTestModuleGroupWithSequentialInnerModul
67
67
return ( projects , isBuiltOrRestored ) ;
68
68
}
69
69
70
- public static BuildOptions GetBuildOptions ( ParseResult parseResult , int degreeOfParallelism )
70
+ public static BuildOptions GetBuildOptions ( ParseResult parseResult )
71
71
{
72
72
LoggerUtility . SeparateBinLogArguments ( parseResult . UnmatchedTokens , out var binLogArgs , out var otherArgs ) ;
73
73
@@ -106,7 +106,6 @@ public static BuildOptions GetBuildOptions(ParseResult parseResult, int degreeOf
106
106
parseResult . HasOption ( TestCommandParser . VerbosityOption ) ? parseResult . GetValue ( TestCommandParser . VerbosityOption ) : null ,
107
107
parseResult . GetValue ( MicrosoftTestingPlatformOptions . NoLaunchProfileOption ) ,
108
108
parseResult . GetValue ( MicrosoftTestingPlatformOptions . NoLaunchProfileArgumentsOption ) ,
109
- degreeOfParallelism ,
110
109
otherArgs ,
111
110
msbuildArgs ) ;
112
111
}
@@ -137,7 +136,9 @@ private static ConcurrentBag<ParallelizableTestModuleGroupWithSequentialInnerMod
137
136
138
137
Parallel . ForEach (
139
138
projects ,
140
- new ParallelOptions { MaxDegreeOfParallelism = buildOptions . DegreeOfParallelism } ,
139
+ // We don't use --max-parallel-test-modules here.
140
+ // If user wants to limit the test applications run in parallel, we don't want to punish them and force the evaluation to also be limited.
141
+ new ParallelOptions { MaxDegreeOfParallelism = Environment . ProcessorCount } ,
141
142
( project ) =>
142
143
{
143
144
IEnumerable < ParallelizableTestModuleGroupWithSequentialInnerModules > projectsMetadata = SolutionAndProjectUtility . GetProjectProperties ( project , projectCollection , evaluationContext , buildOptions ) ;
0 commit comments