diff options
author | Evan Martin <martine@danga.com> | 2011-05-17 17:38:23 (GMT) |
---|---|---|
committer | Evan Martin <martine@danga.com> | 2011-05-17 17:39:30 (GMT) |
commit | 4d19d997f98dfca40e112fd53216fccbda673ec8 (patch) | |
tree | 838ce3ace76817e1808124c3f9aa6f84bc9e2a39 /src/build_test.cc | |
parent | 798508875f5cc3c0e74ceccce26173baafac1049 (diff) | |
download | Ninja-4d19d997f98dfca40e112fd53216fccbda673ec8.zip Ninja-4d19d997f98dfca40e112fd53216fccbda673ec8.tar.gz Ninja-4d19d997f98dfca40e112fd53216fccbda673ec8.tar.bz2 |
simplify CommandRunner, simplifying users too
After much staring at this I think I found the more clear way to
express what it's doing.
Diffstat (limited to 'src/build_test.cc')
-rw-r--r-- | src/build_test.cc | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/src/build_test.cc b/src/build_test.cc index 9c4bd03..3d75180 100644 --- a/src/build_test.cc +++ b/src/build_test.cc @@ -210,8 +210,7 @@ struct BuildTest : public StateTestWithBuiltinRules, // CommandRunner impl virtual bool CanRunMore(); virtual bool StartCommand(Edge* edge); - virtual bool WaitForCommands(); - virtual Edge* NextFinishedCommand(bool* success, string* output); + virtual Edge* WaitForCommand(bool* success, string* output); BuildConfig MakeConfig() { BuildConfig config; @@ -264,11 +263,7 @@ bool BuildTest::StartCommand(Edge* edge) { return true; } -bool BuildTest::WaitForCommands() { - return last_command_ != NULL; -} - -Edge* BuildTest::NextFinishedCommand(bool* success, string* output) { +Edge* BuildTest::WaitForCommand(bool* success, string* output) { if (Edge* edge = last_command_) { if (edge->rule_->name_ == "fail") *success = false; |