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

Unified 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, 12 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 | « tools/testing/dart/status_file_parser.dart ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/testing/dart/test_suite.dart
diff --git a/tools/testing/dart/test_suite.dart b/tools/testing/dart/test_suite.dart
index 1933eeac85feb1656a05de5e9919d7cdce386e8c..ef3a28624acb6819f3af2955a55b547750356024 100644
--- a/tools/testing/dart/test_suite.dart
+++ b/tools/testing/dart/test_suite.dart
@@ -227,13 +227,14 @@ class StandardTestSuite implements TestSuite {
// Look up expectations in status files using a modified file path.
String testName;
- int start = filename.lastIndexOf('src' + pathSeparator);
+ filename = filename.replaceAll('\\', '/');
+ int start = filename.lastIndexOf('src/');
if (start != -1) {
testName = filename.substring(start + 4, filename.length - 5);
} else if (optionsFromFile['isMultitest']) {
- start = filename.lastIndexOf(pathSeparator);
+ start = filename.lastIndexOf('/');
int middle = filename.lastIndexOf('_');
- testName = filename.substring(start + 1, middle) + pathSeparator +
+ testName = filename.substring(start + 1, middle) + '/' +
filename.substring(middle + 1, filename.length - 5);
} else {
// This case is hit by the dartc client compilation
@@ -242,6 +243,7 @@ class StandardTestSuite implements TestSuite {
// find tests in weird ways (testing that they contain "#").
// They need to be redone.
// directoryPath may start with '../'.
+ // TODO(1058): This does not work on Windows.
String sanitizedDirectoryPath = (directoryPath.startsWith('../')) ?
directoryPath.substring(3) : directoryPath;
start = filename.indexOf(sanitizedDirectoryPath);
« 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