Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(172)

Side by Side Diff: tools/testing/dart/test_suite.dart

Issue 2908833002: Revert "Revert "Refactor test option parsing code."" (Closed)
Patch Set: Ignore "—failure-summary" so it doesn't break the bots. Created 3 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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
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 }
2034 if (compiler == "dart2js" && configuration["fast_startup"]) { 2031 if (compiler == "dart2js" && configuration["fast_startup"]) {
2035 args.add("--fast-startup"); 2032 args.add("--fast-startup");
2036 } 2033 }
2037 if (compiler == "dart2js" && configuration["dart2js_with_kernel"]) { 2034 if (compiler == "dart2js" && configuration["dart2js_with_kernel"]) {
2038 args.add("--use-kernel"); 2035 args.add("--use-kernel");
2039 } 2036 }
2040 return args; 2037 return args;
2041 } 2038 }
2042 2039
2043 static bool isBrowserRuntime(String runtime) { 2040 static bool isBrowserRuntime(String runtime) {
(...skipping 182 matching lines...) Expand 10 before | Expand all | Expand 10 after
2226 } 2223 }
2227 if (path.length > WINDOWS_SHORTEN_PATH_LIMIT) { 2224 if (path.length > WINDOWS_SHORTEN_PATH_LIMIT) {
2228 ++shortNameCounter; 2225 ++shortNameCounter;
2229 var pathEnd = path.substring(path.length - WINDOWS_PATH_END_LENGTH); 2226 var pathEnd = path.substring(path.length - WINDOWS_PATH_END_LENGTH);
2230 path = "short${shortNameCounter}_$pathEnd"; 2227 path = "short${shortNameCounter}_$pathEnd";
2231 } 2228 }
2232 } 2229 }
2233 return path; 2230 return path;
2234 } 2231 }
2235 } 2232 }
OLDNEW
« tools/testing/dart/options.dart ('K') | « tools/testing/dart/test_options.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698