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

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

Issue 9112007: Allow runtime tests to run on Windows. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « tools/testing/dart/status_file_parser.dart ('k') | no next file » | 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) 2011, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2011, 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("test_suite"); 5 #library("test_suite");
6 6
7 #import("status_file_parser.dart"); 7 #import("status_file_parser.dart");
8 #import("test_runner.dart"); 8 #import("test_runner.dart");
9 #import("multitest.dart"); 9 #import("multitest.dart");
10 10
(...skipping 209 matching lines...) Expand 10 before | Expand all | Expand 10 after
220 dir.list(recursive: listRecursively()); 220 dir.list(recursive: listRecursively());
221 } 221 }
222 222
223 void enqueueTestCaseFromTestInformation(TestInformation info) { 223 void enqueueTestCaseFromTestInformation(TestInformation info) {
224 var filename = info.filename; 224 var filename = info.filename;
225 var optionsFromFile = info.optionsFromFile; 225 var optionsFromFile = info.optionsFromFile;
226 var isNegative = info.isNegative; 226 var isNegative = info.isNegative;
227 227
228 // Look up expectations in status files using a modified file path. 228 // Look up expectations in status files using a modified file path.
229 String testName; 229 String testName;
230 int start = filename.lastIndexOf('src' + pathSeparator); 230 filename = filename.replaceAll('\\', '/');
231 int start = filename.lastIndexOf('src/');
231 if (start != -1) { 232 if (start != -1) {
232 testName = filename.substring(start + 4, filename.length - 5); 233 testName = filename.substring(start + 4, filename.length - 5);
233 } else if (optionsFromFile['isMultitest']) { 234 } else if (optionsFromFile['isMultitest']) {
234 start = filename.lastIndexOf(pathSeparator); 235 start = filename.lastIndexOf('/');
235 int middle = filename.lastIndexOf('_'); 236 int middle = filename.lastIndexOf('_');
236 testName = filename.substring(start + 1, middle) + pathSeparator + 237 testName = filename.substring(start + 1, middle) + '/' +
237 filename.substring(middle + 1, filename.length - 5); 238 filename.substring(middle + 1, filename.length - 5);
238 } else { 239 } else {
239 // This case is hit by the dartc client compilation 240 // This case is hit by the dartc client compilation
240 // tests. These tests are pretty broken compared to the 241 // tests. These tests are pretty broken compared to the
241 // rest. They use the .dart suffix in the status files. They 242 // rest. They use the .dart suffix in the status files. They
242 // find tests in weird ways (testing that they contain "#"). 243 // find tests in weird ways (testing that they contain "#").
243 // They need to be redone. 244 // They need to be redone.
244 // directoryPath may start with '../'. 245 // directoryPath may start with '../'.
246 // TODO(1058): This does not work on Windows.
245 String sanitizedDirectoryPath = (directoryPath.startsWith('../')) ? 247 String sanitizedDirectoryPath = (directoryPath.startsWith('../')) ?
246 directoryPath.substring(3) : directoryPath; 248 directoryPath.substring(3) : directoryPath;
247 start = filename.indexOf(sanitizedDirectoryPath); 249 start = filename.indexOf(sanitizedDirectoryPath);
248 testName = filename.substring(start + sanitizedDirectoryPath.length + 1, 250 testName = filename.substring(start + sanitizedDirectoryPath.length + 1,
249 filename.length); 251 filename.length);
250 if (configuration['component'] != 'dartc') { 252 if (configuration['component'] != 'dartc') {
251 if (testName.endsWith('.dart')) { 253 if (testName.endsWith('.dart')) {
252 testName = testName.substring(0, testName.length - 5); 254 testName = testName.substring(0, testName.length - 5);
253 } 255 }
254 } 256 }
(...skipping 721 matching lines...) Expand 10 before | Expand all | Expand 10 after
976 * $noCrash tests are expected to be flaky but not crash 978 * $noCrash tests are expected to be flaky but not crash
977 * $pass tests are expected to pass 979 * $pass tests are expected to pass
978 * $failOk tests are expected to fail that we won't fix 980 * $failOk tests are expected to fail that we won't fix
979 * $fail tests are expected to fail that we should fix 981 * $fail tests are expected to fail that we should fix
980 * $crash tests are expected to crash that we should fix 982 * $crash tests are expected to crash that we should fix
981 * $timeout tests are allowed to timeout\ 983 * $timeout tests are allowed to timeout\
982 """; 984 """;
983 print(report); 985 print(report);
984 } 986 }
985 } 987 }
OLDNEW
« no previous file with comments | « tools/testing/dart/status_file_parser.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698