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 } | |
482 args.add(testName); | 476 args.add(testName); |
483 | 477 |
484 var command = CommandBuilder.instance.getProcessCommand( | 478 var command = CommandBuilder.instance.getProcessCommand( |
485 'run_vm_unittest', targetRunnerPath, args, environmentOverrides); | 479 'run_vm_unittest', targetRunnerPath, args, environmentOverrides); |
486 enqueueNewTestCase( | 480 enqueueNewTestCase( |
487 new TestCase(constructedName, [command], configuration, expectations)); | 481 new TestCase(constructedName, [command], configuration, expectations)); |
488 } | 482 } |
489 | 483 |
490 Future<Null> forEachTest(Function onTest, Map testCache, | 484 Future<Null> forEachTest(Function onTest, Map testCache, |
491 [VoidFunction onDone]) async { | 485 [VoidFunction onDone]) async { |
(...skipping 1734 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2226 } | 2220 } |
2227 if (path.length > WINDOWS_SHORTEN_PATH_LIMIT) { | 2221 if (path.length > WINDOWS_SHORTEN_PATH_LIMIT) { |
2228 ++shortNameCounter; | 2222 ++shortNameCounter; |
2229 var pathEnd = path.substring(path.length - WINDOWS_PATH_END_LENGTH); | 2223 var pathEnd = path.substring(path.length - WINDOWS_PATH_END_LENGTH); |
2230 path = "short${shortNameCounter}_$pathEnd"; | 2224 path = "short${shortNameCounter}_$pathEnd"; |
2231 } | 2225 } |
2232 } | 2226 } |
2233 return path; | 2227 return path; |
2234 } | 2228 } |
2235 } | 2229 } |
OLD | NEW |