diff options
author | Nicolas Despres <nicolas.despres@gmail.com> | 2012-04-19 13:13:50 (GMT) |
---|---|---|
committer | Nicolas Despres <nicolas.despres@gmail.com> | 2012-04-24 09:14:28 (GMT) |
commit | 34ff2d9cf25cd6a2a9adb63918c3383ad4047db8 (patch) | |
tree | a6738b01c407ab09aedf07b5ddb91d0917d89bdd | |
parent | 16cab01cccf0b3ccadb150cd54f760929b3cc07e (diff) | |
download | Ninja-34ff2d9cf25cd6a2a9adb63918c3383ad4047db8.zip Ninja-34ff2d9cf25cd6a2a9adb63918c3383ad4047db8.tar.gz Ninja-34ff2d9cf25cd6a2a9adb63918c3383ad4047db8.tar.bz2 |
Remove trailing white spaces.
-rw-r--r-- | src/build.cc | 12 | ||||
-rw-r--r-- | src/build_test.cc | 14 |
2 files changed, 13 insertions, 13 deletions
diff --git a/src/build.cc b/src/build.cc index a2e4f64..6063cec 100644 --- a/src/build.cc +++ b/src/build.cc @@ -387,7 +387,7 @@ void Plan::CleanNode(BuildLog* build_log, Node* node) { if ((*ni)->mtime() > most_recent_input) most_recent_input = (*ni)->mtime(); string command = (*ei)->EvaluateCommand(true); - + // Now, recompute the dirty state of each output. bool all_outputs_clean = true; for (vector<Node*>::iterator ni = (*ei)->outputs_.begin(); @@ -461,7 +461,7 @@ bool RealCommandRunner::StartCommand(Edge* edge) { if (!subproc) return false; subproc_to_edge_.insert(make_pair(subproc, edge)); - + return true; } @@ -656,7 +656,7 @@ bool Builder::Build(string* err) { *err = "subcommand failed"; } else if (failures_allowed < config_.failures_allowed) *err = "cannot make progress due to previous errors"; - else + else *err = "stuck [this is a bug]"; return false; @@ -679,11 +679,11 @@ bool Builder::StartEdge(Edge* edge, string* err) { if (!disk_interface_->MakeDirs((*i)->path())) return false; } - + // Create response file, if needed // XXX: this may also block; do we care? if (edge->HasRspFile()) { - if (!disk_interface_->WriteFile(edge->GetRspFile(), edge->GetRspFileContent())) + if (!disk_interface_->WriteFile(edge->GetRspFile(), edge->GetRspFileContent())) return false; } @@ -744,7 +744,7 @@ void Builder::FinishEdge(Edge* edge, bool success, const string& output) { } // delete the response file on success (if exists) - if (edge->HasRspFile()) + if (edge->HasRspFile()) disk_interface_->RemoveFile(edge->GetRspFile()); plan_.EdgeFinished(edge); diff --git a/src/build_test.cc b/src/build_test.cc index c015bc9..467a908 100644 --- a/src/build_test.cc +++ b/src/build_test.cc @@ -202,8 +202,8 @@ struct BuildTest : public StateTestWithBuiltinRules, virtual bool CanRunMore(); virtual bool StartCommand(Edge* edge); virtual Edge* WaitForCommand(ExitStatus* status, string* output); - virtual vector<Edge*> GetActiveEdges(); - virtual void Abort(); + virtual vector<Edge*> GetActiveEdges(); + virtual void Abort(); BuildConfig MakeConfig() { BuildConfig config; @@ -853,7 +853,7 @@ TEST_F(BuildTest, RspFileSuccess) fs_.Create("out1", now_, ""); fs_.Create("out2", now_, ""); fs_.Create("out3", now_, ""); - + now_++; fs_.Create("in", now_, ""); @@ -869,11 +869,11 @@ TEST_F(BuildTest, RspFileSuccess) EXPECT_TRUE(builder_.Build(&err)); ASSERT_EQ(2u, commands_ran_.size()); // cat + cat_rsp - + // The RSP file was created ASSERT_EQ(files_created + 1, fs_.files_created_.size()); ASSERT_EQ(1u, fs_.files_created_.count("out2.rsp")); - + // The RSP file was removed ASSERT_EQ(files_removed + 1, fs_.files_removed_.size()); ASSERT_EQ(1u, fs_.files_removed_.count("out2.rsp")); @@ -917,7 +917,7 @@ TEST_F(BuildTest, RspFileFailure) { ASSERT_EQ("Another very long command", fs_.files_["out.rsp"].contents); } -// Test that contens of the RSP file behaves like a regular part of +// Test that contens of the RSP file behaves like a regular part of // command line, i.e. triggers a rebuild if changed TEST_F(BuildWithLogTest, RspFileCmdLineChange) { ASSERT_NO_FATAL_FAILURE(AssertParse(&state_, @@ -948,7 +948,7 @@ TEST_F(BuildWithLogTest, RspFileCmdLineChange) { EXPECT_EQ("", err); ASSERT_TRUE(builder_.AlreadyUpToDate()); - // 3. Alter the entry in the logfile + // 3. Alter the entry in the logfile // (to simulate a change in the command line between 2 builds) BuildLog::LogEntry * log_entry = build_log_.LookupByOutput("out"); ASSERT_TRUE(NULL != log_entry); |