Public Member Functions | Public Attributes | List of all members
BuildWithLogTest Struct Referenceabstract
Inheritance diagram for BuildWithLogTest:
Inheritance graph

Public Member Functions

void AddAssertionFailure ()
void AddCatRule (State *state)
 Add a "cat" rule to state. More...
int AssertionFailures () const
 BuildWithLogTest ()
bool Check (bool condition, const char *file, int line, const char *error)
void Dirty (const string &path)
bool Failed () const
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 Run ()=0
virtual void SetUp ()
virtual void TearDown ()

Public Attributes

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

Detailed Description

Definition at line 1059 of file

Constructor & Destructor Documentation

BuildWithLogTest::BuildWithLogTest ( )

Definition at line 1060 of file

References build_log_, BuildTest::builder_, and Builder::SetBuildLog().

Member Function Documentation

void testing::Test::AddAssertionFailure ( )

Definition at line 41 of file test.h.

References testing::Test::assertion_failures_.

void StateTestWithBuiltinRules::AddCatRule ( State state)

Add a "cat" rule to state.

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

Definition at line 85 of file

References AssertParse().

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

int testing::Test::AssertionFailures ( ) const

Definition at line 40 of file test.h.

References testing::Test::assertion_failures_.

bool testing::Test::Check ( bool  condition,
const char *  file,
int  line,
const char *  error 

Definition at line 115 of file

References testing::Test::failed_, and LinePrinter::PrintOnNewLine().

void BuildTest::Dirty ( const string &  path)
bool testing::Test::Failed ( ) const

Definition at line 39 of file test.h.

References testing::Test::failed_.

Referenced by main().

Node * StateTestWithBuiltinRules::GetNode ( const string &  path)

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

Definition at line 91 of file

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

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

virtual bool BuildTest::IsPathDead ( StringPiece  s) const

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 455 of file

BuildConfig BuildTest::MakeConfig ( )

Definition at line 467 of file

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 

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 481 of file

References StateTestWithBuiltinRules::AddCatRule(), Builder::AddTarget(), Builder::AlreadyUpToDate(), ASSERT_EQ, ASSERT_NO_FATAL_FAILURE, ASSERT_TRUE, AssertParse(), Builder::Build(), Builder::command_runner_, BuildTest::command_runner_, FakeCommandRunner::commands_ran_, BuildTest::config_, EXPECT_TRUE, BuildTest::fs_, BuildLog::Load(), DepsLog::Load(), BuildLog::OpenForWrite(), and DepsLog::OpenForWrite().

virtual void testing::Test::Run ( )
pure virtualinherited

Referenced by main().

virtual void BuildTest::SetUp ( )
virtual void testing::Test::TearDown ( )

Reimplemented in BuildWithDepsLogTest.

Definition at line 36 of file test.h.

Referenced by main().

Member Data Documentation

BuildLog BuildWithLogTest::build_log_

Definition at line 1064 of file

Referenced by BuildWithLogTest().

Builder BuildTest::builder_

Definition at line 476 of file

Referenced by BuildWithLogTest(), BuildTest::SetUp(), and BuildTest::~BuildTest().

FakeCommandRunner BuildTest::command_runner_

Definition at line 474 of file

Referenced by BuildTest::RebuildTarget(), and BuildTest::SetUp().

BuildConfig BuildTest::config_

Definition at line 473 of file

Referenced by BuildDryRun::BuildDryRun(), and BuildTest::RebuildTarget().

VirtualFileSystem BuildTest::fs_

Definition at line 475 of file

Referenced by BuildTest::RebuildTarget(), and BuildTest::SetUp().

State StateTestWithBuiltinRules::state_
BuildStatus BuildTest::status_

Definition at line 478 of file

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