[infra] Fix test.py uploading non-existent dart2js core dumps.

dart2js internal compiler errors exit 253 and don't produce a core dump, but
rather dump the relevant debug information as a stacktrace on stdio. This
change disables uploading crashes in that case, which would otherwise fail
because core dumps can't be located for the dart2js process, causing the test
step to fail.

Change-Id: I6154bd205c8cccb9c62d007e6071fea8b4196a96
Reviewed-on: https://dart-review.googlesource.com/c/87075
Reviewed-by: Alexander Thomas <athom@google.com>
Commit-Queue: Jonas Termansen <sortie@google.com>
This commit is contained in:
Jonas Termansen 2018-12-13 13:31:00 +00:00 committed by commit-bot@chromium.org
parent 288d5f0a2a
commit 275ce70649
2 changed files with 7 additions and 1 deletions

View file

@ -91,6 +91,11 @@ class CommandOutput extends UniqueObject {
return exitCode < 0;
}
bool get hasCoreDump {
// dart2js crashes don't produce crashdumps.
return hasCrashed && exitCode != 253;
}
bool _didFail(TestCase testCase) => exitCode != 0 && !hasCrashed;
bool get canRunDependendCommands {

View file

@ -126,7 +126,8 @@ class UnexpectedCrashLogger extends EventListener {
void done(TestCase test) {
if (test.unexpectedOutput &&
test.result == Expectation.crash &&
test.lastCommandExecuted is ProcessCommand) {
test.lastCommandExecuted is ProcessCommand &&
test.lastCommandOutput.hasCoreDump) {
var pid = "${test.lastCommandOutput.pid}";
var lastCommand = test.lastCommandExecuted as ProcessCommand;