Ninja
|
Fake implementation of CommandRunner, useful for tests. More...
Public Member Functions | |
virtual void | Abort () |
virtual bool | CanRunMore () |
FakeCommandRunner (VirtualFileSystem *fs) | |
virtual vector< Edge * > | GetActiveEdges () |
virtual bool | StartCommand (Edge *edge) |
virtual bool | WaitForCommand (Result *result) |
Wait for a command to complete, or return false if interrupted. | |
Public Attributes | |
vector< string > | commands_ran_ |
VirtualFileSystem * | fs_ |
Edge * | last_command_ |
Fake implementation of CommandRunner, useful for tests.
Definition at line 399 of file build_test.cc.
FakeCommandRunner::FakeCommandRunner | ( | VirtualFileSystem * | fs | ) | [inline, explicit] |
Definition at line 400 of file build_test.cc.
void FakeCommandRunner::Abort | ( | ) | [virtual] |
Reimplemented from CommandRunner.
Definition at line 513 of file build_test.cc.
References last_command_.
bool FakeCommandRunner::CanRunMore | ( | ) | [virtual] |
vector< Edge * > FakeCommandRunner::GetActiveEdges | ( | ) | [virtual] |
Reimplemented from CommandRunner.
Definition at line 506 of file build_test.cc.
References last_command_.
bool FakeCommandRunner::StartCommand | ( | Edge * | edge | ) | [virtual] |
Implements CommandRunner.
Definition at line 460 of file build_test.cc.
References commands_ran_, VirtualFileSystem::Create(), Edge::EvaluateCommand(), fs_, last_command_, Rule::name(), Edge::outputs_, and Edge::rule().
bool FakeCommandRunner::WaitForCommand | ( | Result * | result | ) | [virtual] |
Wait for a command to complete, or return false if interrupted.
Implements CommandRunner.
Definition at line 485 of file build_test.cc.
References CommandRunner::Result::edge, ExitFailure, ExitInterrupted, ExitSuccess, last_command_, Rule::name(), Edge::rule(), and CommandRunner::Result::status.
vector<string> FakeCommandRunner::commands_ran_ |
Definition at line 410 of file build_test.cc.
Referenced by StartCommand().
Definition at line 412 of file build_test.cc.
Referenced by StartCommand().
Definition at line 411 of file build_test.cc.
Referenced by Abort(), CanRunMore(), GetActiveEdges(), StartCommand(), and WaitForCommand().