From d44f003079b53643d6f0afd9a5f57383c3de62cb Mon Sep 17 00:00:00 2001 From: Danny Tuppeny Date: Wed, 3 Oct 2018 19:06:48 +0100 Subject: [PATCH] Use (processors-1) for test runs (test defaults to processors/2) (#22085) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Use (processors-1) for test runs (test defaults to processors/2) * Add missing import 🙄 --- dev/bots/test.dart | 3 +++ 1 file changed, 3 insertions(+) diff --git a/dev/bots/test.dart b/dev/bots/test.dart index a3cf5d1d5f..80617928eb 100644 --- a/dev/bots/test.dart +++ b/dev/bots/test.dart @@ -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 _pubRunTest( bool enableFlutterToolAsserts = false }) { final List args = ['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)