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

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: Fix copyright dates. 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 | « tools/testing/dart/status_file_parser.dart ('k') | 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..8147f612cd51dcc123bac94128c1af1d79c9e6d5 100644
--- a/tools/testing/dart/test_suite.dart
+++ b/tools/testing/dart/test_suite.dart
@@ -1,4 +1,4 @@
-// Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file
+// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
@@ -212,14 +212,14 @@ class StandardTestSuite implements TestSuite {
new TestExpectations(complexMatching: complexStatusMatching());
for (var statusFilePath in statusFilePaths) {
ReadTestExpectationsInto(testExpectations,
- statusFilePath,
+ '$dartDir/$statusFilePath',
configuration,
statusFileRead);
}
}
void processDirectory() {
- directoryPath = getDirname(directoryPath);
+ directoryPath = '$dartDir/$directoryPath';
Directory dir = new Directory(directoryPath);
dir.errorHandler = (s) {
throw s;
@@ -467,7 +467,7 @@ class StandardTestSuite implements TestSuite {
Expect.fail('unimplemented component $component');
}
- String executable = getFilename(dumpRenderTreeFilename);
+ String executable = dumpRenderTreeFilename;
List<String> args;
if (component == 'webdriver') {
executable = 'python';
@@ -590,10 +590,10 @@ class StandardTestSuite implements TestSuite {
return configuration['drt'];
}
if (new Platform().operatingSystem() == 'macos') {
- return 'client/tests/drt/DumpRenderTree.app/Contents/' +
+ return '$dartDir/client/tests/drt/DumpRenderTree.app/Contents/' +
'MacOS/DumpRenderTree';
}
- return 'client/tests/drt/DumpRenderTree';
+ return '$dartDir/client/tests/drt/DumpRenderTree';
}
void testGeneratorStarted() {
@@ -765,7 +765,7 @@ class DartcCompilationTestSuite extends StandardTestSuite {
}
void processDirectory() {
- directoryPath = getDirname(directoryPath);
+ directoryPath = '$dartDir/$directoryPath';
// Enqueueing the directory listers is an activity.
activityStarted();
for (String testDir in _testDirs) {
@@ -836,7 +836,7 @@ class JUnitTestSuite implements TestSuite {
}
void processDirectory() {
- directoryPath = getDirname(directoryPath);
+ directoryPath = '$dartDir/$directoryPath';
Directory dir = new Directory(directoryPath);
dir.errorHandler = (s) {
@@ -988,16 +988,9 @@ class TestUtils {
}
static String dartDir() {
- Directory dart;
- 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 | « tools/testing/dart/status_file_parser.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698