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

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

Issue 770633003: tools: removed unused members, tiny cleanup (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years 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 265 matching lines...) Expand 10 before | Expand all | Expand 10 after
276 hasStaticWarning: hasStaticWarning, 276 hasStaticWarning: hasStaticWarning,
277 multitestKey: key); 277 multitestKey: key);
278 } 278 }
279 279
280 return null; 280 return null;
281 }); 281 });
282 } 282 }
283 283
284 284
285 Path CreateMultitestDirectory(String outputDir, Path suiteDir) { 285 Path CreateMultitestDirectory(String outputDir, Path suiteDir) {
286 final String generatedTestDirectory = 'generated_tests';
287 Directory generatedTestDir = new Directory('$outputDir/generated_tests'); 286 Directory generatedTestDir = new Directory('$outputDir/generated_tests');
288 if (!new Directory(outputDir).existsSync()) { 287 if (!new Directory(outputDir).existsSync()) {
289 new Directory(outputDir).createSync(); 288 new Directory(outputDir).createSync();
290 } 289 }
291 if (!generatedTestDir.existsSync()) { 290 if (!generatedTestDir.existsSync()) {
292 generatedTestDir.createSync(); 291 generatedTestDir.createSync();
293 } 292 }
294 var split = suiteDir.segments(); 293 var split = suiteDir.segments();
295 if (split.last == 'src') { 294 if (split.last == 'src') {
296 // TODO(sigmund): remove this once all tests are migrated to use 295 // TODO(sigmund): remove this once all tests are migrated to use
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

Powered by Google App Engine
This is Rietveld 408576698