Make sure no stale test file exists before running build log tests.
authorNico Weber <nicolasweber@gmx.de>
Sat, 1 Sep 2012 05:56:11 +0000 (22:56 -0700)
committerNico Weber <nicolasweber@gmx.de>
Sat, 1 Sep 2012 05:56:11 +0000 (22:56 -0700)
src/build_log_test.cc

index c465abc..1d42273 100644 (file)
@@ -30,6 +30,8 @@ const char kTestFilename[] = "BuildLogTest-tempfile";
 
 struct BuildLogTest : public StateTestWithBuiltinRules {
   virtual void SetUp() {
+    // In case a crashing test left a stale file behind.
+    unlink(kTestFilename);
   }
   virtual void TearDown() {
     unlink(kTestFilename);