From 3015d4b24271f7a12bff7833e5be26c182b5eaa3 Mon Sep 17 00:00:00 2001 From: Martin Kinkelin Date: Thu, 1 Jun 2023 20:38:48 +0200 Subject: [PATCH] [adapt tests] --- src/build_test.cc | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/build_test.cc b/src/build_test.cc index e8518b47b4..258dd27585 100644 --- a/src/build_test.cc +++ b/src/build_test.cc @@ -1637,6 +1637,8 @@ TEST_F(BuildWithLogTest, ImplicitGeneratedOutOfDate2) { EXPECT_FALSE(GetNode("out.imp")->dirty()); } +#define SYMMETRY 1 + TEST_F(BuildWithLogTest, NotInLogButOnDisk) { ASSERT_NO_FATAL_FAILURE(AssertParse(&state_, "rule cc\n" @@ -1652,6 +1654,9 @@ TEST_F(BuildWithLogTest, NotInLogButOnDisk) { // Because it's not in the log, it should not be up-to-date until // we build again. EXPECT_TRUE(builder_.AddTarget("out1", &err)); +#ifdef SYMMETRY + EXPECT_TRUE(builder_.AlreadyUpToDate()); +#else EXPECT_FALSE(builder_.AlreadyUpToDate()); command_runner_.commands_ran_.clear(); @@ -1660,6 +1665,7 @@ TEST_F(BuildWithLogTest, NotInLogButOnDisk) { EXPECT_TRUE(builder_.AddTarget("out1", &err)); EXPECT_TRUE(builder_.Build(&err)); EXPECT_TRUE(builder_.AlreadyUpToDate()); +#endif } TEST_F(BuildWithLogTest, RebuildAfterFailure) { @@ -1701,10 +1707,14 @@ TEST_F(BuildWithLogTest, RebuildAfterFailure) { // Run again, should rerun even though the output file is up to date on disk EXPECT_TRUE(builder_.AddTarget("out1", &err)); +#ifdef SYMMETRY + EXPECT_TRUE(builder_.AlreadyUpToDate()); +#else EXPECT_FALSE(builder_.AlreadyUpToDate()); EXPECT_TRUE(builder_.Build(&err)); EXPECT_EQ(1u, command_runner_.commands_ran_.size()); EXPECT_EQ("", err); +#endif } TEST_F(BuildWithLogTest, RebuildWithNoInputs) {