Use (processors-1) for test runs (test defaults to processors/2) (#22085)
* Use (processors-1) for test runs (test defaults to processors/2)
* Add missing import 🙄
This commit is contained in:
@@ -4,6 +4,7 @@
|
||||
|
||||
import 'dart:async';
|
||||
import 'dart:io';
|
||||
import 'dart:math' as math;
|
||||
|
||||
import 'package:path/path.dart' as path;
|
||||
|
||||
@@ -199,6 +200,8 @@ Future<Null> _pubRunTest(
|
||||
bool enableFlutterToolAsserts = false
|
||||
}) {
|
||||
final List<String> args = <String>['run', 'test', '-rcompact'];
|
||||
final int concurrency = math.max(1, Platform.numberOfProcessors - 1);
|
||||
args.add('-j$concurrency');
|
||||
if (!hasColor)
|
||||
args.add('--no-color');
|
||||
if (testPath != null)
|
||||
|
||||
Reference in New Issue
Block a user