Unverified Commit 1b16d237 authored by Gary Qian's avatar Gary Qian Committed by GitHub

Add debug logging to deferred components test for deflaking (#103161)

parent 8094263c
...@@ -12,6 +12,7 @@ import 'test_data/deferred_components_project.dart'; ...@@ -12,6 +12,7 @@ import 'test_data/deferred_components_project.dart';
import 'test_driver.dart'; import 'test_driver.dart';
import 'test_utils.dart'; import 'test_utils.dart';
void main() { void main() {
late Directory tempDir; late Directory tempDir;
late FlutterRunTestDriver flutter; late FlutterRunTestDriver flutter;
...@@ -38,6 +39,8 @@ void main() { ...@@ -38,6 +39,8 @@ void main() {
'--target-platform=android-arm64', '--target-platform=android-arm64',
], workingDirectory: tempDir.path); ], workingDirectory: tempDir.path);
printOnFailure('stdout:\n${result.stdout.toString()}');
printOnFailure('stderr:\n${result.stderr.toString()}');
expect(result.exitCode, 0); expect(result.exitCode, 0);
expect(result.stdout.toString(), contains('app-release.aab')); expect(result.stdout.toString(), contains('app-release.aab'));
expect(result.stdout.toString(), contains('Deferred components prebuild validation passed.')); expect(result.stdout.toString(), contains('Deferred components prebuild validation passed.'));
...@@ -72,6 +75,8 @@ void main() { ...@@ -72,6 +75,8 @@ void main() {
'appbundle', 'appbundle',
], workingDirectory: tempDir.path); ], workingDirectory: tempDir.path);
printOnFailure('stdout:\n${result.stdout.toString()}');
printOnFailure('stderr:\n${result.stderr.toString()}');
expect(result.stdout.toString(), contains('app-release.aab')); expect(result.stdout.toString(), contains('app-release.aab'));
expect(result.stdout.toString(), contains('Deferred components prebuild validation passed.')); expect(result.stdout.toString(), contains('Deferred components prebuild validation passed.'));
expect(result.stdout.toString(), contains('Deferred components gen_snapshot validation passed.')); expect(result.stdout.toString(), contains('Deferred components gen_snapshot validation passed.'));
...@@ -116,6 +121,8 @@ void main() { ...@@ -116,6 +121,8 @@ void main() {
'--no-deferred-components', '--no-deferred-components',
], workingDirectory: tempDir.path); ], workingDirectory: tempDir.path);
printOnFailure('stdout:\n${result.stdout.toString()}');
printOnFailure('stderr:\n${result.stderr.toString()}');
expect(result.stdout.toString().contains('app-release.aab'), true); expect(result.stdout.toString().contains('app-release.aab'), true);
expect(result.stdout.toString().contains('Deferred components prebuild validation passed.'), false); expect(result.stdout.toString().contains('Deferred components prebuild validation passed.'), false);
expect(result.stdout.toString().contains('Deferred components gen_snapshot validation passed.'), false); expect(result.stdout.toString().contains('Deferred components gen_snapshot validation passed.'), false);
...@@ -162,6 +169,8 @@ void main() { ...@@ -162,6 +169,8 @@ void main() {
'--no-validate-deferred-components', '--no-validate-deferred-components',
], workingDirectory: tempDir.path); ], workingDirectory: tempDir.path);
printOnFailure('stdout:\n${result.stdout.toString()}');
printOnFailure('stderr:\n${result.stderr.toString()}');
expect(result.stdout.toString().contains('app-release.aab'), true); expect(result.stdout.toString().contains('app-release.aab'), true);
expect(result.stdout.toString().contains('Deferred components prebuild validation passed.'), false); expect(result.stdout.toString().contains('Deferred components prebuild validation passed.'), false);
expect(result.stdout.toString().contains('Deferred components gen_snapshot validation passed.'), false); expect(result.stdout.toString().contains('Deferred components gen_snapshot validation passed.'), false);
......
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