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 950 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
961 | 961 |
962 void enqueueStandardTest(List<Command> baseCommands, | 962 void enqueueStandardTest(List<Command> baseCommands, |
963 TestInformation info, | 963 TestInformation info, |
964 String testName, | 964 String testName, |
965 Set<Expectation> expectations) { | 965 Set<Expectation> expectations) { |
966 var commonArguments = commonArgumentsFromFile(info.filePath, | 966 var commonArguments = commonArgumentsFromFile(info.filePath, |
967 info.optionsFromFile); | 967 info.optionsFromFile); |
968 | 968 |
969 List<List<String>> vmOptionsList = getVmOptions(info.optionsFromFile); | 969 List<List<String>> vmOptionsList = getVmOptions(info.optionsFromFile); |
970 assert(!vmOptionsList.isEmpty); | 970 assert(!vmOptionsList.isEmpty); |
971 List stdOptions = TestUtils.standardOptions(configuration); | |
971 | 972 |
972 for (var vmOptions in vmOptionsList) { | 973 for (var vmOptions in vmOptionsList) { |
973 var allVmOptions = vmOptions; | 974 var allVmOptions = new List() |
974 if (!extraVmOptions.isEmpty) { | 975 // Get the standard options for this run of the testsuite. |
975 allVmOptions = new List.from(vmOptions)..addAll(extraVmOptions); | 976 ..addAll(stdOptions) |
976 } | 977 // Add the current VMOptions line from the file. |
978 ..addAll(vmOptions) | |
979 // Finally add the extra VM options. | |
980 ..addAll(extraVmOptions); | |
977 | 981 |
978 var commands = []..addAll(baseCommands); | 982 var commands = new List() |
979 commands.addAll(makeCommands(info, allVmOptions, commonArguments)); | 983 ..addAll(baseCommands) |
984 ..addAll(makeCommands(info, allVmOptions, commonArguments)); | |
980 enqueueNewTestCase( | 985 enqueueNewTestCase( |
981 new TestCase('$suiteName/$testName', | 986 new TestCase('$suiteName/$testName', |
982 commands, | 987 commands, |
983 configuration, | 988 configuration, |
984 expectations, | 989 expectations, |
985 isNegative: isNegative(info), | 990 isNegative: isNegative(info), |
986 info: info)); | 991 info: info)); |
987 } | 992 } |
988 } | 993 } |
989 | 994 |
(...skipping 538 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1528 } | 1533 } |
1529 if (Platform.operatingSystem == 'macos') { | 1534 if (Platform.operatingSystem == 'macos') { |
1530 final path = dartDir.append( | 1535 final path = dartDir.append( |
1531 '/client/tests/drt/Content Shell.app/Contents/MacOS/Content Shell'); | 1536 '/client/tests/drt/Content Shell.app/Contents/MacOS/Content Shell'); |
1532 return path.toNativePath(); | 1537 return path.toNativePath(); |
1533 } | 1538 } |
1534 return dartDir.append('client/tests/drt/content_shell').toNativePath(); | 1539 return dartDir.append('client/tests/drt/content_shell').toNativePath(); |
1535 } | 1540 } |
1536 | 1541 |
1537 List<String> commonArgumentsFromFile(Path filePath, Map optionsFromFile) { | 1542 List<String> commonArgumentsFromFile(Path filePath, Map optionsFromFile) { |
1538 List args = TestUtils.standardOptions(configuration); | 1543 List args = []; |
ricow1
2015/09/04 06:14:42
this will not work, you now eat all of the compile
| |
1539 | 1544 |
1540 String packageRoot = packageRootArgument(optionsFromFile['packageRoot']); | 1545 String packageRoot = packageRootArgument(optionsFromFile['packageRoot']); |
1541 if (packageRoot != null) { | 1546 if (packageRoot != null) { |
1542 args.add(packageRoot); | 1547 args.add(packageRoot); |
1543 } | 1548 } |
1544 String packages = packagesArgument(optionsFromFile['packages']); | 1549 String packages = packagesArgument(optionsFromFile['packages']); |
1545 if (packages != null) { | 1550 if (packages != null) { |
1546 args.add(packages); | 1551 args.add(packages); |
1547 } | 1552 } |
1548 args.addAll(additionalOptions(filePath)); | 1553 args.addAll(additionalOptions(filePath)); |
(...skipping 875 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
2424 for (var key in PATH_REPLACEMENTS.keys) { | 2429 for (var key in PATH_REPLACEMENTS.keys) { |
2425 if (path.startsWith(key)) { | 2430 if (path.startsWith(key)) { |
2426 path = path.replaceFirst(key, PATH_REPLACEMENTS[key]); | 2431 path = path.replaceFirst(key, PATH_REPLACEMENTS[key]); |
2427 break; | 2432 break; |
2428 } | 2433 } |
2429 } | 2434 } |
2430 } | 2435 } |
2431 return path; | 2436 return path; |
2432 } | 2437 } |
2433 } | 2438 } |
OLD | NEW |