Chromium Code Reviews| 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) { |