Add --verbose
flags for flakey tests (#126162)
Related to: - https://github.com/flutter/flutter/issues/125512 Adding verbose flags to get printed out on error to help debug the cause of the flakey test
This commit is contained in:
parent
c6f61ef378
commit
38cac91057
@ -25,6 +25,7 @@ void main() {
|
|||||||
flutterBin,
|
flutterBin,
|
||||||
'build',
|
'build',
|
||||||
'apk',
|
'apk',
|
||||||
|
'--verbose',
|
||||||
'--analyze-size',
|
'--analyze-size',
|
||||||
'--target-platform=android-arm64',
|
'--target-platform=android-arm64',
|
||||||
], workingDirectory: workingDirectory);
|
], workingDirectory: workingDirectory);
|
||||||
@ -61,6 +62,7 @@ void main() {
|
|||||||
flutterBin,
|
flutterBin,
|
||||||
'build',
|
'build',
|
||||||
'ios',
|
'ios',
|
||||||
|
'--verbose',
|
||||||
'--analyze-size',
|
'--analyze-size',
|
||||||
'--code-size-directory=${codeSizeDir.path}',
|
'--code-size-directory=${codeSizeDir.path}',
|
||||||
'--no-codesign',
|
'--no-codesign',
|
||||||
@ -99,6 +101,7 @@ void main() {
|
|||||||
final ProcessResult configResult = await processManager.run(<String>[
|
final ProcessResult configResult = await processManager.run(<String>[
|
||||||
flutterBin,
|
flutterBin,
|
||||||
'config',
|
'config',
|
||||||
|
'--verbose',
|
||||||
'--enable-macos-desktop',
|
'--enable-macos-desktop',
|
||||||
], workingDirectory: workingDirectory);
|
], workingDirectory: workingDirectory);
|
||||||
|
|
||||||
@ -144,6 +147,7 @@ void main() {
|
|||||||
flutterBin,
|
flutterBin,
|
||||||
'build',
|
'build',
|
||||||
'apk',
|
'apk',
|
||||||
|
'--verbose',
|
||||||
'--analyze-size',
|
'--analyze-size',
|
||||||
'--target-platform=android-arm64',
|
'--target-platform=android-arm64',
|
||||||
'--debug',
|
'--debug',
|
||||||
@ -159,14 +163,24 @@ void main() {
|
|||||||
|
|
||||||
testWithoutContext('--analyze-size is not supported in combination with --split-debug-info', () async {
|
testWithoutContext('--analyze-size is not supported in combination with --split-debug-info', () async {
|
||||||
final String flutterBin = fileSystem.path.join(getFlutterRoot(), 'bin', 'flutter');
|
final String flutterBin = fileSystem.path.join(getFlutterRoot(), 'bin', 'flutter');
|
||||||
final ProcessResult result = await processManager.run(<String>[
|
final List<String> command = <String>[
|
||||||
flutterBin,
|
flutterBin,
|
||||||
'build',
|
'build',
|
||||||
'apk',
|
'apk',
|
||||||
|
'--verbose',
|
||||||
'--analyze-size',
|
'--analyze-size',
|
||||||
'--target-platform=android-arm64',
|
'--target-platform=android-arm64',
|
||||||
'--split-debug-info=infos',
|
'--split-debug-info=infos',
|
||||||
], workingDirectory: fileSystem.path.join(getFlutterRoot(), 'examples', 'hello_world'));
|
];
|
||||||
|
final String workingDirectory =
|
||||||
|
fileSystem.path.join(getFlutterRoot(), 'examples', 'hello_world');
|
||||||
|
final ProcessResult result =
|
||||||
|
await processManager.run(command, workingDirectory: workingDirectory);
|
||||||
|
|
||||||
|
printOnFailure('workingDirectory: $workingDirectory');
|
||||||
|
printOnFailure('command:\n${command.join(" ")}');
|
||||||
|
printOnFailure('stdout:\n${result.stdout}');
|
||||||
|
printOnFailure('stderr:\n${result.stderr}');
|
||||||
|
|
||||||
expect(result.stderr.toString(), contains('"--analyze-size" cannot be combined with "--split-debug-info"'));
|
expect(result.stderr.toString(), contains('"--analyze-size" cannot be combined with "--split-debug-info"'));
|
||||||
|
|
||||||
@ -181,6 +195,7 @@ void main() {
|
|||||||
flutterBin,
|
flutterBin,
|
||||||
'build',
|
'build',
|
||||||
'apk',
|
'apk',
|
||||||
|
'--verbose',
|
||||||
'--analyze-size',
|
'--analyze-size',
|
||||||
'--code-size-directory=${tempDir.path}',
|
'--code-size-directory=${tempDir.path}',
|
||||||
'--target-platform=android-arm64',
|
'--target-platform=android-arm64',
|
||||||
|
Loading…
x
Reference in New Issue
Block a user