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

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

Issue 2765893003: Fix warnings_checker.dart handling of multitests (Closed)
Patch Set: Created 3 years, 9 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
« no previous file with comments | « tools/testing/dart/multitest.dart ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 18 matching lines...) Expand all
29 29
30 import "compiler_configuration.dart" 30 import "compiler_configuration.dart"
31 show CommandArtifact, CompilerConfiguration; 31 show CommandArtifact, CompilerConfiguration;
32 32
33 import "runtime_configuration.dart" show RuntimeConfiguration; 33 import "runtime_configuration.dart" show RuntimeConfiguration;
34 34
35 import 'browser_test.dart'; 35 import 'browser_test.dart';
36 36
37 RegExp multiHtmlTestGroupRegExp = new RegExp(r"\s*[^/]\s*group\('[^,']*"); 37 RegExp multiHtmlTestGroupRegExp = new RegExp(r"\s*[^/]\s*group\('[^,']*");
38 RegExp multiHtmlTestRegExp = new RegExp(r"useHtmlIndividualConfiguration()"); 38 RegExp multiHtmlTestRegExp = new RegExp(r"useHtmlIndividualConfiguration()");
39 // Require at least one non-space character before '///' 39 // Require at least one non-space character before '//[/#]'
40 RegExp multiTestRegExp = new RegExp(r"\S *" 40 RegExp multiTestRegExp = new RegExp(r"\S *"
41 r"/// \w+:(.*)"); 41 r"//[#/] \w+:(.*)");
42 RegExp dartExtension = new RegExp(r'\.dart$'); 42 RegExp dartExtension = new RegExp(r'\.dart$');
43 43
44 /** 44 /**
45 * A simple function that tests [arg] and returns `true` or `false`. 45 * A simple function that tests [arg] and returns `true` or `false`.
46 */ 46 */
47 typedef bool Predicate<T>(T arg); 47 typedef bool Predicate<T>(T arg);
48 48
49 typedef void CreateTest(Path filePath, Path originTestPath, 49 typedef void CreateTest(Path filePath, Path originTestPath,
50 bool hasCompileError, bool hasRuntimeError, 50 bool hasCompileError, bool hasRuntimeError,
51 {bool isNegativeIfChecked, 51 {bool isNegativeIfChecked,
(...skipping 249 matching lines...) Expand 10 before | Expand all | Expand 10 after
301 } 301 }
302 // Test if the selector includes this test. 302 // Test if the selector includes this test.
303 RegExp pattern = configuration['selectors'][suiteName]; 303 RegExp pattern = configuration['selectors'][suiteName];
304 if (!pattern.hasMatch(testCase.displayName)) { 304 if (!pattern.hasMatch(testCase.displayName)) {
305 return; 305 return;
306 } 306 }
307 307
308 if (configuration['hot_reload'] || configuration['hot_reload_rollback']) { 308 if (configuration['hot_reload'] || configuration['hot_reload_rollback']) {
309 // Handle reload special cases. 309 // Handle reload special cases.
310 if (expectations.contains(Expectation.COMPILETIME_ERROR) || 310 if (expectations.contains(Expectation.COMPILETIME_ERROR) ||
311 testCase.hasCompileError || testCase.expectCompileError) { 311 testCase.hasCompileError ||
312 testCase.expectCompileError) {
312 // Running a test that expects a compilation error with hot reloading 313 // Running a test that expects a compilation error with hot reloading
313 // is redundant with a regular run of the test. 314 // is redundant with a regular run of the test.
314 return; 315 return;
315 } 316 }
316 } 317 }
317 318
318 // Update Summary report 319 // Update Summary report
319 if (configuration['report']) { 320 if (configuration['report']) {
320 if (testCase.expectCompileError && 321 if (testCase.expectCompileError &&
321 TestUtils.isBrowserRuntime(configuration['runtime']) && 322 TestUtils.isBrowserRuntime(configuration['runtime']) &&
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
376 return testName; 377 return testName;
377 } 378 }
378 379
379 /** 380 /**
380 * Create a directories for generated assets (tests, html files, 381 * Create a directories for generated assets (tests, html files,
381 * pubspec checkouts ...). 382 * pubspec checkouts ...).
382 */ 383 */
383 384
384 String createOutputDirectory(Path testPath, String optionsName) { 385 String createOutputDirectory(Path testPath, String optionsName) {
385 var checked = configuration['checked'] ? '-checked' : ''; 386 var checked = configuration['checked'] ? '-checked' : '';
386 var strong = configuration['strong'] ? '-strong' : ''; 387 var strong = configuration['strong'] ? '-strong' : '';
387 var minified = configuration['minified'] ? '-minified' : ''; 388 var minified = configuration['minified'] ? '-minified' : '';
388 var sdk = configuration['use_sdk'] ? '-sdk' : ''; 389 var sdk = configuration['use_sdk'] ? '-sdk' : '';
389 var dirName = "${configuration['compiler']}-${configuration['runtime']}" 390 var dirName = "${configuration['compiler']}-${configuration['runtime']}"
390 "$checked$strong$minified$sdk"; 391 "$checked$strong$minified$sdk";
391 return createGeneratedTestDirectoryHelper( 392 return createGeneratedTestDirectoryHelper(
392 "tests", dirName, testPath, optionsName); 393 "tests", dirName, testPath, optionsName);
393 } 394 }
394 395
395 String createCompilationOutputDirectory(Path testPath) { 396 String createCompilationOutputDirectory(Path testPath) {
396 var checked = configuration['checked'] ? '-checked' : ''; 397 var checked = configuration['checked'] ? '-checked' : '';
397 var strong = configuration['strong'] ? '-strong' : ''; 398 var strong = configuration['strong'] ? '-strong' : '';
398 var minified = configuration['minified'] ? '-minified' : ''; 399 var minified = configuration['minified'] ? '-minified' : '';
399 var csp = configuration['csp'] ? '-csp' : ''; 400 var csp = configuration['csp'] ? '-csp' : '';
400 var sdk = configuration['use_sdk'] ? '-sdk' : ''; 401 var sdk = configuration['use_sdk'] ? '-sdk' : '';
401 var dirName = "${configuration['compiler']}" 402 var dirName = "${configuration['compiler']}"
402 "$checked$strong$minified$csp$sdk"; 403 "$checked$strong$minified$csp$sdk";
403 return createGeneratedTestDirectoryHelper( 404 return createGeneratedTestDirectoryHelper(
404 "compilations", dirName, testPath, ""); 405 "compilations", dirName, testPath, "");
405 } 406 }
406 407
407 String createPubspecCheckoutDirectory(Path directoryOfPubspecYaml) { 408 String createPubspecCheckoutDirectory(Path directoryOfPubspecYaml) {
(...skipping 419 matching lines...) Expand 10 before | Expand all | Expand 10 after
827 enqueueTestCaseFromTestInformation(info); 828 enqueueTestCaseFromTestInformation(info);
828 return; 829 return;
829 } 830 }
830 if (!isTestFile(filename)) return; 831 if (!isTestFile(filename)) return;
831 Path filePath = new Path(filename); 832 Path filePath = new Path(filename);
832 833
833 var optionsFromFile = readOptionsFromFile(filePath); 834 var optionsFromFile = readOptionsFromFile(filePath);
834 CreateTest createTestCase = makeTestCaseCreator(optionsFromFile); 835 CreateTest createTestCase = makeTestCaseCreator(optionsFromFile);
835 836
836 if (optionsFromFile['isMultitest']) { 837 if (optionsFromFile['isMultitest']) {
837 group.add(doMultitest(filePath, 838 group.add(doMultitest(
838 buildDir, 839 filePath,
839 suiteDir, 840 buildDir,
840 createTestCase, 841 suiteDir,
841 (configuration['hot_reload'] || 842 createTestCase,
842 configuration['hot_reload_rollback']))); 843 (configuration['hot_reload'] ||
844 configuration['hot_reload_rollback'])));
843 } else { 845 } else {
844 createTestCase(filePath, filePath, optionsFromFile['hasCompileError'], 846 createTestCase(filePath, filePath, optionsFromFile['hasCompileError'],
845 optionsFromFile['hasRuntimeError'], 847 optionsFromFile['hasRuntimeError'],
846 hasStaticWarning: optionsFromFile['hasStaticWarning']); 848 hasStaticWarning: optionsFromFile['hasStaticWarning']);
847 } 849 }
848 } 850 }
849 851
850 static Path _findPubspecYamlFile(Path filePath) { 852 static Path _findPubspecYamlFile(Path filePath) {
851 final existsCache = TestUtils.existsCache; 853 final existsCache = TestUtils.existsCache;
852 854
(...skipping 273 matching lines...) Expand 10 before | Expand all | Expand 10 after
1126 */ 1128 */
1127 void enqueueBrowserTest(List<Command> baseCommands, Path packageRoot, 1129 void enqueueBrowserTest(List<Command> baseCommands, Path packageRoot,
1128 Path packages, TestInformation info, String testName, expectations) { 1130 Path packages, TestInformation info, String testName, expectations) {
1129 RegExp badChars = new RegExp('[-=/]'); 1131 RegExp badChars = new RegExp('[-=/]');
1130 List VmOptionsList = getVmOptions(info.optionsFromFile); 1132 List VmOptionsList = getVmOptions(info.optionsFromFile);
1131 bool multipleOptions = VmOptionsList.length > 1; 1133 bool multipleOptions = VmOptionsList.length > 1;
1132 for (var vmOptions in VmOptionsList) { 1134 for (var vmOptions in VmOptionsList) {
1133 String optionsName = 1135 String optionsName =
1134 multipleOptions ? vmOptions.join('-').replaceAll(badChars, '') : ''; 1136 multipleOptions ? vmOptions.join('-').replaceAll(badChars, '') : '';
1135 String tempDir = createOutputDirectory(info.filePath, optionsName); 1137 String tempDir = createOutputDirectory(info.filePath, optionsName);
1136 enqueueBrowserTestWithOptions(baseCommands, packageRoot, packages, 1138 enqueueBrowserTestWithOptions(baseCommands, packageRoot, packages, info,
1137 info, testName, expectations, vmOptions, tempDir); 1139 testName, expectations, vmOptions, tempDir);
1138 } 1140 }
1139 } 1141 }
1140 1142
1141 void enqueueBrowserTestWithOptions( 1143 void enqueueBrowserTestWithOptions(
1142 List<Command> baseCommands, 1144 List<Command> baseCommands,
1143 Path packageRoot, 1145 Path packageRoot,
1144 Path packages, 1146 Path packages,
1145 TestInformation info, 1147 TestInformation info,
1146 String testName, 1148 String testName,
1147 expectations, 1149 expectations,
(...skipping 246 matching lines...) Expand 10 before | Expand all | Expand 10 after
1394 String dir, optionsFromFile) { 1396 String dir, optionsFromFile) {
1395 assert(compiler == 'dart2js'); 1397 assert(compiler == 'dart2js');
1396 List<String> args; 1398 List<String> args;
1397 if (compilerPath.endsWith('.dart')) { 1399 if (compilerPath.endsWith('.dart')) {
1398 // Run the compiler script via the Dart VM. 1400 // Run the compiler script via the Dart VM.
1399 args = [compilerPath]; 1401 args = [compilerPath];
1400 } else { 1402 } else {
1401 args = []; 1403 args = [];
1402 } 1404 }
1403 args.addAll(TestUtils.standardOptions(configuration)); 1405 args.addAll(TestUtils.standardOptions(configuration));
1404 String packages = packagesArgument(optionsFromFile['packageRoot'], 1406 String packages = packagesArgument(
1405 optionsFromFile['packages']); 1407 optionsFromFile['packageRoot'], optionsFromFile['packages']);
1406 if (packages != null) args.add(packages); 1408 if (packages != null) args.add(packages);
1407 args.add('--out=$outputFile'); 1409 args.add('--out=$outputFile');
1408 args.add(inputFile); 1410 args.add(inputFile);
1409 List<String> options = optionsFromFile['sharedOptions']; 1411 List<String> options = optionsFromFile['sharedOptions'];
1410 if (options != null) args.addAll(options); 1412 if (options != null) args.addAll(options);
1411 return CommandBuilder.instance.getCompilationCommand( 1413 return CommandBuilder.instance.getCompilationCommand(
1412 compiler, 1414 compiler,
1413 outputFile, 1415 outputFile,
1414 !useSdk, 1416 !useSdk,
1415 dart2JsBootstrapDependencies, 1417 dart2JsBootstrapDependencies,
1416 compilerPath, 1418 compilerPath,
1417 args, 1419 args,
1418 environmentOverrides); 1420 environmentOverrides);
1419 } 1421 }
1420 1422
1421 /** Helper to create a Polymer deploy command for a single HTML file. */ 1423 /** Helper to create a Polymer deploy command for a single HTML file. */
1422 Command _polymerDeployCommand( 1424 Command _polymerDeployCommand(
1423 String inputFile, String outputDir, optionsFromFile) { 1425 String inputFile, String outputDir, optionsFromFile) {
1424 List<String> args = []; 1426 List<String> args = [];
1425 String packages = packagesArgument(optionsFromFile['packageRoot'], 1427 String packages = packagesArgument(
1426 optionsFromFile['packages']); 1428 optionsFromFile['packageRoot'], optionsFromFile['packages']);
1427 if (packages != null) args.add(packages); 1429 if (packages != null) args.add(packages);
1428 args 1430 args
1429 ..add('package:polymer/deploy.dart') 1431 ..add('package:polymer/deploy.dart')
1430 ..add('--test') 1432 ..add('--test')
1431 ..add(inputFile) 1433 ..add(inputFile)
1432 ..add('--out') 1434 ..add('--out')
1433 ..add(outputDir) 1435 ..add(outputDir)
1434 ..add('--file-filter') 1436 ..add('--file-filter')
1435 ..add('.svn'); 1437 ..add('.svn');
1436 if (configuration['csp']) args.add('--csp'); 1438 if (configuration['csp']) args.add('--csp');
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
1471 final path = dartDir.append( 1473 final path = dartDir.append(
1472 '/client/tests/drt/Content Shell.app/Contents/MacOS/Content Shell'); 1474 '/client/tests/drt/Content Shell.app/Contents/MacOS/Content Shell');
1473 return path.toNativePath(); 1475 return path.toNativePath();
1474 } 1476 }
1475 return dartDir.append('client/tests/drt/content_shell').toNativePath(); 1477 return dartDir.append('client/tests/drt/content_shell').toNativePath();
1476 } 1478 }
1477 1479
1478 List<String> commonArgumentsFromFile(Path filePath, Map optionsFromFile) { 1480 List<String> commonArgumentsFromFile(Path filePath, Map optionsFromFile) {
1479 List args = TestUtils.standardOptions(configuration); 1481 List args = TestUtils.standardOptions(configuration);
1480 1482
1481 String packages = packagesArgument(optionsFromFile['packageRoot'], 1483 String packages = packagesArgument(
1482 optionsFromFile['packages']); 1484 optionsFromFile['packageRoot'], optionsFromFile['packages']);
1483 if (packages != null) { 1485 if (packages != null) {
1484 args.add(packages); 1486 args.add(packages);
1485 } 1487 }
1486 args.addAll(additionalOptions(filePath)); 1488 args.addAll(additionalOptions(filePath));
1487 if (configuration['analyzer']) { 1489 if (configuration['analyzer']) {
1488 args.add('--format=machine'); 1490 args.add('--format=machine');
1489 args.add('--no-hints'); 1491 args.add('--no-hints');
1490 } 1492 }
1491 1493
1492 if (configuration["compiler"] == "dart2analyzer" && 1494 if (configuration["compiler"] == "dart2analyzer" &&
1493 (filePath.filename.contains("dart2js") || 1495 (filePath.filename.contains("dart2js") ||
1494 filePath.directoryPath.segments().last.contains('html_common'))) { 1496 filePath.directoryPath.segments().last.contains('html_common'))) {
1495 args.add("--use-dart2js-libraries"); 1497 args.add("--use-dart2js-libraries");
1496 } 1498 }
1497 1499
1498 bool isMultitest = optionsFromFile["isMultitest"]; 1500 bool isMultitest = optionsFromFile["isMultitest"];
1499 List<String> dartOptions = optionsFromFile["dartOptions"]; 1501 List<String> dartOptions = optionsFromFile["dartOptions"];
1500 1502
1501 assert(!isMultitest || dartOptions == null); 1503 assert(!isMultitest || dartOptions == null);
1502 args.add(filePath.toNativePath()); 1504 args.add(filePath.toNativePath());
1503 if (dartOptions != null) { 1505 if (dartOptions != null) {
1504 args.addAll(dartOptions); 1506 args.addAll(dartOptions);
1505 } 1507 }
1506 1508
1507 return args; 1509 return args;
1508 } 1510 }
1509 1511
1510 String packagesArgument(String packageRootFromFile, 1512 String packagesArgument(String packageRootFromFile, String packagesFromFile) {
1511 String packagesFromFile) { 1513 if (packageRootFromFile == 'none' || packagesFromFile == 'none') {
1512 if (packageRootFromFile == 'none' ||
1513 packagesFromFile == 'none') {
1514 return null; 1514 return null;
1515 } else if (packagesFromFile != null) { 1515 } else if (packagesFromFile != null) {
1516 return '--packages=$packagesFromFile'; 1516 return '--packages=$packagesFromFile';
1517 } else if (packageRootFromFile != null) { 1517 } else if (packageRootFromFile != null) {
1518 return '--package-root=$packageRootFromFile'; 1518 return '--package-root=$packageRootFromFile';
1519 } else { 1519 } else {
1520 return null; 1520 return null;
1521 } 1521 }
1522 } 1522 }
1523 1523
1524 /** 1524 /**
1525 * Special options for individual tests are currently specified in various 1525 * Special options for individual tests are currently specified in various
1526 * ways: with comments directly in test files, by using certain imports, or by 1526 * ways: with comments directly in test files, by using certain imports, or by
1527 * creating additional files in the test directories. 1527 * creating additional files in the test directories.
1528 * 1528 *
1529 * Here is a list of options that are used by 'test.dart' today: 1529 * Here is a list of options that are used by 'test.dart' today:
1530 * - Flags can be passed to the vm or dartium process that runs the test by 1530 * - Flags can be passed to the vm or dartium process that runs the test by
(...skipping 179 matching lines...) Expand 10 before | Expand all | Expand 10 after
1710 "isMultitest": isMultitest, 1710 "isMultitest": isMultitest,
1711 "isMultiHtmlTest": isMultiHtmlTest, 1711 "isMultiHtmlTest": isMultiHtmlTest,
1712 "subtestNames": subtestNames, 1712 "subtestNames": subtestNames,
1713 "isolateStubs": isolateStubs, 1713 "isolateStubs": isolateStubs,
1714 "containsDomImport": containsDomImport 1714 "containsDomImport": containsDomImport
1715 }; 1715 };
1716 } 1716 }
1717 1717
1718 Map optionsFromKernelFile() { 1718 Map optionsFromKernelFile() {
1719 return const { 1719 return const {
1720 "vmOptions": const [ const []], 1720 "vmOptions": const [const []],
1721 "sharedOptions": const [], 1721 "sharedOptions": const [],
1722 "dartOptions": null, 1722 "dartOptions": null,
1723 "packageRoot": null, 1723 "packageRoot": null,
1724 "packages": null, 1724 "packages": null,
1725 "hasCompileError": false, 1725 "hasCompileError": false,
1726 "hasRuntimeError": false, 1726 "hasRuntimeError": false,
1727 "hasStaticWarning": false, 1727 "hasStaticWarning": false,
1728 "otherScripts": const [], 1728 "otherScripts": const [],
1729 "isMultitest": false, 1729 "isMultitest": false,
1730 "isMultiHtmlTest": false, 1730 "isMultiHtmlTest": false,
(...skipping 195 matching lines...) Expand 10 before | Expand all | Expand 10 after
1926 var checkoutDir = 1926 var checkoutDir =
1927 createPubPackageBuildsDirectory(absoluteDirectoryPath); 1927 createPubPackageBuildsDirectory(absoluteDirectoryPath);
1928 var cacheDir = new Path(checkoutDir).append("pub-cache").toNativePath(); 1928 var cacheDir = new Path(checkoutDir).append("pub-cache").toNativePath();
1929 1929
1930 // Build all commands 1930 // Build all commands
1931 // In order to debug timeouts on the buildbots, We run `pub get` with 1931 // In order to debug timeouts on the buildbots, We run `pub get` with
1932 // "--verbose". See https://github.com/dart-lang/sdk/issues/28734. 1932 // "--verbose". See https://github.com/dart-lang/sdk/issues/28734.
1933 var commands = [ 1933 var commands = [
1934 CommandBuilder.instance.getCopyCommand(directory, checkoutDir), 1934 CommandBuilder.instance.getCopyCommand(directory, checkoutDir),
1935 CommandBuilder.instance.getPubCommand( 1935 CommandBuilder.instance.getPubCommand(
1936 "get", pubPath, checkoutDir, cacheDir, arguments: ['--verbose']) 1936 "get", pubPath, checkoutDir, cacheDir,
1937 arguments: ['--verbose'])
1937 ]; 1938 ];
1938 1939
1939 bool containsWebDirectory = dirExists(directoryPath.append('web')); 1940 bool containsWebDirectory = dirExists(directoryPath.append('web'));
1940 bool containsBuildDartFile = 1941 bool containsBuildDartFile =
1941 fileExists(directoryPath.append('build.dart')); 1942 fileExists(directoryPath.append('build.dart'));
1942 if (containsBuildDartFile) { 1943 if (containsBuildDartFile) {
1943 var dartBinary = new File(dartVmBinaryFileName).absolute.path; 1944 var dartBinary = new File(dartVmBinaryFileName).absolute.path;
1944 1945
1945 commands.add(CommandBuilder.instance.getProcessCommand( 1946 commands.add(CommandBuilder.instance.getProcessCommand(
1946 "custom_build", 1947 "custom_build",
(...skipping 188 matching lines...) Expand 10 before | Expand all | Expand 10 after
2135 var dir = new Directory(path); 2136 var dir = new Directory(path);
2136 return dir.delete(recursive: true); 2137 return dir.delete(recursive: true);
2137 } 2138 }
2138 } 2139 }
2139 2140
2140 static deleteTempSnapshotDirectory(Map configuration) { 2141 static deleteTempSnapshotDirectory(Map configuration) {
2141 if (configuration['compiler'] == 'dart2app' || 2142 if (configuration['compiler'] == 'dart2app' ||
2142 configuration['compiler'] == 'dart2appjit' || 2143 configuration['compiler'] == 'dart2appjit' ||
2143 configuration['compiler'] == 'precompiler') { 2144 configuration['compiler'] == 'precompiler') {
2144 var checked = configuration['checked'] ? '-checked' : ''; 2145 var checked = configuration['checked'] ? '-checked' : '';
2145 var strong = configuration['strong'] ? '-strong' : ''; 2146 var strong = configuration['strong'] ? '-strong' : '';
2146 var minified = configuration['minified'] ? '-minified' : ''; 2147 var minified = configuration['minified'] ? '-minified' : '';
2147 var csp = configuration['csp'] ? '-csp' : ''; 2148 var csp = configuration['csp'] ? '-csp' : '';
2148 var sdk = configuration['use_sdk'] ? '-sdk' : ''; 2149 var sdk = configuration['use_sdk'] ? '-sdk' : '';
2149 var dirName = "${configuration['compiler']}" 2150 var dirName = "${configuration['compiler']}"
2150 "$checked$strong$minified$csp$sdk"; 2151 "$checked$strong$minified$csp$sdk";
2151 String generatedPath = "${TestUtils.buildDir(configuration)}" 2152 String generatedPath = "${TestUtils.buildDir(configuration)}"
2152 "/generated_compilations/$dirName"; 2153 "/generated_compilations/$dirName";
2153 TestUtils.deleteDirectory(generatedPath); 2154 TestUtils.deleteDirectory(generatedPath);
2154 } 2155 }
2155 } 2156 }
(...skipping 181 matching lines...) Expand 10 before | Expand all | Expand 10 after
2337 .where((s) => s.isNotEmpty) 2338 .where((s) => s.isNotEmpty)
2338 .toList(); 2339 .toList();
2339 } 2340 }
2340 2341
2341 /** 2342 /**
2342 * Gets extra vm options passed to the testing script. 2343 * Gets extra vm options passed to the testing script.
2343 */ 2344 */
2344 static List<String> getExtraVmOptions(Map configuration) => 2345 static List<String> getExtraVmOptions(Map configuration) =>
2345 getExtraOptions(configuration, 'vm_options'); 2346 getExtraOptions(configuration, 'vm_options');
2346 2347
2347 static int shortNameCounter = 0; // Make unique short file names on Windows. 2348 static int shortNameCounter = 0; // Make unique short file names on Windows.
2348 2349
2349 static String getShortName(String path) { 2350 static String getShortName(String path) {
2350 final PATH_REPLACEMENTS = const { 2351 final PATH_REPLACEMENTS = const {
2351 "pkg_polymer_e2e_test_bad_import_test": "polymer_bi", 2352 "pkg_polymer_e2e_test_bad_import_test": "polymer_bi",
2352 "pkg_polymer_e2e_test_canonicalization_test": "polymer_c16n", 2353 "pkg_polymer_e2e_test_canonicalization_test": "polymer_c16n",
2353 "pkg_polymer_e2e_test_experimental_boot_test": "polymer_boot", 2354 "pkg_polymer_e2e_test_experimental_boot_test": "polymer_boot",
2354 "pkg_polymer_e2e_test_good_import_test": "polymer_gi", 2355 "pkg_polymer_e2e_test_good_import_test": "polymer_gi",
2355 "tests_co19_src_Language_12_Expressions_14_Function_Invocation_": 2356 "tests_co19_src_Language_12_Expressions_14_Function_Invocation_":
2356 "co19_fn_invoke_", 2357 "co19_fn_invoke_",
2357 "tests_co19_src_LayoutTests_fast_css_getComputedStyle_getComputedStyle-": 2358 "tests_co19_src_LayoutTests_fast_css_getComputedStyle_getComputedStyle-":
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
2420 } 2421 }
2421 if (path.length > WINDOWS_SHORTEN_PATH_LIMIT) { 2422 if (path.length > WINDOWS_SHORTEN_PATH_LIMIT) {
2422 ++shortNameCounter; 2423 ++shortNameCounter;
2423 var pathEnd = path.substring(path.length - WINDOWS_PATH_END_LENGTH); 2424 var pathEnd = path.substring(path.length - WINDOWS_PATH_END_LENGTH);
2424 path = "short${shortNameCounter}_$pathEnd"; 2425 path = "short${shortNameCounter}_$pathEnd";
2425 } 2426 }
2426 } 2427 }
2427 return path; 2428 return path;
2428 } 2429 }
2429 } 2430 }
OLDNEW
« no previous file with comments | « tools/testing/dart/multitest.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698