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

Side by Side Diff: tools/testing/dart/status_file_parser.dart

Issue 2710603009: Revert "Revert "[test.dart] Complain if there is non-utf8 formatted data in test output"" (Closed)
Patch Set: Created 3 years, 9 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 unified diff | Download patch
« no previous file with comments | « tests/standalone/standalone.status ('k') | tools/testing/dart/test_runner.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 library status_file_parser; 5 library status_file_parser;
6 6
7 import "dart:async"; 7 import "dart:async";
8 import "dart:convert" show LineSplitter, UTF8; 8 import "dart:convert" show LineSplitter, UTF8;
9 import "dart:io"; 9 import "dart:io";
10 10
11 import "path.dart"; 11 import "path.dart";
12 import "status_expression.dart"; 12 import "status_expression.dart";
13 13
14 class Expectation { 14 class Expectation {
15 // Possible outcomes of running a test. 15 // Possible outcomes of running a test.
16 static Expectation PASS = byName('Pass'); 16 static Expectation PASS = byName('Pass');
17 static Expectation CRASH = byName('Crash'); 17 static Expectation CRASH = byName('Crash');
18 static Expectation TIMEOUT = byName('Timeout'); 18 static Expectation TIMEOUT = byName('Timeout');
19 static Expectation FAIL = byName('Fail'); 19 static Expectation FAIL = byName('Fail');
20 20
21 // Special 'FAIL' cases 21 // Special 'FAIL' cases
22 static Expectation RUNTIME_ERROR = byName('RuntimeError'); 22 static Expectation RUNTIME_ERROR = byName('RuntimeError');
23 static Expectation COMPILETIME_ERROR = byName('CompileTimeError'); 23 static Expectation COMPILETIME_ERROR = byName('CompileTimeError');
24 static Expectation MISSING_RUNTIME_ERROR = byName('MissingRuntimeError'); 24 static Expectation MISSING_RUNTIME_ERROR = byName('MissingRuntimeError');
25 static Expectation MISSING_COMPILETIME_ERROR = 25 static Expectation MISSING_COMPILETIME_ERROR =
26 byName('MissingCompileTimeError'); 26 byName('MissingCompileTimeError');
27 static Expectation STATIC_WARNING = byName('StaticWarning'); 27 static Expectation STATIC_WARNING = byName('StaticWarning');
28 static Expectation MISSING_STATIC_WARNING = byName('MissingStaticWarning'); 28 static Expectation MISSING_STATIC_WARNING = byName('MissingStaticWarning');
29 static Expectation PUB_GET_ERROR = byName('PubGetError'); 29 static Expectation PUB_GET_ERROR = byName('PubGetError');
30 static Expectation NON_UTF8_ERROR = byName('NonUtf8Output');
30 31
31 // Special 'CRASH' cases 32 // Special 'CRASH' cases
32 static Expectation DARTK_CRASH = byName('DartkCrash'); 33 static Expectation DARTK_CRASH = byName('DartkCrash');
33 34
34 // Special 'TIMEOUT' cases 35 // Special 'TIMEOUT' cases
35 static Expectation DARTK_TIMEOUT = byName('DartkTimeout'); 36 static Expectation DARTK_TIMEOUT = byName('DartkTimeout');
36 37
37 // Special 'COMPILETIME_ERROR' 38 // Special 'COMPILETIME_ERROR'
38 static Expectation DARTK_COMPILETIME_ERROR = byName('DartkCompileTimeError'); 39 static Expectation DARTK_COMPILETIME_ERROR = byName('DartkCompileTimeError');
39 40
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
73 74
74 var fail = build("Fail"); 75 var fail = build("Fail");
75 var crash = build("Crash"); 76 var crash = build("Crash");
76 var timeout = build("Timeout"); 77 var timeout = build("Timeout");
77 build("Pass"); 78 build("Pass");
78 79
79 var compileError = build("CompileTimeError", group: fail); 80 var compileError = build("CompileTimeError", group: fail);
80 build("MissingCompileTimeError", group: fail); 81 build("MissingCompileTimeError", group: fail);
81 build("MissingRuntimeError", group: fail); 82 build("MissingRuntimeError", group: fail);
82 build("RuntimeError", group: fail); 83 build("RuntimeError", group: fail);
84 build("NonUtf8Output", group: fail);
83 85
84 // Dartk sub expectations 86 // Dartk sub expectations
85 build("DartkCrash", group: crash); 87 build("DartkCrash", group: crash);
86 build("DartkTimeout", group: timeout); 88 build("DartkTimeout", group: timeout);
87 build("DartkCompileTimeError", group: compileError); 89 build("DartkCompileTimeError", group: compileError);
88 90
89 build("MissingStaticWarning", group: fail); 91 build("MissingStaticWarning", group: fail);
90 build("StaticWarning", group: fail); 92 build("StaticWarning", group: fail);
91 93
92 build("PubGetError", group: fail); 94 build("PubGetError", group: fail);
(...skipping 260 matching lines...) Expand 10 before | Expand all | Expand 10 after
353 } 355 }
354 regExps[i] = regExp; 356 regExps[i] = regExp;
355 } 357 }
356 _keyToRegExps[key] = regExps; 358 _keyToRegExps[key] = regExps;
357 }); 359 });
358 360
359 _regExpCache = null; 361 _regExpCache = null;
360 _preprocessed = true; 362 _preprocessed = true;
361 } 363 }
362 } 364 }
OLDNEW
« no previous file with comments | « tests/standalone/standalone.status ('k') | tools/testing/dart/test_runner.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698