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

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

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