From 9f29c5de1ad077d49a63dd059daf10fc8b94c0ab Mon Sep 17 00:00:00 2001 From: Yegor Date: Mon, 28 Mar 2022 14:58:16 -0700 Subject: [PATCH] [web] small felt fixes in compile and run sub-commands (flutter/engine#32304) --- .../web_ui/dev/steps/compile_tests_step.dart | 2 +- .../lib/web_ui/dev/steps/run_tests_step.dart | 30 +------------------ 2 files changed, 2 insertions(+), 30 deletions(-) diff --git a/engine/src/flutter/lib/web_ui/dev/steps/compile_tests_step.dart b/engine/src/flutter/lib/web_ui/dev/steps/compile_tests_step.dart index bfc85f5ef3..b88335b565 100644 --- a/engine/src/flutter/lib/web_ui/dev/steps/compile_tests_step.dart +++ b/engine/src/flutter/lib/web_ui/dev/steps/compile_tests_step.dart @@ -212,7 +212,7 @@ Future compileTests(List testFiles) async { } // Maximum number of concurrent dart2js processes to use. -const int _dart2jsConcurrency = int.fromEnvironment('FELT_DART2JS_CONCURRENCY', defaultValue: 8); +int _dart2jsConcurrency = int.parse(io.Platform.environment['FELT_DART2JS_CONCURRENCY'] ?? '8'); final Pool _dart2jsPool = Pool(_dart2jsConcurrency); diff --git a/engine/src/flutter/lib/web_ui/dev/steps/run_tests_step.dart b/engine/src/flutter/lib/web_ui/dev/steps/run_tests_step.dart index c627f6cb44..e06768573a 100644 --- a/engine/src/flutter/lib/web_ui/dev/steps/run_tests_step.dart +++ b/engine/src/flutter/lib/web_ui/dev/steps/run_tests_step.dart @@ -51,17 +51,6 @@ class RunTestsStep implements PipelineStep { final BrowserEnvironment _browserEnvironment; - /// Global list of shards that failed. - /// - /// This is used to make sure that when there's a test failure anywhere we - /// exit with a non-zero exit code. - /// - /// Shards must never be removed from this list, only added. - List failedShards = []; - - /// Whether all test shards succeeded. - bool get allShardsPassed => failedShards.isEmpty; - @override String get description => 'run_tests'; @@ -88,29 +77,12 @@ class RunTestsStep implements PipelineStep { skiaClient: skiaClient, overridePathToCanvasKit: overridePathToCanvasKit, ); - _checkExitCode('Unit tests'); - if (!allShardsPassed) { - throw ToolExit(_createFailedShardsMessage()); - } - } - - void _checkExitCode(String shard) { if (io.exitCode != 0) { - failedShards.add(shard); + throw ToolExit('Some tests failed'); } } - String _createFailedShardsMessage() { - final StringBuffer message = StringBuffer( - 'The following test shards failed:\n', - ); - for (final String failedShard in failedShards) { - message.writeln(' - $failedShard'); - } - return message.toString(); - } - Future _createSkiaClient() async { final SkiaGoldClient skiaClient = SkiaGoldClient( environment.webUiSkiaGoldDirectory,