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

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

Issue 2875203005: Refactor and clean up the status file parsing code. (Closed)
Patch Set: Created 3 years, 7 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
Index: tools/testing/dart/test_progress.dart
diff --git a/tools/testing/dart/test_progress.dart b/tools/testing/dart/test_progress.dart
index 0b2afa78855e28252fc8b301dba0177129cfc885..84cea72e908feb02a9773808e97bd220eca424d9 100644
--- a/tools/testing/dart/test_progress.dart
+++ b/tools/testing/dart/test_progress.dart
@@ -7,8 +7,8 @@ library test_progress;
import "dart:convert" show JSON;
import "dart:io";
+import "expectation.dart";
import "path.dart";
-import "status_file_parser.dart";
import "summary_report.dart";
import "test_runner.dart";
import "test_suite.dart";
@@ -67,7 +67,7 @@ class IgnoredTestMonitor extends EventListener {
int countIgnored = 0;
void done(TestCase test) {
- if (test.lastCommandOutput.result(test) == Expectation.IGNORE) {
+ if (test.lastCommandOutput.result(test) == Expectation.ignore) {
countIgnored++;
if (countIgnored > maxIgnored) {
print("/nMore than $maxIgnored tests were ignored due to flakes in");
@@ -88,7 +88,7 @@ class IgnoredTestMonitor extends EventListener {
class FlakyLogWriter extends EventListener {
void done(TestCase test) {
- if (test.isFlaky && test.result != Expectation.PASS) {
+ if (test.isFlaky && test.result != Expectation.pass) {
var buf = new StringBuffer();
for (var l in _buildFailureOutput(test)) {
buf.write("$l\n");
@@ -207,7 +207,7 @@ class UnexpectedCrashLogger extends EventListener {
void done(TestCase test) {
if (test.unexpectedOutput &&
- test.result == Expectation.CRASH &&
+ test.result == Expectation.crash &&
test.lastCommandExecuted is ProcessCommand) {
final pid = "${test.lastCommandOutput.pid}";
final lastCommand = test.lastCommandExecuted as ProcessCommand;

Powered by Google App Engine
This is Rietveld 408576698