This repository was archived by the owner on Feb 25, 2025. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 6k
Capture FAILURES!!!
when running Android scenario_app
tests.
#50255
Merged
matanlurey
merged 10 commits into
flutter:main
from
matanlurey:android-scenario_app-fixExitCodeCondition
Feb 6, 2024
Merged
Changes from all commits
Commits
Show all changes
10 commits
Select commit
Hold shift + click to select a range
ddff89a
Cause CI to fail when 1 or more tests fail.
matanlurey 3d88a4f
Fix runIf for scenario_app.
matanlurey b17c81b
I suck at whitespace.
matanlurey 92a81cc
Try explicit exitCode = 1.
matanlurey 2b8409f
++
matanlurey c93d68e
Fix the test.
matanlurey ba53c82
Merge branch 'main' into android-scenario_app-fixExitCodeCondition
matanlurey c6e7b5b
Try smoke test only.
matanlurey aea3c4c
Try closing the IOSink.
matanlurey ab30e43
Try re-adding exit(0).
matanlurey File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -45,4 +45,11 @@ extension RunAndForward on ProcessManager { | |
Future<int> runAndForward(List<String> cmd) async { | ||
return pipeProcessStreams(await start(cmd), out: stdout); | ||
} | ||
|
||
/// Runs [cmd], and captures the stdout and stderr pipes. | ||
Future<(int, StringBuffer)> runAndCapture(List<String> cmd) async { | ||
final StringBuffer buffer = StringBuffer(); | ||
final int exitCode = await pipeProcessStreams(await start(cmd), out: buffer); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Do you need a try block here? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. No I don't believe so, it's OK for any errors to bubble up. |
||
return (exitCode, buffer); | ||
} | ||
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
#!/bin/bash | ||
# Copyright 2013 The Flutter Authors. All rights reserved. | ||
# Use of this source code is governed by a BSD-style license that can be | ||
# found in the LICENSE file. | ||
|
||
# This is a debugging script that runs a single Android E2E test on a connected | ||
# device or emulator, and reports the exit code. It was largely created to debug | ||
# why `./testing/scenario_app/run_android_tests.sh` did or did not report | ||
# failures correctly. | ||
|
||
# Run this command and print out the exit code. | ||
../third_party/dart/tools/sdks/dart-sdk/bin/dart ./testing/scenario_app/bin/android_integration_tests.dart \ | ||
--adb="../third_party/android_tools/sdk/platform-tools/adb" \ | ||
--out-dir="../out/android_debug_unopt_arm64" \ | ||
--smoke-test | ||
|
||
echo "Exit code: $?" | ||
echo "Done" |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.