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

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 || _rendereCrashed;
kustermann 2013/10/10 08:55:22 If you commit this change as it is now, it will li
ricow1 2013/10/10 09:26:50 They are red - very red. There are no tests outsi
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 _rendereCrashed {
kustermann 2013/10/10 08:55:22 _rendereCrashed => _rendererCrashed
ricow1 2013/10/10 09:26:50 Done.
860 var stdoutLines = decodeUtf8(super.stdout).split("\n");
kustermann 2013/10/10 08:55:22 Is this really in stdout (and not in stderr)?
ricow1 2013/10/10 09:26:50 It is in both
861 for (String line in stdoutLines) {
862 if (line.startsWith('#CRASHED - rendere')) return true;
863 }
kustermann 2013/10/10 08:55:22 I think it would be faster and equally good, to ju
ricow1 2013/10/10 09:26:50 Done.
864 return false;
865 }
866
855 bool get _failedBecauseOfUnexpectedDRTOutput { 867 bool get _failedBecauseOfUnexpectedDRTOutput {
856 /* 868 /*
857 * The output of content shell is different for pixel tests than for 869 * The output of content shell is different for pixel tests than for
858 * layout tests. 870 * layout tests.
859 * 871 *
860 * On a pixel test, the DRT output has the following format 872 * On a pixel test, the DRT output has the following format
861 * ...... 873 * ......
862 * ...... 874 * ......
863 * Content-Length: ...\n 875 * Content-Length: ...\n
864 * <*png data> 876 * <*png data>
(...skipping 1502 matching lines...) Expand 10 before | Expand all | Expand 10 after
2367 } 2379 }
2368 } 2380 }
2369 2381
2370 void eventAllTestsDone() { 2382 void eventAllTestsDone() {
2371 for (var listener in _eventListener) { 2383 for (var listener in _eventListener) {
2372 listener.allDone(); 2384 listener.allDone();
2373 } 2385 }
2374 _allDone(); 2386 _allDone();
2375 } 2387 }
2376 } 2388 }
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