Ninja
Public Member Functions | Public Attributes | List of all members
BuildWithLogTest Struct Reference
Inheritance diagram for BuildWithLogTest:
Inheritance graph
[legend]

Public Member Functions

void AddCatRule (State *state)
 Add a "cat" rule to state. More...
 
 BuildWithLogTest ()
 
void Dirty (const string &path)
 
NodeGetNode (const string &path)
 Short way to get a Node by its path from state_. More...
 
virtual bool IsPathDead (StringPiece s) const
 Return if a given output no longer part of the build manifest. More...
 
BuildConfig MakeConfig ()
 
void RebuildTarget (const string &target, const char *manifest, const char *log_path=NULL, const char *deps_path=NULL)
 Rebuild target in the 'working tree' (fs_). More...
 
virtual void SetUp ()
 

Public Attributes

BuildLog build_log_
 
Builder builder_
 
FakeCommandRunner command_runner_
 
BuildConfig config_
 
VirtualFileSystem fs_
 
State state_
 
BuildStatus status_
 

Detailed Description

Definition at line 1030 of file build_test.cc.

Constructor & Destructor Documentation

BuildWithLogTest::BuildWithLogTest ( )
inline

Definition at line 1031 of file build_test.cc.

Member Function Documentation

void StateTestWithBuiltinRules::AddCatRule ( State state)
inherited

Add a "cat" rule to state.

Used by some tests; it's otherwise done by the ctor to state_.

Definition at line 80 of file test.cc.

References AssertParse().

Referenced by BuildTest::RebuildTarget(), StateTestWithBuiltinRules::StateTestWithBuiltinRules(), and TEST_F().

void BuildTest::Dirty ( const string &  path)
inherited
Node * StateTestWithBuiltinRules::GetNode ( const string &  path)
inherited

Short way to get a Node by its path from state_.

Definition at line 86 of file test.cc.

References State::GetNode(), and StateTestWithBuiltinRules::state_.

Referenced by BuildTest::Dirty(), TEST_F(), and PlanTest::TestPoolWithDepthOne().

virtual bool BuildTest::IsPathDead ( StringPiece  s) const
inlinevirtualinherited

Return if a given output no longer part of the build manifest.

This is only called during recompaction and doesn't have to be fast.

Implements BuildLogUser.

Definition at line 453 of file build_test.cc.

BuildConfig BuildTest::MakeConfig ( )
inlineinherited

Definition at line 465 of file build_test.cc.

References BuildConfig::QUIET, and BuildConfig::verbosity.

void BuildTest::RebuildTarget ( const string &  target,
const char *  manifest,
const char *  log_path = NULL,
const char *  deps_path = NULL 
)
inherited

Rebuild target in the 'working tree' (fs_).

State of command_runner_ and logs contents (if specified) ARE MODIFIED. Handy to check for NOOP builds, and higher-level rebuild tests.

Definition at line 479 of file build_test.cc.

References StateTestWithBuiltinRules::AddCatRule(), Builder::AddTarget(), Builder::AlreadyUpToDate(), AssertParse(), Builder::Build(), Builder::command_runner_, BuildLog::Load(), DepsLog::Load(), BuildLog::OpenForWrite(), and DepsLog::OpenForWrite().

virtual void BuildTest::SetUp ( )
inlinevirtualinherited

Reimplemented in BuildWithDepsLogTest.

Definition at line 436 of file build_test.cc.

References AssertParse(), and StateTestWithBuiltinRules::state_.

Referenced by BuildWithDepsLogTest::SetUp().

Member Data Documentation

BuildLog BuildWithLogTest::build_log_

Definition at line 1035 of file build_test.cc.

Builder BuildTest::builder_
inherited

Definition at line 474 of file build_test.cc.

FakeCommandRunner BuildTest::command_runner_
inherited

Definition at line 472 of file build_test.cc.

BuildConfig BuildTest::config_
inherited

Definition at line 471 of file build_test.cc.

VirtualFileSystem BuildTest::fs_
inherited

Definition at line 473 of file build_test.cc.

State StateTestWithBuiltinRules::state_
inherited
BuildStatus BuildTest::status_
inherited

Definition at line 476 of file build_test.cc.


The documentation for this struct was generated from the following file: