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

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

Issue 9669019: Revert "Revert the revert." (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 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 | Annotate | Revision Log
« no previous file with comments | « tools/testing/dart/test_options.dart ('k') | tools/testing/frogpad/frogpad.py » ('j') | 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 311 matching lines...) Expand 10 before | Expand all | Expand 10 after
322 for (var dummy in optionsFromFile["vmOptions"]) { 322 for (var dummy in optionsFromFile["vmOptions"]) {
323 SummaryReport.add(expectations); 323 SummaryReport.add(expectations);
324 } 324 }
325 } 325 }
326 if (expectations.contains(SKIP)) return; 326 if (expectations.contains(SKIP)) return;
327 327
328 switch (configuration['component']) { 328 switch (configuration['component']) {
329 case 'dartium': 329 case 'dartium':
330 case 'chromium': 330 case 'chromium':
331 case 'frogium': 331 case 'frogium':
332 case 'frogsh':
333 case 'legium': 332 case 'legium':
334 case 'webdriver': 333 case 'webdriver':
335 enqueueBrowserTest(filename, testName, optionsFromFile, 334 enqueueBrowserTest(filename, testName, optionsFromFile,
336 expectations, isNegative); 335 expectations, isNegative);
337 break; 336 break;
338 default: 337 default:
339 isNegative = isNegative || 338 isNegative = isNegative ||
340 (configuration['checked'] && info.isNegativeIfChecked); 339 (configuration['checked'] && info.isNegativeIfChecked);
341 340
342 if (configuration['component'] == 'dartc') { 341 if (configuration['component'] == 'dartc') {
(...skipping 234 matching lines...) Expand 10 before | Expand all | Expand 10 after
577 List<String> args = TestUtils.standardOptions(configuration); 576 List<String> args = TestUtils.standardOptions(configuration);
578 switch (component) { 577 switch (component) {
579 // TODO(zundel): Remove chromium now that dartc doesn't generate code? 578 // TODO(zundel): Remove chromium now that dartc doesn't generate code?
580 case 'chromium': 579 case 'chromium':
581 args.addAll(['--work', dir]); 580 args.addAll(['--work', dir]);
582 args.addAll(vmOptions); 581 args.addAll(vmOptions);
583 args.add('--ignore-unrecognized-flags'); 582 args.add('--ignore-unrecognized-flags');
584 args.add(inputFile); 583 args.add(inputFile);
585 // TODO(whesse): Add --fatal-type-errors if needed. 584 // TODO(whesse): Add --fatal-type-errors if needed.
586 break; 585 break;
587 case 'frogsh':
588 args.clear();
589 args.add('--out=$outputFile');
590 args.add('--frogpad_js=' +
591 '${TestUtils.buildDir(configuration)}/frog/bin/frogpad.js');
592 args.add(inputFile);
593 break;
594 case 'frogium': 586 case 'frogium':
595 case 'legium': 587 case 'legium':
596 case 'webdriver': 588 case 'webdriver':
597 String libdir = configuration['froglib']; 589 String libdir = configuration['froglib'];
598 if (libdir == '') { 590 if (libdir == '') {
599 libdir = '$dartDir/frog/lib'; 591 libdir = '$dartDir/frog/lib';
600 } 592 }
601 args.addAll(['--libdir=$libdir', 593 args.addAll(['--libdir=$libdir',
602 '--compile-only', 594 '--compile-only',
603 '--out=$outputFile']); 595 '--out=$outputFile']);
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after
676 return TestUtils.mkdirRecursive(tempDirPath, 668 return TestUtils.mkdirRecursive(tempDirPath,
677 Strings.join(generatedTestPath, '/')); 669 Strings.join(generatedTestPath, '/'));
678 } 670 }
679 671
680 String get scriptType() { 672 String get scriptType() {
681 switch (configuration['component']) { 673 switch (configuration['component']) {
682 case 'dartium': 674 case 'dartium':
683 return 'application/dart'; 675 return 'application/dart';
684 case 'chromium': 676 case 'chromium':
685 case 'frogium': 677 case 'frogium':
686 case 'frogsh':
687 case 'legium': 678 case 'legium':
688 case 'webdriver': 679 case 'webdriver':
689 return 'text/javascript'; 680 return 'text/javascript';
690 default: 681 default:
691 Expect.fail("Unexpected component '{configuration['component']}'"); 682 Expect.fail('Unimplemented component scriptType');
692 return null; 683 return null;
693 } 684 }
694 } 685 }
695 686
696 String getHtmlName(String filename) { 687 String getHtmlName(String filename) {
697 return filename.replaceAll('/', '_').replaceAll(':', '_') 688 return filename.replaceAll('/', '_').replaceAll(':', '_')
698 + configuration['component'] + '.html'; 689 + configuration['component'] + '.html';
699 } 690 }
700 691
701 String get dumpRenderTreeFilename() { 692 String get dumpRenderTreeFilename() {
(...skipping 424 matching lines...) Expand 10 before | Expand all | Expand 10 after
1126 throw "Executable '$name' does not exist"; 1117 throw "Executable '$name' does not exist";
1127 } 1118 }
1128 return name; 1119 return name;
1129 } 1120 }
1130 1121
1131 static String compilerPath(Map configuration) { 1122 static String compilerPath(Map configuration) {
1132 if (configuration['component'] == 'dartium') { 1123 if (configuration['component'] == 'dartium') {
1133 return null; // No separate compiler for dartium tests. 1124 return null; // No separate compiler for dartium tests.
1134 } 1125 }
1135 var name = configuration['frog']; 1126 var name = configuration['frog'];
1136 if (configuration['component'] == 'frogsh') {
1137 name = '${dartDir()}/tools/testing/frogpad/frogpad.py';
1138 }
1139 if (name == '') { 1127 if (name == '') {
1140 name = '${buildDir(configuration)}/${compilerName(configuration)}'; 1128 name = '${buildDir(configuration)}/${compilerName(configuration)}';
1141 } 1129 }
1142 if (!(new File(name)).existsSync() && !configuration['list']) { 1130 if (!(new File(name)).existsSync() && !configuration['list']) {
1143 throw "Executable '$name' does not exist"; 1131 throw "Executable '$name' does not exist";
1144 } 1132 }
1145 return name; 1133 return name;
1146 } 1134 }
1147 1135
1148 static String outputDir(Map configuration) { 1136 static String outputDir(Map configuration) {
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after
1228 * $noCrash tests are expected to be flaky but not crash 1216 * $noCrash tests are expected to be flaky but not crash
1229 * $pass tests are expected to pass 1217 * $pass tests are expected to pass
1230 * $failOk tests are expected to fail that we won't fix 1218 * $failOk tests are expected to fail that we won't fix
1231 * $fail tests are expected to fail that we should fix 1219 * $fail tests are expected to fail that we should fix
1232 * $crash tests are expected to crash that we should fix 1220 * $crash tests are expected to crash that we should fix
1233 * $timeout tests are allowed to timeout 1221 * $timeout tests are allowed to timeout
1234 """; 1222 """;
1235 print(report); 1223 print(report);
1236 } 1224 }
1237 } 1225 }
OLDNEW
« no previous file with comments | « tools/testing/dart/test_options.dart ('k') | tools/testing/frogpad/frogpad.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698