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:
Danny Tuppeny
2018-10-03 19:06:48 +01:00
committed by GitHub
parent b9f6e2c315
commit d44f003079

View File

@@ -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)