| OLD | NEW |
| 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 1844 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1855 var runningProcess = new RunningProcess(testCase, command); | 1855 var runningProcess = new RunningProcess(testCase, command); |
| 1856 runningProcess.start().then((CommandOutput commandOutput) { | 1856 runningProcess.start().then((CommandOutput commandOutput) { |
| 1857 if (isLastCommand) { | 1857 if (isLastCommand) { |
| 1858 // NOTE: We need to call commandOutput.unexpectedOutput here. | 1858 // NOTE: We need to call commandOutput.unexpectedOutput here. |
| 1859 // Calling this getter may result in the side-effect, that | 1859 // Calling this getter may result in the side-effect, that |
| 1860 // commandOutput.requestRetry is set to true. | 1860 // commandOutput.requestRetry is set to true. |
| 1861 // (BrowserCommandOutputImpl._failedBecauseOfMissingXDisplay | 1861 // (BrowserCommandOutputImpl._failedBecauseOfMissingXDisplay |
| 1862 // does that for example) | 1862 // does that for example) |
| 1863 // TODO(ricow/kustermann): Issue 8206 | 1863 // TODO(ricow/kustermann): Issue 8206 |
| 1864 var unexpectedOutput = commandOutput.unexpectedOutput; | 1864 var unexpectedOutput = commandOutput.unexpectedOutput; |
| 1865 if (allowRetry && testCase.usesWebDriver | 1865 if (unexpectedOutput && allowRetry) { |
| 1866 && unexpectedOutput | 1866 if (testCase.usesWebDriver |
| 1867 && (testCase as BrowserTestCase).numRetries > 0) { | 1867 && (testCase as BrowserTestCase).numRetries > 0) { |
| 1868 // Selenium tests can be flaky. Try rerunning. | 1868 // Selenium tests can be flaky. Try rerunning. |
| 1869 commandOutput.requestRetry = true; | 1869 commandOutput.requestRetry = true; |
| 1870 } |
| 1871 // FIXME(kustermann): Remove this condition once we figured out why |
| 1872 // content_shell is sometimes not able to fetch resources from the |
| 1873 // HttpServer. |
| 1874 var configuration = testCase.configuration; |
| 1875 if (configuration['runtime'] == 'drt' && |
| 1876 configuration['system'] == 'windows' && |
| 1877 (testCase as BrowserTestCase).numRetries > 0) { |
| 1878 assert(TestUtils.isBrowserRuntime(configuration['runtime'])); |
| 1879 commandOutput.requestRetry = true; |
| 1880 } |
| 1870 } | 1881 } |
| 1871 } | 1882 } |
| 1872 if (commandOutput.requestRetry) { | 1883 if (commandOutput.requestRetry) { |
| 1873 commandOutput.requestRetry = false; | 1884 commandOutput.requestRetry = false; |
| 1874 (testCase as BrowserTestCase).numRetries--; | 1885 (testCase as BrowserTestCase).numRetries--; |
| 1875 DebugLogger.warning("Rerunning Test: ${testCase.displayName} " | 1886 DebugLogger.warning("Rerunning Test: ${testCase.displayName} " |
| 1876 "(${(testCase as BrowserTestCase).numRetries} " | 1887 "(${(testCase as BrowserTestCase).numRetries} " |
| 1877 "attempt(s) remains) [cmd:$command]"); | 1888 "attempt(s) remains) [cmd:$command]"); |
| 1878 runCommand(); | 1889 runCommand(); |
| 1879 } else { | 1890 } else { |
| (...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1913 } | 1924 } |
| 1914 } | 1925 } |
| 1915 | 1926 |
| 1916 void eventAllTestsDone() { | 1927 void eventAllTestsDone() { |
| 1917 for (var listener in _eventListener) { | 1928 for (var listener in _eventListener) { |
| 1918 listener.allDone(); | 1929 listener.allDone(); |
| 1919 } | 1930 } |
| 1920 } | 1931 } |
| 1921 } | 1932 } |
| 1922 | 1933 |
| OLD | NEW |