summaryrefslogtreecommitdiffstats
path: root/src/build_test.cc
diff options
context:
space:
mode:
authorNico Weber <nicolasweber@gmx.de>2014-01-02 04:46:18 (GMT)
committerNico Weber <nicolasweber@gmx.de>2014-01-02 04:46:18 (GMT)
commit4ecc34493fdebeea25f7ddf4392282b8adf39f05 (patch)
tree9229244cca663beb8028f22d43b0a1b6b863b582 /src/build_test.cc
parentb2e6fcf7031cfaf995c65820d14d4aa390daf9fb (diff)
downloadNinja-4ecc34493fdebeea25f7ddf4392282b8adf39f05.zip
Ninja-4ecc34493fdebeea25f7ddf4392282b8adf39f05.tar.gz
Ninja-4ecc34493fdebeea25f7ddf4392282b8adf39f05.tar.bz2
Make tests compile (one fails atm).
Diffstat (limited to 'src/build_test.cc')
-rw-r--r--src/build_test.cc6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/build_test.cc b/src/build_test.cc
index e206cd8..19625c6 100644
--- a/src/build_test.cc
+++ b/src/build_test.cc
@@ -412,7 +412,7 @@ struct FakeCommandRunner : public CommandRunner {
VirtualFileSystem* fs_;
};
-struct BuildTest : public StateTestWithBuiltinRules {
+struct BuildTest : public StateTestWithBuiltinRules, public IsDead {
BuildTest() : config_(MakeConfig()), command_runner_(&fs_),
builder_(&state_, config_, NULL, NULL, &fs_),
status_(config_) {
@@ -435,6 +435,8 @@ struct BuildTest : public StateTestWithBuiltinRules {
builder_.command_runner_.release();
}
+ virtual bool IsPathDead(StringPiece s) { return false; }
+
/// 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.
@@ -469,7 +471,7 @@ void BuildTest::RebuildTarget(const string& target, const char* manifest,
BuildLog build_log, *pbuild_log = NULL;
if (log_path) {
ASSERT_TRUE(build_log.Load(log_path, &err));
- ASSERT_TRUE(build_log.OpenForWrite(log_path, &err));
+ ASSERT_TRUE(build_log.OpenForWrite(log_path, this, &err));
ASSERT_EQ("", err);
pbuild_log = &build_log;
}