| 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 /** |
| 11 * Classes and methods for executing tests. | 11 * Classes and methods for executing tests. |
| 12 * | 12 * |
| 13 * This module includes: | 13 * This module includes: |
| 14 * - Managing parallel execution of tests, including timeout checks. | 14 * - Managing parallel execution of tests, including timeout checks. |
| 15 * - Evaluating the output of each test as pass/fail/crash/timeout. | 15 * - Evaluating the output of each test as pass/fail/crash/timeout. |
| 16 */ | 16 */ |
| 17 | 17 |
| 18 final int NO_TIMEOUT = 0; | 18 final int NO_TIMEOUT = 0; |
| 19 | 19 |
| 20 | 20 |
| 21 String getBuildDir(Map configuration) { | 21 String getBuildDir(Map configuration) { |
| 22 var buildDir = ''; | 22 var buildDir = ''; |
| 23 var os = configuration['os']; | 23 var system = configuration['system']; |
| 24 if (os == 'linux') { | 24 if (system == 'linux') { |
| 25 buildDir = 'out/'; | 25 buildDir = 'out/'; |
| 26 } else if (os == 'macos') { | 26 } else if (system == 'macos') { |
| 27 buildDir = 'xcodebuild/'; | 27 buildDir = 'xcodebuild/'; |
| 28 } | 28 } |
| 29 buildDir += (configuration['mode'] == 'debug') ? 'Debug_' : 'Release_'; | 29 buildDir += (configuration['mode'] == 'debug') ? 'Debug_' : 'Release_'; |
| 30 buildDir += configuration['architecture'] + '/'; | 30 buildDir += configuration['architecture'] + '/'; |
| 31 return buildDir; | 31 return buildDir; |
| 32 } | 32 } |
| 33 | 33 |
| 34 | 34 |
| 35 String getExecutableName(Map configuration) { | 35 String getExecutableName(Map configuration) { |
| 36 switch (configuration['component']) { | 36 switch (configuration['component']) { |
| (...skipping 169 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 206 numProcesses++; | 206 numProcesses++; |
| 207 } | 207 } |
| 208 } | 208 } |
| 209 | 209 |
| 210 runTest(TestCase test) { | 210 runTest(TestCase test) { |
| 211 progress.testAdded(); | 211 progress.testAdded(); |
| 212 tests.add(test); | 212 tests.add(test); |
| 213 tryRunTest(); | 213 tryRunTest(); |
| 214 } | 214 } |
| 215 } | 215 } |
| OLD | NEW |