diff options
Diffstat (limited to 'ninja_test.cc')
-rw-r--r-- | ninja_test.cc | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/ninja_test.cc b/ninja_test.cc index cba3407..a00cfd9 100644 --- a/ninja_test.cc +++ b/ninja_test.cc @@ -190,7 +190,13 @@ struct BuildTest : public StateTestWithBuiltinRules, }; void BuildTest::Dirty(const string& path) { - GetNode(path)->MarkDirty(); + Node* node = GetNode(path); + node->MarkDirty(); + + // If it's an input file, mark that we've already stat()ed it and + // it's missing. + if (!node->in_edge_) + node->file_->mtime_ = 0; } void BuildTest::Touch(const string& path) { |