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

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

Issue 9139012: Fix flaky error on buildbot due to virtual X server xvfb. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years, 11 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) 2011, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2011, 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 #library("test_runner"); 5 #library("test_runner");
6 6
7 #import("status_file_parser.dart"); 7 #import("status_file_parser.dart");
8 #import("test_progress.dart"); 8 #import("test_progress.dart");
9 #import("test_suite.dart"); 9 #import("test_suite.dart");
10 10
(...skipping 143 matching lines...) Expand 10 before | Expand all | Expand 10 after
154 if (exitCode != 0 && !hasCrashed) return true; 154 if (exitCode != 0 && !hasCrashed) return true;
155 155
156 // Browser tests fail unless stdout contains 156 // Browser tests fail unless stdout contains
157 // 'Content-Type: text/plain\nPASS'. 157 // 'Content-Type: text/plain\nPASS'.
158 if (testCase is !BrowserTestCase) return false; 158 if (testCase is !BrowserTestCase) return false;
159 String previous_line = ''; 159 String previous_line = '';
160 for (String line in stdout) { 160 for (String line in stdout) {
161 if (line == 'PASS' && previous_line == 'Content-Type: text/plain') { 161 if (line == 'PASS' && previous_line == 'Content-Type: text/plain') {
162 return false; 162 return false;
163 } 163 }
164 // If the browser test failed, it may have been because DumpRenderTree
165 // and the virtual framebuffer X server didn't hook up. So return false
166 // if we get the X server error. Issue dart:1135 is filed.
167 if (line.contains('Gtk-WARNING **: cannot open display: :99')) {
168 return false;
169 }
164 previous_line = line; 170 previous_line = line;
165 } 171 }
166 return true; 172 return true;
167 } 173 }
168 174
169 // Reverse result of a negative test. 175 // Reverse result of a negative test.
170 bool get hasFailed() => (testCase.isNegative ? !didFail : didFail); 176 bool get hasFailed() => (testCase.isNegative ? !didFail : didFail);
171 } 177 }
172 178
173 179
(...skipping 320 matching lines...) Expand 10 before | Expand all | Expand 10 after
494 test.displayName != 'dartc/junit_tests') { 500 test.displayName != 'dartc/junit_tests') {
495 _ensureDartcBatchRunnersStarted(test.executablePath); 501 _ensureDartcBatchRunnersStarted(test.executablePath);
496 _getDartcBatchRunnerProcess().startTest(test); 502 _getDartcBatchRunnerProcess().startTest(test);
497 } else { 503 } else {
498 new RunningProcess(test).start(); 504 new RunningProcess(test).start();
499 } 505 }
500 _numProcesses++; 506 _numProcesses++;
501 } 507 }
502 } 508 }
503 } 509 }
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