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

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

Issue 11308179: Add --build-directory option to test.py. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Fix test_runner_exit_code_script.dart to set a buildbot step name. Created 8 years, 1 month 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
Index: tools/testing/dart/test_suite.dart
diff --git a/tools/testing/dart/test_suite.dart b/tools/testing/dart/test_suite.dart
index e02cffb3c19e6ff7b43d74226576a330723f0bcb..4ce22876a794b9810b0cef74071cecb56fa10c11 100644
--- a/tools/testing/dart/test_suite.dart
+++ b/tools/testing/dart/test_suite.dart
@@ -1503,6 +1503,9 @@ class TestUtils {
* [base] directory if that [relativePath] does not already exist.
*/
static Directory mkdirRecursive(Path base, Path relativePath) {
+ if (relativePath.isAbsolute) {
+ base = new Path('/');
+ }
Directory dir = new Directory.fromPath(base);
Expect.isTrue(dir.existsSync(),
"Expected ${dir} to already exist");
@@ -1545,19 +1548,6 @@ class TestUtils {
}
}
- static String outputDir(Map configuration) {
- var result = '';
- var system = configuration['system'];
- if (system == 'linux') {
- result = 'out/';
- } else if (system == 'macos') {
- result = 'xcodebuild/';
- } else if (system == 'windows') {
- result = 'build/';
- }
- return result;
- }
-
static Path dartDir() {
File scriptFile = new File(testScriptPath);
Path scriptPath = new Path.fromNative(scriptFile.fullPathSync());
@@ -1608,9 +1598,21 @@ class TestUtils {
const ['d8', 'jsshell'].contains(runtime);
static String buildDir(Map configuration) {
+ if (configuration['build_directory'] != '') {
+ return configuration['build_directory'];
+ }
+ var outputDir = '';
+ var system = configuration['system'];
+ if (system == 'linux') {
+ outputDir = 'out/';
+ } else if (system == 'macos') {
+ outputDir = 'xcodebuild/';
+ } else if (system == 'windows') {
+ outputDir = 'build/';
+ }
var mode = (configuration['mode'] == 'debug') ? 'Debug' : 'Release';
var arch = configuration['arch'].toUpperCase();
- return "${TestUtils.outputDir(configuration)}$mode$arch";
+ return "$outputDir$mode$arch";
}
}

Powered by Google App Engine
This is Rietveld 408576698