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

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

Issue 2642153002: Fix analyzer warnings in tools/testing/dart/test_progress.dart (Closed)
Patch Set: Created 3 years, 11 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/test_progress.dart
diff --git a/tools/testing/dart/test_progress.dart b/tools/testing/dart/test_progress.dart
index 7751d63677c5c0c49edb19336d21a68bf8944abd..d1af50c408c5fd3c8f0af620cdb3b4f9c0feca78 100644
--- a/tools/testing/dart/test_progress.dart
+++ b/tools/testing/dart/test_progress.dart
@@ -319,17 +319,20 @@ class UnexpectedCrashDumpArchiver extends EventListener {
final archivedBinaries = new Set<String>();
void done(TestCase test) {
- if (test.unexpectedOutput && test.result == Expectation.CRASH) {
+ if (test.unexpectedOutput &&
+ test.result == Expectation.CRASH &&
+ test.lastCommandExecuted is ProcessCommand) {
final name = "core.${test.lastCommandOutput.pid}";
final file = new File(name);
final exists = file.existsSync();
if (exists) {
+ final lastCommand = test.lastCommandExecuted as ProcessCommand;
// We have a coredump for the process. This coredump will be archived by
// CoreDumpArchiver (see tools/utils.py). For debugging purposes we
// need to archive the crashed binary as well. To simplify the
// archiving code we simply copy binaries into current folder next to
// core dumps and name them `core.${mode}_${arch}_${binary_name}`.
- final binName = test.lastCommandExecuted.executable;
+ final binName = lastCommand.executable;
final binFile = new File(binName);
final binBaseName = new Path(binName).filename;
if (archivedBinaries.contains(binBaseName)) {
« 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