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

Side by Side Diff: tools/testing/dart/test_suite.dart

Issue 2986513002: Pass shared options to dartdevc in test.dart. (Closed)
Patch Set: Merge branch 'master' into dartdevc-shared-options Created 3 years, 5 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 unified diff | Download patch
« no previous file with comments | « tools/testing/dart/compiler_configuration.dart ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 /** 5 /**
6 * Classes and methods for enumerating and preparing tests. 6 * Classes and methods for enumerating and preparing tests.
7 * 7 *
8 * This library includes: 8 * This library includes:
9 * 9 *
10 * - Creating tests by listing all the Dart files in certain directories, 10 * - Creating tests by listing all the Dart files in certain directories,
(...skipping 1091 matching lines...) Expand 10 before | Expand all | Expand 10 after
1102 switch (configuration.compiler) { 1102 switch (configuration.compiler) {
1103 case Compiler.dart2js: 1103 case Compiler.dart2js:
1104 commands.add(_dart2jsCompileCommand(dartWrapperFilename, 1104 commands.add(_dart2jsCompileCommand(dartWrapperFilename,
1105 compiledDartWrapperFilename, tempDir, optionsFromFile)); 1105 compiledDartWrapperFilename, tempDir, optionsFromFile));
1106 break; 1106 break;
1107 1107
1108 case Compiler.dartdevc: 1108 case Compiler.dartdevc:
1109 var toPath = new Path('$compilationTempDir/$nameNoExt.js') 1109 var toPath = new Path('$compilationTempDir/$nameNoExt.js')
1110 .toNativePath(); 1110 .toNativePath();
1111 commands.add(configuration.compilerConfiguration.createCommand( 1111 commands.add(configuration.compilerConfiguration.createCommand(
1112 dartWrapperFilename, toPath)); 1112 dartWrapperFilename, toPath,
1113 optionsFromFile["sharedOptions"] as List<String>));
1113 break; 1114 break;
1114 1115
1115 case Compiler.none: 1116 case Compiler.none:
1116 break; 1117 break;
1117 1118
1118 default: 1119 default:
1119 assert(false); 1120 assert(false);
1120 } 1121 }
1121 1122
1122 // Some tests require compiling multiple input scripts. 1123 // Some tests require compiling multiple input scripts.
1123 for (var name in optionsFromFile['otherScripts'] as List<String>) { 1124 for (var name in optionsFromFile['otherScripts'] as List<String>) {
1124 var namePath = new Path(name); 1125 var namePath = new Path(name);
1125 var fromPath = filePath.directoryPath.join(namePath); 1126 var fromPath = filePath.directoryPath.join(namePath);
1126 var toPath = new Path('$tempDir/${namePath.filename}.js').toNativePath(); 1127 var toPath = new Path('$tempDir/${namePath.filename}.js').toNativePath();
1127 1128
1128 switch (configuration.compiler) { 1129 switch (configuration.compiler) {
1129 case Compiler.dart2js: 1130 case Compiler.dart2js:
1130 commands.add(_dart2jsCompileCommand(fromPath.toNativePath(), 1131 commands.add(_dart2jsCompileCommand(fromPath.toNativePath(),
1131 toPath, tempDir, optionsFromFile)); 1132 toPath, tempDir, optionsFromFile));
1132 break; 1133 break;
1133 1134
1134 case Compiler.dartdevc: 1135 case Compiler.dartdevc:
1135 commands.add(configuration.compilerConfiguration.createCommand( 1136 commands.add(configuration.compilerConfiguration.createCommand(
1136 fromPath.toNativePath(), toPath)); 1137 fromPath.toNativePath(), toPath,
1138 optionsFromFile["sharedOptions"] as List<String>));
1137 break; 1139 break;
1138 1140
1139 default: 1141 default:
1140 assert(configuration.compiler == Compiler.none); 1142 assert(configuration.compiler == Compiler.none);
1141 } 1143 }
1142 1144
1143 if (configuration.compiler == Compiler.none) { 1145 if (configuration.compiler == Compiler.none) {
1144 // For the tests that require multiple input scripts but are not 1146 // For the tests that require multiple input scripts but are not
1145 // compiled, move the input scripts over with the script so they can 1147 // compiled, move the input scripts over with the script so they can
1146 // be accessed. 1148 // be accessed.
(...skipping 643 matching lines...) Expand 10 before | Expand all | Expand 10 after
1790 1792
1791 bool isTestFile(String filename) { 1793 bool isTestFile(String filename) {
1792 // NOTE: We exclude tests and patch files for now. 1794 // NOTE: We exclude tests and patch files for now.
1793 return filename.endsWith(".dart") && 1795 return filename.endsWith(".dart") &&
1794 !filename.endsWith("_test.dart") && 1796 !filename.endsWith("_test.dart") &&
1795 !filename.contains("_internal/js_runtime/lib"); 1797 !filename.contains("_internal/js_runtime/lib");
1796 } 1798 }
1797 1799
1798 bool get listRecursively => true; 1800 bool get listRecursively => true;
1799 } 1801 }
OLDNEW
« no previous file with comments | « tools/testing/dart/compiler_configuration.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698