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

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

Issue 9649024: revert prior submit (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 312 matching lines...) Expand 10 before | Expand all | Expand 10 after
323 for (var dummy in optionsFromFile["vmOptions"]) { 323 for (var dummy in optionsFromFile["vmOptions"]) {
324 SummaryReport.add(expectations); 324 SummaryReport.add(expectations);
325 } 325 }
326 } 326 }
327 if (expectations.contains(SKIP)) return; 327 if (expectations.contains(SKIP)) return;
328 328
329 switch (configuration['component']) { 329 switch (configuration['component']) {
330 case 'dartium': 330 case 'dartium':
331 case 'chromium': 331 case 'chromium':
332 case 'frogium': 332 case 'frogium':
333 case 'frogsh':
334 case 'legium': 333 case 'legium':
335 case 'webdriver': 334 case 'webdriver':
336 enqueueBrowserTest(filename, testName, optionsFromFile, 335 enqueueBrowserTest(filename, testName, optionsFromFile,
337 expectations, isNegative); 336 expectations, isNegative);
338 break; 337 break;
339 default: 338 default:
340 isNegative = isNegative || 339 isNegative = isNegative ||
341 (configuration['checked'] && info.isNegativeIfChecked); 340 (configuration['checked'] && info.isNegativeIfChecked);
342 341
343 if (configuration['component'] == 'dartc') { 342 if (configuration['component'] == 'dartc') {
(...skipping 234 matching lines...) Expand 10 before | Expand all | Expand 10 after
578 List<String> args = TestUtils.standardOptions(configuration); 577 List<String> args = TestUtils.standardOptions(configuration);
579 switch (component) { 578 switch (component) {
580 // TODO(zundel): Remove chromium now that dartc doesn't generate code? 579 // TODO(zundel): Remove chromium now that dartc doesn't generate code?
581 case 'chromium': 580 case 'chromium':
582 args.addAll(['--work', dir]); 581 args.addAll(['--work', dir]);
583 args.addAll(vmOptions); 582 args.addAll(vmOptions);
584 args.add('--ignore-unrecognized-flags'); 583 args.add('--ignore-unrecognized-flags');
585 args.add(inputFile); 584 args.add(inputFile);
586 // TODO(whesse): Add --fatal-type-errors if needed. 585 // TODO(whesse): Add --fatal-type-errors if needed.
587 break; 586 break;
588 case 'frogsh':
589 args.clear();
590 args.add('--out=$outputFile');
591 args.add('--frogpad_js=' +
592 '${TestUtils.buildDir(configuration)}/frog/bin/frogpad.js');
593 args.add(inputFile);
594 break;
595 case 'frogium': 587 case 'frogium':
596 case 'legium': 588 case 'legium':
597 case 'webdriver': 589 case 'webdriver':
598 String libdir = configuration['froglib']; 590 String libdir = configuration['froglib'];
599 if (libdir == '') { 591 if (libdir == '') {
600 libdir = '$dartDir/frog/lib'; 592 libdir = '$dartDir/frog/lib';
601 } 593 }
602 args.addAll(['--libdir=$libdir', 594 args.addAll(['--libdir=$libdir',
603 '--compile-only', 595 '--compile-only',
604 '--out=$outputFile']); 596 '--out=$outputFile']);
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after
677 return TestUtils.mkdirRecursive(tempDirPath, 669 return TestUtils.mkdirRecursive(tempDirPath,
678 Strings.join(generatedTestPath, '/')); 670 Strings.join(generatedTestPath, '/'));
679 } 671 }
680 672
681 String get scriptType() { 673 String get scriptType() {
682 switch (configuration['component']) { 674 switch (configuration['component']) {
683 case 'dartium': 675 case 'dartium':
684 return 'application/dart'; 676 return 'application/dart';
685 case 'chromium': 677 case 'chromium':
686 case 'frogium': 678 case 'frogium':
687 case 'frogsh':
688 case 'legium': 679 case 'legium':
689 case 'webdriver': 680 case 'webdriver':
690 return 'text/javascript'; 681 return 'text/javascript';
691 default: 682 default:
692 Expect.fail("Unexpected component '{configuration['component']}'"); 683 Expect.fail('Unimplemented component scriptType');
693 return null; 684 return null;
694 } 685 }
695 } 686 }
696 687
697 String getHtmlName(String filename) { 688 String getHtmlName(String filename) {
698 return filename.replaceAll('/', '_').replaceAll(':', '_') 689 return filename.replaceAll('/', '_').replaceAll(':', '_')
699 + configuration['component'] + '.html'; 690 + configuration['component'] + '.html';
700 } 691 }
701 692
702 String get dumpRenderTreeFilename() { 693 String get dumpRenderTreeFilename() {
(...skipping 423 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