Be less verbose in the logs. (#17401)
Now that we have thousands of tests, it doesn't make sense to display a separate line for each test. The result is just megabytes of logs that you have to scrub through to find error messages.
diff --git a/dev/bots/test.dart b/dev/bots/test.dart
index e5f8c45..169c4cf 100644
--- a/dev/bots/test.dart
+++ b/dev/bots/test.dart
@@ -135,61 +135,52 @@
print('${bold}DONE: Analysis successful.$reset');
}
-Future<Null> _runTests({List<String> options: const <String>[]}) async {
+Future<Null> _runTests() async {
// Verify that the tests actually return failure on failure and success on success.
final String automatedTests = path.join(flutterRoot, 'dev', 'automated_tests');
await _runFlutterTest(automatedTests,
script: path.join('test_smoke_test', 'fail_test.dart'),
- options: options,
expectFailure: true,
printOutput: false,
timeout: _kShortTimeout,
);
await _runFlutterTest(automatedTests,
script: path.join('test_smoke_test', 'pass_test.dart'),
- options: options,
printOutput: false,
timeout: _kShortTimeout,
);
await _runFlutterTest(automatedTests,
script: path.join('test_smoke_test', 'crash1_test.dart'),
- options: options,
expectFailure: true,
printOutput: false,
timeout: _kShortTimeout,
);
await _runFlutterTest(automatedTests,
script: path.join('test_smoke_test', 'crash2_test.dart'),
- options: options,
expectFailure: true,
printOutput: false,
timeout: _kShortTimeout,
);
await _runFlutterTest(automatedTests,
script: path.join('test_smoke_test', 'syntax_error_test.broken_dart'),
- options: options,
expectFailure: true,
printOutput: false,
timeout: _kShortTimeout,
);
await _runFlutterTest(automatedTests,
script: path.join('test_smoke_test', 'missing_import_test.broken_dart'),
- options: options,
expectFailure: true,
printOutput: false,
timeout: _kShortTimeout,
);
await _runFlutterTest(automatedTests,
script: path.join('test_smoke_test', 'disallow_error_reporter_modification_test.dart'),
- options: options,
expectFailure: true,
printOutput: false,
timeout: _kShortTimeout,
);
await _runCommand(flutter,
- <String>['drive', '--use-existing-app']
- ..addAll(options)
- ..addAll(<String>[ '-t', path.join('test_driver', 'failure.dart')]),
+ <String>['drive', '--use-existing-app', '-t', path.join('test_driver', 'failure.dart')],
workingDirectory: path.join(flutterRoot, 'packages', 'flutter_driver'),
expectFailure: true,
printOutput: false,
@@ -200,23 +191,21 @@
await _verifyVersion(path.join(flutterRoot, 'version'));
// Run tests.
- await _runFlutterTest(path.join(flutterRoot, 'packages', 'flutter'), options: options);
- await _runFlutterTest(path.join(flutterRoot, 'packages', 'flutter_localizations'), options: options);
- await _runFlutterTest(path.join(flutterRoot, 'packages', 'flutter_driver'), options: options);
- await _runFlutterTest(path.join(flutterRoot, 'packages', 'flutter_test'), options: options);
- await _runFlutterTest(path.join(flutterRoot, 'packages',
- 'fuchsia_remote_debug_protocol'), options: options);
+ await _runFlutterTest(path.join(flutterRoot, 'packages', 'flutter'));
+ await _runFlutterTest(path.join(flutterRoot, 'packages', 'flutter_localizations'));
+ await _runFlutterTest(path.join(flutterRoot, 'packages', 'flutter_driver'));
+ await _runFlutterTest(path.join(flutterRoot, 'packages', 'flutter_test'));
+ await _runFlutterTest(path.join(flutterRoot, 'packages', 'fuchsia_remote_debug_protocol'));
await _pubRunTest(path.join(flutterRoot, 'packages', 'flutter_tools'));
await _pubRunTest(path.join(flutterRoot, 'dev', 'bots'));
-
- await _runAllDartTests(path.join(flutterRoot, 'dev', 'devicelab'), options: options);
- await _runFlutterTest(path.join(flutterRoot, 'dev', 'manual_tests'), options: options);
- await _runFlutterTest(path.join(flutterRoot, 'dev', 'tools', 'vitool'), options: options);
- await _runFlutterTest(path.join(flutterRoot, 'examples', 'hello_world'), options: options);
- await _runFlutterTest(path.join(flutterRoot, 'examples', 'layers'), options: options);
- await _runFlutterTest(path.join(flutterRoot, 'examples', 'stocks'), options: options);
- await _runFlutterTest(path.join(flutterRoot, 'examples', 'flutter_gallery'), options: options);
- await _runFlutterTest(path.join(flutterRoot, 'examples', 'catalog'), options: options);
+ await _pubRunTest(path.join(flutterRoot, 'dev', 'devicelab'));
+ await _runFlutterTest(path.join(flutterRoot, 'dev', 'manual_tests'));
+ await _runFlutterTest(path.join(flutterRoot, 'dev', 'tools', 'vitool'));
+ await _runFlutterTest(path.join(flutterRoot, 'examples', 'hello_world'));
+ await _runFlutterTest(path.join(flutterRoot, 'examples', 'layers'));
+ await _runFlutterTest(path.join(flutterRoot, 'examples', 'stocks'));
+ await _runFlutterTest(path.join(flutterRoot, 'examples', 'flutter_gallery'));
+ await _runFlutterTest(path.join(flutterRoot, 'examples', 'catalog'));
print('${bold}DONE: All tests successful.$reset');
}
@@ -256,7 +245,9 @@
String workingDirectory, {
String testPath,
}) {
- final List<String> args = <String>['run', 'test', '-j1', '-rexpanded'];
+ final List<String> args = <String>['run', 'test', '-j1', '-rcompact'];
+ if (!hasColor)
+ args.add('--no-color');
if (testPath != null)
args.add(testPath);
final Map<String, String> pubEnvironment = <String, String>{};
@@ -393,21 +384,6 @@
);
}
-Future<Null> _runAllDartTests(String workingDirectory, {
- Map<String, String> environment,
- List<String> options,
-}) {
- final List<String> args = <String>['--preview-dart-2'];
- if (options != null) {
- args.addAll(options);
- }
- args.add(path.join('test', 'all.dart'));
- return _runCommand(dart, args,
- workingDirectory: workingDirectory,
- environment: environment,
- );
-}
-
Future<Null> _runFlutterAnalyze(String workingDirectory, {
List<String> options: const <String>[]
}) {