| OLD | NEW | 
|---|
| 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 194 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 205       String suffix = executableBinarySuffix; | 205       String suffix = executableBinarySuffix; | 
| 206       dartExecutable = useSdk | 206       dartExecutable = useSdk | 
| 207           ? '$buildDir/dart-sdk/bin/dart$suffix' | 207           ? '$buildDir/dart-sdk/bin/dart$suffix' | 
| 208           : '$buildDir/dart$suffix'; | 208           : '$buildDir/dart$suffix'; | 
| 209     } | 209     } | 
| 210 | 210 | 
| 211     TestUtils.ensureExists(dartExecutable, configuration); | 211     TestUtils.ensureExists(dartExecutable, configuration); | 
| 212     return dartExecutable; | 212     return dartExecutable; | 
| 213   } | 213   } | 
| 214 | 214 | 
|  | 215   String get dartPrecompiledBinaryFileName { | 
|  | 216     // Controlled by user with the option "--dart_precompiled". | 
|  | 217     String dartExecutable = configuration['dart_precompiled']; | 
|  | 218 | 
|  | 219     if (dartExecutable == null || dartExecutable == '') { | 
|  | 220       String suffix = executableBinarySuffix; | 
|  | 221       dartExecutable = '$buildDir/dart_precompiled$suffix'; | 
|  | 222     } | 
|  | 223 | 
|  | 224     TestUtils.ensureExists(dartExecutable, configuration); | 
|  | 225     return dartExecutable; | 
|  | 226   } | 
|  | 227 | 
| 215   String get d8FileName { | 228   String get d8FileName { | 
| 216     var suffix = getExecutableSuffix('d8'); | 229     var suffix = getExecutableSuffix('d8'); | 
| 217     var d8Dir = TestUtils.dartDir.append('third_party/d8'); | 230     var d8Dir = TestUtils.dartDir.append('third_party/d8'); | 
| 218     var d8Path = d8Dir.append('${Platform.operatingSystem}/d8$suffix'); | 231     var d8Path = d8Dir.append('${Platform.operatingSystem}/d8$suffix'); | 
| 219     var d8 = d8Path.toNativePath(); | 232     var d8 = d8Path.toNativePath(); | 
| 220     TestUtils.ensureExists(d8, configuration); | 233     TestUtils.ensureExists(d8, configuration); | 
| 221     return d8; | 234     return d8; | 
| 222   } | 235   } | 
| 223 | 236 | 
| 224   String get jsShellFileName { | 237   String get jsShellFileName { | 
| (...skipping 777 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 1002 | 1015 | 
| 1003   List<Command> makeCommands(TestInformation info, var vmOptions, var args) { | 1016   List<Command> makeCommands(TestInformation info, var vmOptions, var args) { | 
| 1004     List<Command> commands = <Command>[]; | 1017     List<Command> commands = <Command>[]; | 
| 1005     CompilerConfiguration compilerConfiguration = | 1018     CompilerConfiguration compilerConfiguration = | 
| 1006         new CompilerConfiguration(configuration); | 1019         new CompilerConfiguration(configuration); | 
| 1007     List<String> sharedOptions = info.optionsFromFile['sharedOptions']; | 1020     List<String> sharedOptions = info.optionsFromFile['sharedOptions']; | 
| 1008 | 1021 | 
| 1009     List<String> compileTimeArguments = <String>[]; | 1022     List<String> compileTimeArguments = <String>[]; | 
| 1010     String tempDir; | 1023     String tempDir; | 
| 1011     if (compilerConfiguration.hasCompiler) { | 1024     if (compilerConfiguration.hasCompiler) { | 
| 1012       compileTimeArguments | 1025       compileTimeArguments = | 
| 1013           ..addAll(sharedOptions) | 1026           compilerConfiguration.computeCompilerArguments(vmOptions, | 
| 1014           ..addAll(args); | 1027                                                          sharedOptions, | 
|  | 1028                                                          args); | 
| 1015       // Avoid doing this for analyzer. | 1029       // Avoid doing this for analyzer. | 
| 1016       tempDir = createCompilationOutputDirectory(info.filePath); | 1030       tempDir = createCompilationOutputDirectory(info.filePath); | 
| 1017     } | 1031     } | 
| 1018 | 1032 | 
| 1019     CommandArtifact compilationArtifact = | 1033     CommandArtifact compilationArtifact = | 
| 1020         compilerConfiguration.computeCompilationArtifact( | 1034         compilerConfiguration.computeCompilationArtifact( | 
| 1021             buildDir, | 1035             buildDir, | 
| 1022             tempDir, | 1036             tempDir, | 
| 1023             CommandBuilder.instance, | 1037             CommandBuilder.instance, | 
| 1024             compileTimeArguments, | 1038             compileTimeArguments, | 
| (...skipping 740 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 1765              "hasStaticWarning" : false, | 1779              "hasStaticWarning" : false, | 
| 1766              "otherScripts": otherScripts, | 1780              "otherScripts": otherScripts, | 
| 1767              "isMultitest": isMultitest, | 1781              "isMultitest": isMultitest, | 
| 1768              "isMultiHtmlTest": isMultiHtmlTest, | 1782              "isMultiHtmlTest": isMultiHtmlTest, | 
| 1769              "subtestNames": subtestNames, | 1783              "subtestNames": subtestNames, | 
| 1770              "isolateStubs": isolateStubs, | 1784              "isolateStubs": isolateStubs, | 
| 1771              "containsDomImport": containsDomImport }; | 1785              "containsDomImport": containsDomImport }; | 
| 1772   } | 1786   } | 
| 1773 | 1787 | 
| 1774   List<List<String>> getVmOptions(Map optionsFromFile) { | 1788   List<List<String>> getVmOptions(Map optionsFromFile) { | 
| 1775     var COMPILERS = const ['none']; | 1789     var COMPILERS = const ['none', 'precompiler']; | 
| 1776     var RUNTIMES = const ['none', 'vm', 'drt', 'dartium', | 1790     var RUNTIMES = const ['none', 'dart_precompiled', 'vm', 'drt', 'dartium', | 
| 1777                           'ContentShellOnAndroid', 'DartiumOnAndroid']; | 1791                           'ContentShellOnAndroid', 'DartiumOnAndroid']; | 
| 1778     var needsVmOptions = COMPILERS.contains(configuration['compiler']) && | 1792     var needsVmOptions = COMPILERS.contains(configuration['compiler']) && | 
| 1779                          RUNTIMES.contains(configuration['runtime']); | 1793                          RUNTIMES.contains(configuration['runtime']); | 
| 1780     if (!needsVmOptions) return [[]]; | 1794     if (!needsVmOptions) return [[]]; | 
| 1781     final vmOptions = optionsFromFile['vmOptions']; | 1795     final vmOptions = optionsFromFile['vmOptions']; | 
| 1782     return vmOptions; | 1796     return vmOptions; | 
| 1783   } | 1797   } | 
| 1784 | 1798 | 
| 1785   /** | 1799   /** | 
| 1786    * Read options from a co19 test file. | 1800    * Read options from a co19 test file. | 
| (...skipping 630 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 2417       for (var key in PATH_REPLACEMENTS.keys) { | 2431       for (var key in PATH_REPLACEMENTS.keys) { | 
| 2418         if (path.startsWith(key)) { | 2432         if (path.startsWith(key)) { | 
| 2419           path = path.replaceFirst(key, PATH_REPLACEMENTS[key]); | 2433           path = path.replaceFirst(key, PATH_REPLACEMENTS[key]); | 
| 2420           break; | 2434           break; | 
| 2421         } | 2435         } | 
| 2422       } | 2436       } | 
| 2423     } | 2437     } | 
| 2424     return path; | 2438     return path; | 
| 2425   } | 2439   } | 
| 2426 } | 2440 } | 
| OLD | NEW | 
|---|