Chromium Code Reviews| Index: tools/testing/dart/test_progress.dart |
| diff --git a/tools/testing/dart/test_progress.dart b/tools/testing/dart/test_progress.dart |
| index d1af50c408c5fd3c8f0af620cdb3b4f9c0feca78..86557937fdaec5f5437607af3908dad2b47d0cf2 100644 |
| --- a/tools/testing/dart/test_progress.dart |
| +++ b/tools/testing/dart/test_progress.dart |
| @@ -316,7 +316,7 @@ class TestOutcomeLogWriter extends EventListener { |
| } |
| class UnexpectedCrashDumpArchiver extends EventListener { |
| - final archivedBinaries = new Set<String>(); |
| + final archivedBinaries = <String, String>{}; |
| void done(TestCase test) { |
| if (test.unexpectedOutput && |
| @@ -335,16 +335,27 @@ class UnexpectedCrashDumpArchiver extends EventListener { |
| final binName = lastCommand.executable; |
| final binFile = new File(binName); |
| final binBaseName = new Path(binName).filename; |
| - if (archivedBinaries.contains(binBaseName)) { |
| - return; |
| - } |
| - |
| - if (binFile.existsSync()) { |
| + if (!archivedBinaries.containsKey(binName) && |
| + binFile.existsSync()) { |
| final mode = test.configuration['mode']; |
| final arch = test.configuration['arch']; |
| - TestUtils.copyFile(new Path(binName), |
| - new Path("core.${mode}_${arch}_${binBaseName}")); |
| - archivedBinaries.add(binBaseName); |
| + final archived = "binary.${mode}_${arch}_${binBaseName}"; |
| + TestUtils.copyFile(new Path(binName), new Path(archived)); |
| + archivedBinaries[binName] = archived; |
| + } |
| + |
| + if (archivedBinaries.containsKey(binName)) { |
| + // We have found and copied the binary. |
| + var coredumpsList; |
| + try { |
| + coredumpsList = |
| + new File('coredumps').openSync(mode: FileMode.APPEND); |
|
kustermann
2017/01/20 14:56:55
Instead of doing this for every test, how about op
Vyacheslav Egorov (Google)
2017/01/20 16:44:45
I wanted to do it for each test so that even if te
|
| + coredumpsList.writeStringSync( |
| + "${test.displayName},${name},${archivedBinaries[binName]}\n"); |
| + } finally { |
| + if (coredumpsList != null) |
|
kustermann
2017/01/20 14:56:55
You could as well move the 'new File(...') out of
Vyacheslav Egorov (Google)
2017/01/20 16:44:45
I wanted to catch and ignore exceptions from openS
|
| + coredumpsList.close(); |
| + } |
| } |
| } |
| } |