| OLD | NEW |
| 1 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2011, 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 #library("test_runner"); | 5 #library("test_runner"); |
| 6 | 6 |
| 7 #import("status_file_parser.dart"); | 7 #import("status_file_parser.dart"); |
| 8 #import("test_progress.dart"); | 8 #import("test_progress.dart"); |
| 9 | 9 |
| 10 /** | 10 /** |
| (...skipping 26 matching lines...) Expand all Loading... |
| 37 return 'dart_bin'; | 37 return 'dart_bin'; |
| 38 } else if (configuration['component'] == 'dartc') { | 38 } else if (configuration['component'] == 'dartc') { |
| 39 return 'dartc'; | 39 return 'dartc'; |
| 40 } else { | 40 } else { |
| 41 throw "Unknown executable for: ${configuration['component']}"; | 41 throw "Unknown executable for: ${configuration['component']}"; |
| 42 } | 42 } |
| 43 } | 43 } |
| 44 | 44 |
| 45 | 45 |
| 46 String getDartShellFileName(Map configuration) { | 46 String getDartShellFileName(Map configuration) { |
| 47 return getBuildDir(configuration) + getExecutableName(configuration); | 47 var name = getBuildDir(configuration) + getExecutableName(configuration); |
| 48 if (!(new File(name)).existsSync()) { |
| 49 throw "Executable '$name' does not exist"; |
| 50 } |
| 51 return name; |
| 48 } | 52 } |
| 49 | 53 |
| 50 | 54 |
| 51 class TestCase { | 55 class TestCase { |
| 52 String executablePath; | 56 String executablePath; |
| 53 List<String> arguments; | 57 List<String> arguments; |
| 54 String commandLine; | 58 String commandLine; |
| 55 String displayName; | 59 String displayName; |
| 56 TestOutput output; | 60 TestOutput output; |
| 57 Set<String> expectedOutcomes; | 61 Set<String> expectedOutcomes; |
| (...skipping 133 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 191 numProcesses++; | 195 numProcesses++; |
| 192 } | 196 } |
| 193 } | 197 } |
| 194 | 198 |
| 195 runTest(TestCase test) { | 199 runTest(TestCase test) { |
| 196 progress.testAdded(); | 200 progress.testAdded(); |
| 197 tests.add(test); | 201 tests.add(test); |
| 198 tryRunTest(); | 202 tryRunTest(); |
| 199 } | 203 } |
| 200 } | 204 } |
| OLD | NEW |