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

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

Issue 9320038: Move test.dart's check for missing test directories from co19 to general framework. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Address comment, add error if status file not found. Created 8 years, 10 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 | Annotate | Revision Log
« no previous file with comments | « tests/co19/test_config.dart ('k') | tools/testing/dart/test_suite.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:io"); 7 #import("dart:io");
8 #import("status_expression.dart"); 8 #import("status_expression.dart");
9 9
10 // Possible outcomes of running a test. 10 // Possible outcomes of running a test.
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
49 } 49 }
50 } 50 }
51 onDone(); 51 onDone();
52 } 52 }
53 53
54 ReadConfigurationInto(statusFilePath, sections, sectionsRead); 54 ReadConfigurationInto(statusFilePath, sections, sectionsRead);
55 } 55 }
56 56
57 void ReadConfigurationInto(path, sections, onDone) { 57 void ReadConfigurationInto(path, sections, onDone) {
58 File file = new File(path); 58 File file = new File(path);
59 if (!file.existsSync()) return; // TODO(whesse): Handle missing file. 59 if (!file.existsSync()) {
60 throw new Exception('Cannot find test status file $path');
61 }
60 InputStream file_stream = file.openInputStream(); 62 InputStream file_stream = file.openInputStream();
61 StringInputStream lines = new StringInputStream(file_stream); 63 StringInputStream lines = new StringInputStream(file_stream);
62 64
63 Section current = new Section.always(); 65 Section current = new Section.always();
64 sections.add(current); 66 sections.add(current);
65 String prefix = ""; 67 String prefix = "";
66 68
67 lines.lineHandler = () { 69 lines.lineHandler = () {
68 String line; 70 String line;
69 while ((line = lines.readLine()) != null) { 71 while ((line = lines.readLine()) != null) {
(...skipping 164 matching lines...) Expand 10 before | Expand all | Expand 10 after
234 } 236 }
235 regExps[i] = regExp; 237 regExps[i] = regExp;
236 } 238 }
237 _keyToRegExps[key] = regExps; 239 _keyToRegExps[key] = regExps;
238 }); 240 });
239 241
240 _regExpCache = null; 242 _regExpCache = null;
241 _preprocessed = true; 243 _preprocessed = true;
242 } 244 }
243 } 245 }
OLDNEW
« no previous file with comments | « tests/co19/test_config.dart ('k') | tools/testing/dart/test_suite.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698