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

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

Issue 9584004: Revert "Enable use of #import stmts containing relative paths in Dart multitests" This change broke… (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « tools/testing/dart/multitest.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 b83c2acf64b1c1c2843a7c8cc5f7730d44f9bf48..c1286c8b60a64cf1072a2377e9cab0b311c150e3 100644
--- a/tools/testing/dart/test_suite.dart
+++ b/tools/testing/dart/test_suite.dart
@@ -670,8 +670,15 @@ class StandardTestSuite implements TestSuite {
tempDir.createSync();
}
}
- TestUtils.mkdirRecursive(tempDirPath,
- Strings.join(generatedTestPath, '/'));
+ tempDirPath = new File(tempDirPath).fullPathSync().replaceAll('\\', '/');
+
+ for (String subdirectory in generatedTestPath) {
+ tempDirPath = '$tempDirPath/$subdirectory';
+ tempDir = new Directory(tempDirPath);
+ if (!tempDir.existsSync()) {
+ tempDir.createSync();
+ }
+ }
return tempDir;
}
@@ -1016,39 +1023,6 @@ class JUnitTestSuite implements TestSuite {
class TestUtils {
-
- /**
- * Creates a directory using a [relativePath] to an existing
- * [base] directory if that [relativePath] does not already exist.
- */
- static void mkdirRecursive(String base, String relativePath) {
- Directory baseDir = new Directory(base);
- Expect.isTrue(baseDir.existsSync(),
- "This method expects ${base} to already exist");
- String pathSep = new Platform().pathSeparator();
- if (pathSep != '/') {
- relativePath = relativePath.replaceAll(pathSep, '/');
- }
- for (String dir in relativePath.split('/')) {
- var tempDir = new Directory('$base/$dir');
- if (!tempDir.existsSync()) {
- tempDir.createSync();
- }
- base = "$base/$dir";
- }
- }
-
- /**
- * Copy a [source] file to a new place.
- * Assumes that the directory for [dest] already exists.
- */
- static void copyFile(File source, File dest) {
- List contents = source.readAsBytesSync();
- RandomAccessFile handle = dest.openSync(FileMode.WRITE);
- handle.writeListSync(contents, 0, contents.length);
- handle.closeSync();
- }
-
static String executableSuffix(String component) {
if (new Platform().operatingSystem() == 'windows') {
if (component != 'frogium'
« no previous file with comments | « tools/testing/dart/multitest.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698