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 1e1e0510277acf6e8847578289a4686500236232..4df8fc5164c9792ae2a701f1331b82ce7e74708a 100644 |
| --- a/tools/testing/dart/test_suite.dart |
| +++ b/tools/testing/dart/test_suite.dart |
| @@ -750,12 +750,15 @@ class StandardTestSuite extends TestSuite { |
| List<Command> makeCommands(TestInformation info, var vmOptions, var args) { |
| switch (configuration['compiler']) { |
| case 'dart2js': |
| + var compiledFile = '$tempDir/out-${runtime}.js'; |
| + var compiledShadowFile = '$tempDir/out_shadow.js'; |
| args = new List.from(args); |
| String tempDir = createOutputDirectory(info.filePath, ''); |
| - args.add('--out=$tempDir/out.js'); |
| + args.add('--out=$compiledFile'); |
| List<Command> commands = |
| - <Command>[new CompilationCommand("$tempDir/out.js", |
| + <Command>[new CompilationCommand(compiledFile, |
| + compiledShadowFile, |
| !useSdk, |
| dart2JsBootstrapDependencies, |
| compilerPath, |
| @@ -771,13 +774,16 @@ class StandardTestSuite extends TestSuite { |
| return commands; |
| case 'dart2dart': |
| + var compiledFile = '$tempDir/out-${runtime}.dart'; |
| + var compiledShadowFile = '$tempDir/out_shadow.dart'; |
| args = new List.from(args); |
| args.add('--output-type=dart'); |
| String tempDir = createOutputDirectory(info.filePath, ''); |
| args.add('--out=$tempDir/out.dart'); |
| List<Command> commands = |
| - <Command>[new CompilationCommand("$tempDir/out.dart", |
| + <Command>[new CompilationCommand(compiledFile, |
| + compiledShadowFile, |
| !useSdk, |
| dart2JsBootstrapDependencies, |
| compilerPath, |
| @@ -931,10 +937,11 @@ class StandardTestSuite extends TestSuite { |
| } |
| final String tempDir = createOutputDirectory(info.filePath, optionsName); |
| - String dartWrapperFilename = '$tempDir/test.dart'; |
| - String compiledDartWrapperFilename = '$tempDir/test.js'; |
| + String dartWrapperFilename = '$tempDir/test-${runtime}.dart'; |
| + String compiledDartWrapperFile = '$tempDir/test-${runtime}.js'; |
| + String compiledDartWrapperShadowFile = '$tempDir/test_shadow.js'; |
| - String htmlPath = '$tempDir/test.html'; |
| + String htmlPath = '$tempDir/test-${runtime}.html'; |
| if (isWrappingRequired && !isWebTest) { |
| // test.dart will import the dart test. |
| _createWrapperFile(dartWrapperFilename, filePath); |
| @@ -942,7 +949,7 @@ class StandardTestSuite extends TestSuite { |
| dartWrapperFilename = filename; |
| } |
| String scriptPath = (compiler == 'none') ? |
| - dartWrapperFilename : compiledDartWrapperFilename; |
| + dartWrapperFilename : compiledDartWrapperFile; |
| scriptPath = _createUrlPathFromFile(new Path(scriptPath)); |
| // Create the HTML file for the test. |
| @@ -971,8 +978,9 @@ class StandardTestSuite extends TestSuite { |
| List<Command> commands = []; |
| if (compiler != 'none') { |
| commands.add(_compileCommand( |
| - dartWrapperFilename, compiledDartWrapperFilename, |
| - compiler, tempDir, vmOptions, optionsFromFile)); |
| + dartWrapperFilename, compiledDartWrapperFile, |
| + compiledDartWrapperShadowFile, compiler, tempDir, vmOptions, |
| + optionsFromFile)); |
| } |
| // some tests require compiling multiple input scripts. |
| @@ -983,8 +991,12 @@ class StandardTestSuite extends TestSuite { |
| Path fromPath = filePath.directoryPath.join(namePath); |
| if (compiler != 'none') { |
| assert(namePath.extension == 'dart'); |
| + // FIXME: This might be an issue |
|
ricow1
2013/06/25 13:10:48
No fixmes
kustermann
2013/06/25 13:20:11
Done.
|
| + var compiledFile = '$tempDir/$baseName.js'; |
| + var compiledShadowFile = '$tempDir/${baseName}_shadow.js'; |
| + |
| commands.add(_compileCommand( |
| - fromPath.toNativePath(), '$tempDir/$baseName.js', |
| + fromPath.toNativePath(), compiledFile, compiledShadowFile, |
| compiler, tempDir, vmOptions, optionsFromFile)); |
| } |
| if (compiler == 'none') { |
| @@ -1103,8 +1115,8 @@ 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, vmOptions, optionsFromFile) { |
| + Command _compileCommand(String inputFile, String outputFile, String |
|
ricow1
2013/06/25 13:10:48
move String down
kustermann
2013/06/25 13:20:11
Done.
|
| + shadowFile, String compiler, String dir, vmOptions, optionsFromFile) { |
| String executable = compilerPath; |
| List<String> args = TestUtils.standardOptions(configuration); |
| switch (compiler) { |
| @@ -1129,6 +1141,7 @@ class StandardTestSuite extends TestSuite { |
| } |
| if (['dart2js', 'dart2dart'].contains(configuration['compiler'])) { |
| return new CompilationCommand(outputFile, |
| + shadowFile, |
| !useSdk, |
| dart2JsBootstrapDependencies, |
| compilerPath, |
| @@ -1165,7 +1178,7 @@ class StandardTestSuite extends TestSuite { |
| var checked = configuration['checked'] ? '-checked' : ''; |
| var minified = configuration['minified'] ? '-minified' : ''; |
| var csp = configuration['csp'] ? '-csp' : ''; |
| - var dirName = "${configuration['compiler']}-${configuration['runtime']}" |
| + var dirName = "${configuration['compiler']}" |
| "$checked$minified$csp"; |
|
ricow1
2013/06/25 13:10:48
fits one line?
kustermann
2013/06/25 13:20:11
Done.
|
| Path generatedTestPath = new Path(buildDir) |
| .append('generated_tests') |