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

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

Issue 26793004: Add support for catching rendere crashes in drt (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 years, 2 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 799 matching lines...) Expand 10 before | Expand all | Expand 10 after
810 } 810 }
811 811
812 bool get successful => canRunDependendCommands; 812 bool get successful => canRunDependendCommands;
813 813
814 bool get canRunDependendCommands { 814 bool get canRunDependendCommands {
815 // We cannot rely on the exit code of content_shell as a method to determine 815 // We cannot rely on the exit code of content_shell as a method to determine
816 // if we were successful or not. 816 // if we were successful or not.
817 return super.canRunDependendCommands && !didFail(null); 817 return super.canRunDependendCommands && !didFail(null);
818 } 818 }
819 819
820 bool get hasCrashed {
821 return super.hasCrashed || _rendererCrashed;
822 }
823
820 Expectation _getOutcome() { 824 Expectation _getOutcome() {
821 if (_failedBecauseOfMissingXDisplay) { 825 if (_failedBecauseOfMissingXDisplay) {
822 return Expectation.FAIL; 826 return Expectation.FAIL;
823 } 827 }
824 828
825 if (command.expectedOutputFile != null) { 829 if (command.expectedOutputFile != null) {
826 // We are either doing a pixel test or a layout test with content shell 830 // We are either doing a pixel test or a layout test with content shell
827 if (_failedBecauseOfUnexpectedDRTOutput) { 831 if (_failedBecauseOfUnexpectedDRTOutput) {
828 return Expectation.FAIL; 832 return Expectation.FAIL;
829 } 833 }
(...skipping 15 matching lines...) Expand all
845 // TODO(kustermann,ricow): Issue: 7564 849 // TODO(kustermann,ricow): Issue: 7564
846 // This seems to happen quite frequently, we need to figure out why. 850 // This seems to happen quite frequently, we need to figure out why.
847 if (line.contains(MESSAGE_CANNOT_OPEN_DISPLAY) || 851 if (line.contains(MESSAGE_CANNOT_OPEN_DISPLAY) ||
848 line.contains(MESSAGE_FAILED_TO_RUN_COMMAND)) { 852 line.contains(MESSAGE_FAILED_TO_RUN_COMMAND)) {
849 return true; 853 return true;
850 } 854 }
851 } 855 }
852 return false; 856 return false;
853 } 857 }
854 858
859 bool get _rendererCrashed =>
860 decodeUtf8(super.stdout).contains("#CRASHED - rendere");
861
855 bool get _failedBecauseOfUnexpectedDRTOutput { 862 bool get _failedBecauseOfUnexpectedDRTOutput {
856 /* 863 /*
857 * The output of content shell is different for pixel tests than for 864 * The output of content shell is different for pixel tests than for
858 * layout tests. 865 * layout tests.
859 * 866 *
860 * On a pixel test, the DRT output has the following format 867 * On a pixel test, the DRT output has the following format
861 * ...... 868 * ......
862 * ...... 869 * ......
863 * Content-Length: ...\n 870 * Content-Length: ...\n
864 * <*png data> 871 * <*png data>
(...skipping 1502 matching lines...) Expand 10 before | Expand all | Expand 10 after
2367 } 2374 }
2368 } 2375 }
2369 2376
2370 void eventAllTestsDone() { 2377 void eventAllTestsDone() {
2371 for (var listener in _eventListener) { 2378 for (var listener in _eventListener) {
2372 listener.allDone(); 2379 listener.allDone();
2373 } 2380 }
2374 _allDone(); 2381 _allDone();
2375 } 2382 }
2376 } 2383 }
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