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 454 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
465 } | 465 } |
466 | 466 |
467 void testNameHandler(TestExpectations testExpectations, String testName) { | 467 void testNameHandler(TestExpectations testExpectations, String testName) { |
468 // Only run the tests that match the pattern. Use the name | 468 // Only run the tests that match the pattern. Use the name |
469 // "suiteName/testName" for cc tests. | 469 // "suiteName/testName" for cc tests. |
470 String constructedName = '$suiteName/$testPrefix$testName'; | 470 String constructedName = '$suiteName/$testPrefix$testName'; |
471 | 471 |
472 var expectations = testExpectations.expectations('$testPrefix$testName'); | 472 var expectations = testExpectations.expectations('$testPrefix$testName'); |
473 | 473 |
474 var args = TestUtils.standardOptions(configuration); | 474 var args = TestUtils.standardOptions(configuration); |
| 475 var compilerConfiguration = new CompilerConfiguration(configuration); |
| 476 if (compilerConfiguration.useDFE) { |
| 477 args.add('--use-dart-frontend'); |
| 478 // '--dfe' has to be the first argument for run_vm_test to pick it up. |
| 479 args.insert(0, '--dfe=$buildDir/gen/kernel-service.dart.snapshot'); |
| 480 } |
475 args.add(testName); | 481 args.add(testName); |
476 | 482 |
477 var command = CommandBuilder.instance.getProcessCommand( | 483 var command = CommandBuilder.instance.getProcessCommand( |
478 'run_vm_unittest', targetRunnerPath, args, environmentOverrides); | 484 'run_vm_unittest', targetRunnerPath, args, environmentOverrides); |
479 enqueueNewTestCase( | 485 enqueueNewTestCase( |
480 new TestCase(constructedName, [command], configuration, expectations)); | 486 new TestCase(constructedName, [command], configuration, expectations)); |
481 } | 487 } |
482 | 488 |
483 void forEachTest(Function onTest, Map testCache, [VoidFunction onDone]) { | 489 void forEachTest(Function onTest, Map testCache, [VoidFunction onDone]) { |
484 doTest = onTest; | 490 doTest = onTest; |
(...skipping 1730 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2215 } | 2221 } |
2216 if (path.length > WINDOWS_SHORTEN_PATH_LIMIT) { | 2222 if (path.length > WINDOWS_SHORTEN_PATH_LIMIT) { |
2217 ++shortNameCounter; | 2223 ++shortNameCounter; |
2218 var pathEnd = path.substring(path.length - WINDOWS_PATH_END_LENGTH); | 2224 var pathEnd = path.substring(path.length - WINDOWS_PATH_END_LENGTH); |
2219 path = "short${shortNameCounter}_$pathEnd"; | 2225 path = "short${shortNameCounter}_$pathEnd"; |
2220 } | 2226 } |
2221 } | 2227 } |
2222 return path; | 2228 return path; |
2223 } | 2229 } |
2224 } | 2230 } |
OLD | NEW |