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

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

Issue 11414056: Pass package-root option to dart2js in browser tests. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge
Patch Set: Correctly compute relative source on Unix 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
« no previous file with comments | « dart/tools/make_links.py ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: dart/tools/testing/dart/test_suite.dart
diff --git a/dart/tools/testing/dart/test_suite.dart b/dart/tools/testing/dart/test_suite.dart
index 0a3265ac1b480e8a75ce4052b5e9f1c5212716d6..3705e577991ca853808f3faee5b4b6ad1d58cfc2 100644
--- a/dart/tools/testing/dart/test_suite.dart
+++ b/dart/tools/testing/dart/test_suite.dart
@@ -884,7 +884,7 @@ class StandardTestSuite extends TestSuite {
if (compiler != 'none') {
commands.add(_compileCommand(
dartWrapperFilename, compiledDartWrapperFilename,
- compiler, tempDir, vmOptions));
+ compiler, tempDir, vmOptions, optionsFromFile));
// some tests require compiling multiple input scripts.
List<String> otherScripts = optionsFromFile['otherScripts'];
@@ -895,7 +895,7 @@ class StandardTestSuite extends TestSuite {
Path fromPath = filePath.directoryPath.join(namePath);
commands.add(_compileCommand(
fromPath.toNativePath(), '$tempDir/$baseName.js',
- compiler, tempDir, vmOptions));
+ compiler, tempDir, vmOptions, optionsFromFile));
}
}
@@ -984,12 +984,17 @@ class StandardTestSuite extends TestSuite {
/** Helper to create a compilation command for a single input file. */
Command _compileCommand(String inputFile, String outputFile,
- String compiler, String dir, var vmOptions) {
+ String compiler, String dir, vmOptions, optionsFromFile) {
String executable = compilerPath;
List<String> args = TestUtils.standardOptions(configuration);
switch (compiler) {
case 'dart2js':
case 'dart2dart':
+ String packageRoot =
+ packageRootArgument(optionsFromFile['packageRoot']);
+ if (packageRoot != null) {
+ args.add(packageRoot);
+ }
if (compiler == 'dart2dart') args.add('--out=$outputFile');
args.add('--out=$outputFile');
args.add(inputFile);
« no previous file with comments | « dart/tools/make_links.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698