Adding debug info to assertion resultcode check

Bug:
Change-Id: I02c4eae12c557157e1d61a5cfc8ffad752be8f30
Reviewed-on: https://dart-review.googlesource.com/8441
Reviewed-by: Jonas Termansen <sortie@google.com>
This commit is contained in:
Morten Krogh-Jespersen 2017-09-26 11:57:57 +00:00 committed by Morten Krogh-jespersen
parent 394f854fec
commit c6af2dbc49

View file

@ -353,6 +353,19 @@ class AdbDevice {
}
} else {
// In case of timeouts, for example, we won't get the exitcode marker.
// TODO(mkroghj): Some times tests fail with the assert below. To better
// investigate, write out debug info.
DebugLogger.info("======= THIS IS DEBUG INFORMATION =======");
DebugLogger.info("arguments: $args");
DebugLogger.info("exitCode: ${result.exitCode}");
DebugLogger.info("timedOut: ${result.timedOut}");
DebugLogger.info("---- std out ----");
DebugLogger.info(result.stdout);
DebugLogger.info("---- std out end ----");
DebugLogger.info("---- std error ----");
DebugLogger.info(result.stderr);
DebugLogger.info("---- std error end ----");
DebugLogger.info("======= THIS IS NO LONGER DEBUG INFORMATION =======");
assert(result.exitCode != 0);
}
}