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 456 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
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); | 476 var compilerConfiguration = new CompilerConfiguration(configuration); |
477 if (compilerConfiguration.useDfe) { | 477 if (compilerConfiguration.useDFE) { |
478 args.add('--use-dart-frontend'); | 478 args.add('--use-dart-frontend'); |
479 // '--dfe' has to be the first argument for run_vm_test to pick it up. | 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'); | 480 args.insert(0, '--dfe=$buildDir/gen/kernel-service.dart.snapshot'); |
481 } | 481 } |
482 args.add(testName); | 482 args.add(testName); |
483 | 483 |
484 var command = CommandBuilder.instance.getProcessCommand( | 484 var command = CommandBuilder.instance.getProcessCommand( |
485 'run_vm_unittest', targetRunnerPath, args, environmentOverrides); | 485 'run_vm_unittest', targetRunnerPath, args, environmentOverrides); |
486 enqueueNewTestCase( | 486 enqueueNewTestCase( |
487 new TestCase(constructedName, [command], configuration, expectations)); | 487 new TestCase(constructedName, [command], configuration, expectations)); |
(...skipping 1533 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2021 args.add("--allow-mock-compilation"); | 2021 args.add("--allow-mock-compilation"); |
2022 args.add("--categories=all"); | 2022 args.add("--categories=all"); |
2023 } | 2023 } |
2024 } | 2024 } |
2025 if ((compiler == "dart2js") && configuration["minified"]) { | 2025 if ((compiler == "dart2js") && configuration["minified"]) { |
2026 args.add("--minify"); | 2026 args.add("--minify"); |
2027 } | 2027 } |
2028 if (compiler == "dart2js" && configuration["csp"]) { | 2028 if (compiler == "dart2js" && configuration["csp"]) { |
2029 args.add("--csp"); | 2029 args.add("--csp"); |
2030 } | 2030 } |
| 2031 if (compiler == "dart2js" && configuration["cps_ir"]) { |
| 2032 args.add("--use-cps-ir"); |
| 2033 } |
2031 if (compiler == "dart2js" && configuration["fast_startup"]) { | 2034 if (compiler == "dart2js" && configuration["fast_startup"]) { |
2032 args.add("--fast-startup"); | 2035 args.add("--fast-startup"); |
2033 } | 2036 } |
2034 if (compiler == "dart2js" && configuration["dart2js_with_kernel"]) { | 2037 if (compiler == "dart2js" && configuration["dart2js_with_kernel"]) { |
2035 args.add("--use-kernel"); | 2038 args.add("--use-kernel"); |
2036 } | 2039 } |
2037 return args; | 2040 return args; |
2038 } | 2041 } |
2039 | 2042 |
2040 static bool isBrowserRuntime(String runtime) { | 2043 static bool isBrowserRuntime(String runtime) { |
(...skipping 182 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2223 } | 2226 } |
2224 if (path.length > WINDOWS_SHORTEN_PATH_LIMIT) { | 2227 if (path.length > WINDOWS_SHORTEN_PATH_LIMIT) { |
2225 ++shortNameCounter; | 2228 ++shortNameCounter; |
2226 var pathEnd = path.substring(path.length - WINDOWS_PATH_END_LENGTH); | 2229 var pathEnd = path.substring(path.length - WINDOWS_PATH_END_LENGTH); |
2227 path = "short${shortNameCounter}_$pathEnd"; | 2230 path = "short${shortNameCounter}_$pathEnd"; |
2228 } | 2231 } |
2229 } | 2232 } |
2230 return path; | 2233 return path; |
2231 } | 2234 } |
2232 } | 2235 } |
OLD | NEW |