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

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

Issue 899243002: Make standalone tests not dependent on current working directory. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Remove stray blank line Created 5 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « tests/standalone/io/read_into_const_list_test.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) 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 /** 5 /**
6 * Classes and methods for enumerating and preparing tests. 6 * Classes and methods for enumerating and preparing tests.
7 * 7 *
8 * This library includes: 8 * This library includes:
9 * 9 *
10 * - Creating tests by listing all the Dart files in certain directories, 10 * - Creating tests by listing all the Dart files in certain directories,
(...skipping 1533 matching lines...) Expand 10 before | Expand all | Expand 10 after
1544 configuration["compiler"] == "dart2analyzer") && 1544 configuration["compiler"] == "dart2analyzer") &&
1545 (filePath.filename.contains("dart2js") || 1545 (filePath.filename.contains("dart2js") ||
1546 filePath.directoryPath.segments().last.contains('html_common'))) { 1546 filePath.directoryPath.segments().last.contains('html_common'))) {
1547 args.add("--use-dart2js-libraries"); 1547 args.add("--use-dart2js-libraries");
1548 } 1548 }
1549 1549
1550 bool isMultitest = optionsFromFile["isMultitest"]; 1550 bool isMultitest = optionsFromFile["isMultitest"];
1551 List<String> dartOptions = optionsFromFile["dartOptions"]; 1551 List<String> dartOptions = optionsFromFile["dartOptions"];
1552 1552
1553 assert(!isMultitest || dartOptions == null); 1553 assert(!isMultitest || dartOptions == null);
1554 if (dartOptions == null) { 1554 args.add(filePath.toNativePath());
1555 args.add(filePath.toNativePath()); 1555 if (dartOptions != null) {
1556 } else {
1557 var executable_name = dartOptions[0];
1558 // TODO(ager): Get rid of this hack when the runtime checkout goes away.
1559 var file = new File(executable_name);
1560 if (!file.existsSync()) {
1561 executable_name = '../$executable_name';
1562 assert(new File(executable_name).existsSync());
1563 dartOptions[0] = executable_name;
1564 }
1565 args.addAll(dartOptions); 1556 args.addAll(dartOptions);
1566 } 1557 }
1567 1558
1568 return args; 1559 return args;
1569 } 1560 }
1570 1561
1571 String packageRoot(String packageRootFromFile) { 1562 String packageRoot(String packageRootFromFile) {
1572 if (packageRootFromFile == "none") { 1563 if (packageRootFromFile == "none") {
1573 return null; 1564 return null;
1574 } 1565 }
(...skipping 822 matching lines...) Expand 10 before | Expand all | Expand 10 after
2397 for (var key in PATH_REPLACEMENTS.keys) { 2388 for (var key in PATH_REPLACEMENTS.keys) {
2398 if (path.startsWith(key)) { 2389 if (path.startsWith(key)) {
2399 path = path.replaceFirst(key, PATH_REPLACEMENTS[key]); 2390 path = path.replaceFirst(key, PATH_REPLACEMENTS[key]);
2400 break; 2391 break;
2401 } 2392 }
2402 } 2393 }
2403 } 2394 }
2404 return path; 2395 return path;
2405 } 2396 }
2406 } 2397 }
OLDNEW
« no previous file with comments | « tests/standalone/io/read_into_const_list_test.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698