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

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

Issue 288703003: Revert revisions 36163 and 36162 (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 6 years, 7 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
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 multitest; 5 library multitest;
6 6
7 import "dart:async"; 7 import "dart:async";
8 import "dart:io"; 8 import "dart:io";
9 import "test_suite.dart"; 9 import "test_suite.dart";
10 import "utils.dart"; 10 import "utils.dart";
(...skipping 230 matching lines...) Expand 10 before | Expand all | Expand 10 after
241 // Copy all the relative imports of the multitest. 241 // Copy all the relative imports of the multitest.
242 Set<String> importsToCopy = _findAllRelativeImports(filePath); 242 Set<String> importsToCopy = _findAllRelativeImports(filePath);
243 List<Future> futureCopies = []; 243 List<Future> futureCopies = [];
244 for (String relativeImport in importsToCopy) { 244 for (String relativeImport in importsToCopy) {
245 Path importPath = new Path(relativeImport); 245 Path importPath = new Path(relativeImport);
246 // Make sure the target directory exists. 246 // Make sure the target directory exists.
247 Path importDir = importPath.directoryPath; 247 Path importDir = importPath.directoryPath;
248 if (!importDir.isEmpty) { 248 if (!importDir.isEmpty) {
249 TestUtils.mkdirRecursive(targetDir, importDir); 249 TestUtils.mkdirRecursive(targetDir, importDir);
250 } 250 }
251 Path srcPath = sourceDir.join(importPath);
252 Path targetPath = targetDir.join(importPath);
253 // Copy file. 251 // Copy file.
254 futureCopies.add(TestUtils.copyIfDifferent(srcPath, targetPath)); 252 futureCopies.add(TestUtils.copyFile(sourceDir.join(importPath),
253 targetDir.join(importPath)));
255 } 254 }
256 255
257 // Wait until all imports are copied before scheduling test cases. 256 // Wait until all imports are copied before scheduling test cases.
258 return Future.wait(futureCopies).then((_) { 257 return Future.wait(futureCopies).then((_) {
259 String baseFilename = filePath.filenameWithoutExtension; 258 String baseFilename = filePath.filenameWithoutExtension;
260 for (String key in tests.keys) { 259 for (String key in tests.keys) {
261 final Path multitestFilename = 260 final Path multitestFilename =
262 targetDir.append('${baseFilename}_$key.dart'); 261 targetDir.append('${baseFilename}_$key.dart');
263 writeFile(multitestFilename.toNativePath(), tests[key]); 262 writeFile(multitestFilename.toNativePath(), tests[key]);
264 Set<String> outcome = outcomes[key]; 263 Set<String> outcome = outcomes[key];
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
297 // TestSuite.forDirectory. 296 // TestSuite.forDirectory.
298 split.removeLast(); 297 split.removeLast();
299 } 298 }
300 String path = '${generatedTestDir.path}/${split.last}'; 299 String path = '${generatedTestDir.path}/${split.last}';
301 Directory dir = new Directory(path); 300 Directory dir = new Directory(path);
302 if (!dir.existsSync()) { 301 if (!dir.existsSync()) {
303 dir.createSync(); 302 dir.createSync();
304 } 303 }
305 return new Path(new File(path).absolute.path); 304 return new Path(new File(path).absolute.path);
306 } 305 }
OLDNEW
« no previous file with comments | « tests/standalone/io/skipping_dart2js_compilations_test.dart ('k') | tools/testing/dart/test_suite.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698