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

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

Issue 9969053: Lift restrictions for browser test to pass. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years, 8 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 | « no previous file | 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 executing tests. 6 * Classes and methods for executing tests.
7 * 7 *
8 * This module includes: 8 * This module includes:
9 * - Managing parallel execution of tests, including timeout checks. 9 * - Managing parallel execution of tests, including timeout checks.
10 * - Evaluating the output of each test as pass/fail/crash/timeout. 10 * - Evaluating the output of each test as pass/fail/crash/timeout.
(...skipping 296 matching lines...) Expand 10 before | Expand all | Expand 10 after
307 // If we get the X server error, or DRT crashes with a core dump, retry 307 // If we get the X server error, or DRT crashes with a core dump, retry
308 // the test. 308 // the test.
309 if (testCase.dynamic.numRetries > 0) { 309 if (testCase.dynamic.numRetries > 0) {
310 requestRetry = true; 310 requestRetry = true;
311 } 311 }
312 return true; 312 return true;
313 } 313 }
314 } 314 }
315 315
316 // Browser tests fail unless stdout contains 316 // Browser tests fail unless stdout contains
317 // 'Content-Type: text/plain\nPASS'. 317 // 'Content-Type: text/plain' followed by 'PASS'.
318 String previous_line = ''; 318 bool has_content_type = false;
319 for (String line in super.stdout) { 319 for (String line in super.stdout) {
320 if (line == 'PASS' && previous_line == 'Content-Type: text/plain') { 320 switch (line) {
321 return (exitCode != 0 && !hasCrashed); 321 case 'Content-Type: text/plain':
322 has_content_type = true;
323 break;
324
325 case 'PASS':
326 if (has_content_type) {
327 return (exitCode != 0 && !hasCrashed);
328 }
322 } 329 }
323 previous_line = line;
324 } 330 }
325 return true; 331 return true;
326 } 332 }
327 } 333 }
328 334
329 // The static analyzer does not actually execute code, so 335 // The static analyzer does not actually execute code, so
330 // the criteria for success now depend on the text sent 336 // the criteria for success now depend on the text sent
331 // to stderr. 337 // to stderr.
332 class AnalysisTestOutputImpl extends TestOutputImpl { 338 class AnalysisTestOutputImpl extends TestOutputImpl {
333 // An error line has 8 fields that look like: 339 // An error line has 8 fields that look like:
(...skipping 800 matching lines...) Expand 10 before | Expand all | Expand 10 after
1134 // the developer doesn't waste his or her time trying to fix a bunch of 1140 // the developer doesn't waste his or her time trying to fix a bunch of
1135 // tests that appear to be broken but were actually just flakes that 1141 // tests that appear to be broken but were actually just flakes that
1136 // didn't get retried because there had already been one failure. 1142 // didn't get retried because there had already been one failure.
1137 bool allowRetry = _MAX_FAILED_NO_RETRY > _progress.numFailedTests; 1143 bool allowRetry = _MAX_FAILED_NO_RETRY > _progress.numFailedTests;
1138 new RunningProcess(test, allowRetry, this).start(); 1144 new RunningProcess(test, allowRetry, this).start();
1139 } 1145 }
1140 _numProcesses++; 1146 _numProcesses++;
1141 } 1147 }
1142 } 1148 }
1143 } 1149 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698