Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 8 additions & 2 deletions dev/bots/run_command.dart
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,7 @@ Future<void> runCommand(String executable, List<String> arguments, {
bool skip = false,
bool expectFlaky = false,
Duration timeout = _kLongTimeout,
bool Function(String) removeLine,
}) async {
final String commandDescription = '${path.relative(executable, from: workingDirectory)} ${arguments.join(' ')}';
final String relativeWorkingDir = path.relative(workingDirectory);
Expand All @@ -103,13 +104,18 @@ Future<void> runCommand(String executable, List<String> arguments, {
);

Future<List<List<int>>> savedStdout, savedStderr;
final Stream<List<int>> stdoutSource = process.stdout
.transform<String>(const Utf8Decoder())
.transform(const LineSplitter())
.where((String line) => removeLine == null || !removeLine(line))
.transform(const Utf8Encoder());
if (printOutput) {
await Future.wait<void>(<Future<void>>[
stdout.addStream(process.stdout),
stdout.addStream(stdoutSource),
stderr.addStream(process.stderr),
]);
} else {
savedStdout = process.stdout.toList();
savedStdout = stdoutSource.toList();
savedStderr = process.stderr.toList();
}

Expand Down
8 changes: 6 additions & 2 deletions dev/bots/test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -240,7 +240,8 @@ Future<void> _runToolTests() async {
File(path.join(flutterRoot, 'bin', 'cache', 'flutter_tools.snapshot')).deleteSync();
File(path.join(flutterRoot, 'bin', 'cache', 'flutter_tools.stamp')).deleteSync();
}
if (noUseBuildRunner) {
// reduce overhead of build_runner in the create case.
if (noUseBuildRunner || Platform.environment['SUBSHARD'] == 'create') {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not quite sure what you mean

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There's logic in there to check the subshard and run the right subset of tests using tags. I don't think it matches the logic in the build runner variant of the method.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh duh, got it my bad

await _pubRunTest(
path.join(flutterRoot, 'packages', 'flutter_tools'),
tableData: bigqueryApi?.tabledata,
Expand Down Expand Up @@ -591,6 +592,9 @@ Future<void> _pubRunTest(
case 'tool':
args.addAll(<String>['--exclude-tags', 'integration']);
break;
case 'create':
args.addAll(<String>[path.join('test', 'commands', 'create_test.dart')]);
break;
}

if (useFlutterTestFormatter) {
Expand All @@ -606,7 +610,7 @@ Future<void> _pubRunTest(
await runCommand(
pub,
args,
workingDirectory:workingDirectory,
workingDirectory: workingDirectory,
);
}
}
Expand Down
5 changes: 5 additions & 0 deletions packages/flutter_tools/dart_test.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
tags:
"no_coverage":
"create":
"integration":