Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1098)

Unified Diff: tools/testing/dart/android.dart

Issue 1950633003: Fix exit code handling for Android testing. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/testing/dart/android.dart
diff --git a/tools/testing/dart/android.dart b/tools/testing/dart/android.dart
index bf83128d37353670ef1292686363cf47953c822d..615d5b0abcbc4bca0773510ab1b7981c47c7e532 100644
--- a/tools/testing/dart/android.dart
+++ b/tools/testing/dart/android.dart
@@ -333,7 +333,10 @@ class AdbDevice {
if (index >= 0) {
exitCode = int.parse(
lines.last.substring(index + MARKER.length).trim());
- exitCode = exitCode.toSigned(8);
+ if (exitCode > 128 && exitCode <= 128 + 31) {
+ // Return negative exit codes for signals 1..31 (128+N for signal N)
+ exitCode = 128 - exitCode;
+ }
} else {
// In case of timeouts, for example, we won't get the exitcode marker.
assert(result.exitCode != 0);
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698