Chromium Code Reviews| Index: tools/testing/dart/test_runner.dart |
| diff --git a/tools/testing/dart/test_runner.dart b/tools/testing/dart/test_runner.dart |
| index a3d59b9b560e4b082dacf3237ef39a2d5ce17c8e..07686d3450bd933a99afb62ce3d1ad37b4533709 100644 |
| --- a/tools/testing/dart/test_runner.dart |
| +++ b/tools/testing/dart/test_runner.dart |
| @@ -580,6 +580,10 @@ class CommandBuilder { |
| CommandBuilder._(); |
| + void clearCommandCache() { |
| + _cachedCommands.clear(); |
| + } |
|
kustermann
2014/04/15 12:07:00
Maybe add a boolean '_sealed' and throw if _sealed
Bill Hesse
2014/04/15 12:37:30
Done.
|
| + |
| ContentShellCommand getContentShellCommand(String executable, |
| String htmlFile, |
| List<String> options, |
| @@ -824,7 +828,7 @@ class UnittestSuiteMessagesMixin { |
| return testOutput.contains("unittest-suite-wait-for-done"); |
| } |
| - bool _isAsyncTestSuccessfull(String testOutput) { |
| + bool _isAsyncTestSuccessful(String testOutput) { |
| return testOutput.contains("unittest-suite-success"); |
| } |
| @@ -835,7 +839,7 @@ class UnittestSuiteMessagesMixin { |
| // TODO: maybe we should introduce a AsyncIncomplete marker or so |
| if (outcome == Expectation.PASS) { |
| if (_isAsyncTest(testOutput) && |
| - !_isAsyncTestSuccessfull(testOutput)) { |
| + !_isAsyncTestSuccessful(testOutput)) { |
| return Expectation.FAIL; |
| } |
| } |
| @@ -2278,7 +2282,7 @@ class CommandEnqueuer { |
| * [CommandQueue] will listen for nodes entering the NodeState.ENQUEUING state, |
| * queue them up and run them. While nodes are processed they will be in the |
| * NodeState.PROCESSING state. After running a command, the node will change |
| - * to a state of NodeState.Successfull or NodeState.Failed. |
| + * to a state of NodeState.Successful or NodeState.Failed. |
| * |
| * It provides a synchronous stream [completedCommands] which provides the |
| * [CommandOutputs] for the finished commands. |
| @@ -2322,7 +2326,7 @@ class CommandQueue { |
| } |
| }); |
| // We're finished if the graph is sealed and all nodes are in a finished |
| - // state (Successfull, Failed or UnableToRun). |
| + // state (Successful, Failed or UnableToRun). |
| // So we're calling '_checkDone()' to check whether that condition is met |
| // and we can cleanup. |
| graph.events.listen((dgraph.GraphEvent event) { |
| @@ -2651,7 +2655,7 @@ bool shouldRetryCommand(CommandOutput output) { |
| /* |
| * [TestCaseCompleter] will listen for |
| - * NodeState.Processing -> NodeState.{Successfull,Failed} state changes and |
| + * NodeState.Processing -> NodeState.{Successful,Failed} state changes and |
| * will complete a TestCase if it is finished. |
| * |
| * It provides a stream [finishedTestCases], which will stream all TestCases |
| @@ -2684,7 +2688,7 @@ class TestCaseCompleter { |
| _checkDone(); |
| }); |
| - // Listen for NodeState.Processing -> NodeState.{Successfull,Failed} |
| + // Listen for NodeState.Processing -> NodeState.{Successful,Failed} |
| // changes. |
| eventCondition((event) => event is dgraph.StateChangedEvent) |
| .listen((dgraph.StateChangedEvent event) { |
| @@ -2755,8 +2759,6 @@ class TestCaseCompleter { |
| class ProcessQueue { |
| Map _globalConfiguration; |
| - bool _allTestsWereEnqueued = false; |
| - |
| bool _listTests; |
| Function _allDone; |
| final dgraph.Graph _graph = new dgraph.Graph(); |
| @@ -2916,6 +2918,10 @@ class ProcessQueue { |
| testCaseEnqueuer.enqueueTestSuites(testSuites); |
| } |
| + void freeEnqueueingStructures() { |
| + CommandBuilder.instance.clearCommandCache(); |
| + } |
| + |
| void eventFinishedTestCase(TestCase testCase) { |
| for (var listener in _eventListener) { |
| listener.done(testCase); |
| @@ -2929,6 +2935,7 @@ class ProcessQueue { |
| } |
| void eventAllTestsKnown() { |
| + freeEnqueueingStructures(); |
| for (var listener in _eventListener) { |
| listener.allTestsKnown(); |
| } |