Unverified Commit cacef57b authored by Danny Tuppeny's avatar Danny Tuppeny Committed by GitHub

[flutter_tools] Skip over "Resolving dependencies..." text in integration tests (#120077)

Sometimes when the integration tests run Flutter apps they get this output (perhaps based on timing of file modification times). Some of the tests want to verify strict output but not fail just based on these lines before the app starts.

See https://github.com/flutter/flutter/issues/120015 / https://github.com/flutter/flutter/pull/120016.
parent df98689c
......@@ -67,7 +67,7 @@ void main() {
'Application finished.',
'',
startsWith('Exited'),
], allowExtras: true);
]);
});
testWithoutContext('logs to client when sendLogsToClient=true', () async {
......@@ -131,7 +131,7 @@ void main() {
'Application finished.',
'',
startsWith('Exited'),
], allowExtras: true);
]);
// If we're running with an out-of-process debug adapter, ensure that its
// own process shuts down after we terminated.
......
......@@ -357,12 +357,18 @@ extension DapTestClientExtension on DapTestClient {
final List<OutputEventBody> output = await outputEventsFuture;
// TODO(dantup): Integration tests currently trigger "flutter pub get" at
// the start due to some timestamp manipulation writing the pubspec.
// It may be possible to remove this if
// https://github.com/flutter/flutter/pull/91300 lands.
// Integration tests may trigger "flutter pub get" at the start based of
// `pubspec/yaml` and `.dart_tool/package_config.json`.
// See
// https://github.com/flutter/flutter/pull/91300
// https://github.com/flutter/flutter/issues/120015
return skipInitialPubGetOutput
? output.skipWhile((OutputEventBody output) => output.output.startsWith('Running "flutter pub get"')).toList()
? output
.skipWhile((OutputEventBody output) =>
output.output.startsWith('Running "flutter pub get"') ||
output.output.startsWith('Resolving dependencies') ||
output.output.startsWith('Got dependencies'))
.toList()
: output;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment