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