| Index: dart/tools/testing/dart/test_progress.dart
|
| ===================================================================
|
| --- dart/tools/testing/dart/test_progress.dart (revision 32163)
|
| +++ dart/tools/testing/dart/test_progress.dart (working copy)
|
| @@ -276,6 +276,32 @@
|
| }
|
| }
|
|
|
| +
|
| +class UnexpectedCrashDumpArchiver extends EventListener {
|
| + void done(TestCase test) {
|
| + if (test.unexpectedOutput && test.result == Expectation.CRASH) {
|
| + var name = "core.dart.${test.lastCommandOutput.pid}";
|
| + var file = new File(name);
|
| + if (file.existsSync()) {
|
| + // Find the binary - we assume this is the first part of the command
|
| + var binName = test.lastCommandExecuted.toString().split(' ').first;
|
| + var binFile = new File(binName);
|
| + var binBaseName = new Path(binName).filename;
|
| + if (binFile.existsSync()) {
|
| + var tmpPath = new Path(Directory.systemTemp.path);
|
| + var dir = new Path(TestUtils.mkdirRecursive(tmpPath,
|
| + new Path('coredump_${test.lastCommandOutput.pid}')).path);
|
| + TestUtils.copyFile(new Path(name), dir.append(name));
|
| + TestUtils.copyFile(new Path(binName), dir.append(binBaseName));
|
| + print("\nCopied core dump and binary for unexpected crash to: "
|
| + "$dir");
|
| + }
|
| + }
|
| + }
|
| + }
|
| +}
|
| +
|
| +
|
| class SummaryPrinter extends EventListener {
|
| void allTestsKnown() {
|
| if (SummaryReport.total > 0) {
|
| @@ -284,6 +310,7 @@
|
| }
|
| }
|
|
|
| +
|
| class TimingPrinter extends EventListener {
|
| final _command2testCases = new Map<Command, List<TestCase>>();
|
| final _commandOutputs = new Set<CommandOutput>();
|
| @@ -456,6 +483,7 @@
|
| }
|
| }
|
|
|
| +
|
| class TestFailurePrinter extends EventListener {
|
| bool _printSummary;
|
| var _formatter;
|
|
|