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 1052 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1063 if (compiler != 'none') { | 1063 if (compiler != 'none') { |
1064 commands.add(_compileCommand( | 1064 commands.add(_compileCommand( |
1065 dartWrapperFilename, compiledDartWrapperFilename, | 1065 dartWrapperFilename, compiledDartWrapperFilename, |
1066 compiler, tempDir, vmOptions, optionsFromFile)); | 1066 compiler, tempDir, vmOptions, optionsFromFile)); |
1067 } | 1067 } |
1068 | 1068 |
1069 // some tests require compiling multiple input scripts. | 1069 // some tests require compiling multiple input scripts. |
1070 List<String> otherScripts = optionsFromFile['otherScripts']; | 1070 List<String> otherScripts = optionsFromFile['otherScripts']; |
1071 for (String name in otherScripts) { | 1071 for (String name in otherScripts) { |
1072 Path namePath = new Path(name); | 1072 Path namePath = new Path(name); |
1073 String baseName = namePath.filenameWithoutExtension; | 1073 String fileName = namePath.filename; |
1074 Path fromPath = filePath.directoryPath.join(namePath); | 1074 Path fromPath = filePath.directoryPath.join(namePath); |
1075 if (compiler != 'none') { | 1075 if (compiler != 'none') { |
1076 assert(namePath.extension == 'dart'); | 1076 assert(namePath.extension == 'dart'); |
1077 commands.add(_compileCommand( | 1077 commands.add(_compileCommand( |
1078 fromPath.toNativePath(), '$tempDir/$baseName.js', | 1078 fromPath.toNativePath(), '$tempDir/$fileName.js', |
1079 compiler, tempDir, vmOptions, optionsFromFile)); | 1079 compiler, tempDir, vmOptions, optionsFromFile)); |
1080 } | 1080 } |
1081 if (compiler == 'none') { | 1081 if (compiler == 'none') { |
1082 // For the tests that require multiple input scripts but are not | 1082 // For the tests that require multiple input scripts but are not |
1083 // compiled, move the input scripts over with the script so they can | 1083 // compiled, move the input scripts over with the script so they can |
1084 // be accessed. | 1084 // be accessed. |
1085 String result = new File(fromPath.toNativePath()).readAsStringSync(); | 1085 String result = new File(fromPath.toNativePath()).readAsStringSync(); |
1086 new File('$tempDir/$baseName.dart').writeAsStringSync(result); | 1086 new File('$tempDir/$fileName').writeAsStringSync(result); |
1087 } | 1087 } |
1088 } | 1088 } |
1089 | 1089 |
1090 | 1090 |
1091 // Variables for browser multi-tests. | 1091 // Variables for browser multi-tests. |
1092 List<String> subtestNames = info.optionsFromFile['subtestNames']; | 1092 List<String> subtestNames = info.optionsFromFile['subtestNames']; |
1093 int subtestIndex = 0; | 1093 int subtestIndex = 0; |
1094 // Construct the command that executes the browser test | 1094 // Construct the command that executes the browser test |
1095 do { | 1095 do { |
1096 List<Command> commandSet = new List<Command>.from(commands); | 1096 List<Command> commandSet = new List<Command>.from(commands); |
(...skipping 956 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2053 * $pass tests are expected to pass | 2053 * $pass tests are expected to pass |
2054 * $failOk tests are expected to fail that we won't fix | 2054 * $failOk tests are expected to fail that we won't fix |
2055 * $fail tests are expected to fail that we should fix | 2055 * $fail tests are expected to fail that we should fix |
2056 * $crash tests are expected to crash that we should fix | 2056 * $crash tests are expected to crash that we should fix |
2057 * $timeout tests are allowed to timeout | 2057 * $timeout tests are allowed to timeout |
2058 * $compileErrorSkip tests are skipped on browsers due to compile-time error | 2058 * $compileErrorSkip tests are skipped on browsers due to compile-time error |
2059 """; | 2059 """; |
2060 print(report); | 2060 print(report); |
2061 } | 2061 } |
2062 } | 2062 } |
OLD | NEW |