| 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 1576 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1587 return; | 1587 return; |
| 1588 } | 1588 } |
| 1589 if (test.usesWebDriver && _needsSelenium && !_isSeleniumAvailable || (test | 1589 if (test.usesWebDriver && _needsSelenium && !_isSeleniumAvailable || (test |
| 1590 is BrowserTestCase && test.waitingForOtherTest)) { | 1590 is BrowserTestCase && test.waitingForOtherTest)) { |
| 1591 // The test is not yet ready to run. Put the test back in | 1591 // The test is not yet ready to run. Put the test back in |
| 1592 // the queue. Avoid spin-polling by using a timeout. | 1592 // the queue. Avoid spin-polling by using a timeout. |
| 1593 _tests.add(test); | 1593 _tests.add(test); |
| 1594 new Timer(100, (_) => _tryRunTest()); // Don't lose a process. | 1594 new Timer(100, (_) => _tryRunTest()); // Don't lose a process. |
| 1595 return; | 1595 return; |
| 1596 } | 1596 } |
| 1597 if (_verbose) { | 1597 // Before running any commands, we print out all commands if '--verbose' |
| 1598 // was specified. |
| 1599 if (_verbose && test.commandOutputs.length == 0) { |
| 1598 int i = 1; | 1600 int i = 1; |
| 1599 if (test is BrowserTestCase) { | 1601 if (test is BrowserTestCase) { |
| 1600 // Additional command for rerunning the steps locally after the fact. | 1602 // Additional command for rerunning the steps locally after the fact. |
| 1601 print('$i. ${TestUtils.dartTestExecutable.toNativePath()} ' | 1603 print('$i. ${TestUtils.dartTestExecutable.toNativePath()} ' |
| 1602 '${TestUtils.dartDir().toNativePath()}/tools/testing/dart/' | 1604 '${TestUtils.dartDir().toNativePath()}/tools/testing/dart/' |
| 1603 'http_server.dart -m ${test.configuration["mode"]} ' | 1605 'http_server.dart -m ${test.configuration["mode"]} ' |
| 1604 '-a ${test.configuration["arch"]} ' | 1606 '-a ${test.configuration["arch"]} ' |
| 1605 '-p ${http_server.TestingServerRunner.serverList[0].port} ' | 1607 '-p ${http_server.TestingServerRunner.serverList[0].port} ' |
| 1606 '-c ${http_server.TestingServerRunner.serverList[1].port} ' | 1608 '-c ${http_server.TestingServerRunner.serverList[1].port} ' |
| 1607 '--package-root=' | 1609 '--package-root=' |
| (...skipping 143 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1751 completer.complete(testCase); | 1753 completer.complete(testCase); |
| 1752 } | 1754 } |
| 1753 }); | 1755 }); |
| 1754 } | 1756 } |
| 1755 runCommand(); | 1757 runCommand(); |
| 1756 | 1758 |
| 1757 return completer.future; | 1759 return completer.future; |
| 1758 } | 1760 } |
| 1759 } | 1761 } |
| 1760 | 1762 |
| OLD | NEW |