| 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_suite"); | 5 #library("test_suite"); |
| 6 | 6 |
| 7 #import("status_file_parser.dart"); | 7 #import("status_file_parser.dart"); |
| 8 #import("test_runner.dart"); | 8 #import("test_runner.dart"); |
| 9 | 9 |
| 10 interface TestSuite { | 10 interface TestSuite { |
| (...skipping 263 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 274 | 274 |
| 275 return { "vmOptions": result, | 275 return { "vmOptions": result, |
| 276 "dartOptions": dartOptions, | 276 "dartOptions": dartOptions, |
| 277 "isNegative" : isNegative }; | 277 "isNegative" : isNegative }; |
| 278 } | 278 } |
| 279 } | 279 } |
| 280 | 280 |
| 281 | 281 |
| 282 class TestUtils { | 282 class TestUtils { |
| 283 static String executableName(Map configuration) { | 283 static String executableName(Map configuration) { |
| 284 String postfix = |
| 285 (new Platform().operatingSystem() == 'windows') ? '.exe' : ''; |
| 284 switch (configuration['component']) { | 286 switch (configuration['component']) { |
| 285 case 'vm': | 287 case 'vm': |
| 286 return 'dart'; | 288 return 'dart$postfix'; |
| 287 case 'dartc': | 289 case 'dartc': |
| 288 return 'compiler/bin/dartc_test'; | 290 return 'compiler/bin/dartc_test$postfix'; |
| 289 case 'frog': | 291 case 'frog': |
| 290 case 'leg': | 292 case 'leg': |
| 291 return 'frog/bin/frog'; | 293 return 'frog/bin/frog$postfix'; |
| 292 case 'frogsh': | 294 case 'frogsh': |
| 293 return 'frog/bin/frogsh'; | 295 return 'frog/bin/frogsh$postfix'; |
| 294 default: | 296 default: |
| 295 throw "Unknown executable for: ${configuration['component']}"; | 297 throw "Unknown executable for: ${configuration['component']}"; |
| 296 } | 298 } |
| 297 } | 299 } |
| 298 | 300 |
| 299 | 301 |
| 300 static String dartShellFileName(Map configuration) { | 302 static String dartShellFileName(Map configuration) { |
| 301 var name = buildDir(configuration) + executableName(configuration); | 303 var name = buildDir(configuration) + executableName(configuration); |
| 302 if (!(new File(name)).existsSync()) { | 304 if (!(new File(name)).existsSync()) { |
| 303 throw "Executable '$name' does not exist"; | 305 throw "Executable '$name' does not exist"; |
| (...skipping 24 matching lines...) Expand all Loading... |
| 328 args.add("--enable_leg"); | 330 args.add("--enable_leg"); |
| 329 } | 331 } |
| 330 if (configuration["component"] == "dartc") { | 332 if (configuration["component"] == "dartc") { |
| 331 if (configuration["mode"] == "release") { | 333 if (configuration["mode"] == "release") { |
| 332 args.add("--optimize"); | 334 args.add("--optimize"); |
| 333 } | 335 } |
| 334 } | 336 } |
| 335 return args; | 337 return args; |
| 336 } | 338 } |
| 337 } | 339 } |
| OLD | NEW |