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

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

Issue 11267008: Fix issue that cases the usesWebDriver getter in TestCase to always return false. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years, 1 month 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
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 137 matching lines...) Expand 10 before | Expand all | Expand 10 after
148 148
149 if (expectations.contains(SKIP)) return; 149 if (expectations.contains(SKIP)) return;
150 150
151 var args = TestUtils.standardOptions(configuration); 151 var args = TestUtils.standardOptions(configuration);
152 args.add(testName); 152 args.add(testName);
153 153
154 doTest(new TestCase(constructedName, 154 doTest(new TestCase(constructedName,
155 [new Command(runnerPath, args)], 155 [new Command(runnerPath, args)],
156 configuration, 156 configuration,
157 completeHandler, 157 completeHandler,
158 expectations, 158 expectations));
159 usesWebDriver: TestUtils.usesWebDriver));
160 } 159 }
161 } 160 }
162 161
163 void forEachTest(TestCaseEvent onTest, Map testCache, [VoidFunction onDone]) { 162 void forEachTest(TestCaseEvent onTest, Map testCache, [VoidFunction onDone]) {
164 doTest = onTest; 163 doTest = onTest;
165 doDone = () => (onDone != null) ? onDone() : null; 164 doDone = () => (onDone != null) ? onDone() : null;
166 165
167 var filesRead = 0; 166 var filesRead = 0;
168 void statusFileRead() { 167 void statusFileRead() {
169 filesRead++; 168 filesRead++;
(...skipping 281 matching lines...) Expand 10 before | Expand all | Expand 10 after
451 List<List<String>> vmOptionsList = getVmOptions(info.optionsFromFile); 450 List<List<String>> vmOptionsList = getVmOptions(info.optionsFromFile);
452 Expect.isFalse(vmOptionsList.isEmpty(), "empty vmOptionsList"); 451 Expect.isFalse(vmOptionsList.isEmpty(), "empty vmOptionsList");
453 452
454 for (var vmOptions in vmOptionsList) { 453 for (var vmOptions in vmOptionsList) {
455 doTest(new TestCase('$suiteName/$testName', 454 doTest(new TestCase('$suiteName/$testName',
456 makeCommands(info, vmOptions, commonArguments), 455 makeCommands(info, vmOptions, commonArguments),
457 configuration, 456 configuration,
458 completeHandler, 457 completeHandler,
459 expectations, 458 expectations,
460 isNegative: isNegative, 459 isNegative: isNegative,
461 info: info, 460 info: info));
462 usesWebDriver: TestUtils.usesWebDriver));
463 } 461 }
464 } 462 }
465 463
466 List<Command> makeCommands(TestInformation info, var vmOptions, var args) { 464 List<Command> makeCommands(TestInformation info, var vmOptions, var args) {
467 switch (configuration['compiler']) { 465 switch (configuration['compiler']) {
468 case 'dart2js': 466 case 'dart2js':
469 args = new List.from(args); 467 args = new List.from(args);
470 String tempDir = createOutputDirectory(info.filePath, ''); 468 String tempDir = createOutputDirectory(info.filePath, '');
471 args.add('--out=$tempDir/out.js'); 469 args.add('--out=$tempDir/out.js');
472 List<Command> commands = <Command>[new Command(shellPath(), args)]; 470 List<Command> commands = <Command>[new Command(shellPath(), args)];
(...skipping 730 matching lines...) Expand 10 before | Expand all | Expand 10 after
1203 // to run for a few minutes. 1201 // to run for a few minutes.
1204 Map updatedConfiguration = new Map(); 1202 Map updatedConfiguration = new Map();
1205 configuration.forEach((key, value) { 1203 configuration.forEach((key, value) {
1206 updatedConfiguration[key] = value; 1204 updatedConfiguration[key] = value;
1207 }); 1205 });
1208 updatedConfiguration['timeout'] *= 3; 1206 updatedConfiguration['timeout'] *= 3;
1209 doTest(new TestCase(suiteName, 1207 doTest(new TestCase(suiteName,
1210 [new Command('java', args)], 1208 [new Command('java', args)],
1211 updatedConfiguration, 1209 updatedConfiguration,
1212 completeHandler, 1210 completeHandler,
1213 new Set<String>.from([PASS]), 1211 new Set<String>.from([PASS])));
1214 usesWebDriver: TestUtils.usesWebDriver));
1215 doDone(); 1212 doDone();
1216 } 1213 }
1217 1214
1218 void completeHandler(TestCase testCase) { 1215 void completeHandler(TestCase testCase) {
1219 } 1216 }
1220 1217
1221 void computeClassPath() { 1218 void computeClassPath() {
1222 classPath = Strings.join( 1219 classPath = Strings.join(
1223 ['$buildDir/analyzer/util/analyzer/dart_analyzer.jar', 1220 ['$buildDir/analyzer/util/analyzer/dart_analyzer.jar',
1224 '$buildDir/analyzer/dart_analyzer_tests.jar', 1221 '$buildDir/analyzer/dart_analyzer_tests.jar',
(...skipping 253 matching lines...) Expand 10 before | Expand all | Expand 10 after
1478 * $noCrash tests are expected to be flaky but not crash 1475 * $noCrash tests are expected to be flaky but not crash
1479 * $pass tests are expected to pass 1476 * $pass tests are expected to pass
1480 * $failOk tests are expected to fail that we won't fix 1477 * $failOk tests are expected to fail that we won't fix
1481 * $fail tests are expected to fail that we should fix 1478 * $fail tests are expected to fail that we should fix
1482 * $crash tests are expected to crash that we should fix 1479 * $crash tests are expected to crash that we should fix
1483 * $timeout tests are allowed to timeout 1480 * $timeout tests are allowed to timeout
1484 """; 1481 """;
1485 print(report); 1482 print(report);
1486 } 1483 }
1487 } 1484 }
OLDNEW
« tools/testing/dart/test_runner.dart ('K') | « tools/testing/dart/test_runner.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698