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

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

Issue 9302034: Make test.dart use the path of the running script to find the Dart checkout. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years, 11 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 | « no previous file | 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 19c838ea976cfdad44aa08bdc968f8836f031461..a163414ec1b2f5a6880a42f68e0b454e1f22241a 100644
--- a/tools/testing/dart/test_suite.dart
+++ b/tools/testing/dart/test_suite.dart
@@ -989,15 +989,9 @@ class TestUtils {
static String dartDir() {
Directory dart;
antonm 2012/01/31 16:21:38 do you need this line at all?
Bill Hesse 2012/02/01 11:48:34 no. On 2012/01/31 16:21:38, antonm wrote:
- if (new File('tools/testing/dart/test_suite.dart').existsSync()) {
- return new File('.').fullPathSync().replaceAll('\\', '/');
- } else if (new File('../tools/testing/dart/test_suite.dart').existsSync()) {
- return new File('..').fullPathSync().replaceAll('\\', '/');
- } else {
- print('Run test.dart from the dart directory or' +
- ' an immediate subdirectory only.');
- Expect.fail('Could not find top level dart directory.');
- }
+ String scriptPath = new Options().script.replaceAll('\\', '/');
+ String toolsDir = scriptPath.substring(0, scriptPath.lastIndexOf('/'));
+ return new File('$toolsDir/..').fullPathSync().replaceAll('\\', '/');
}
static List<String> standardOptions(Map configuration) {
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698