summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/build_test.cc9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/build_test.cc b/src/build_test.cc
index f39c417..526e5f9 100644
--- a/src/build_test.cc
+++ b/src/build_test.cc
@@ -317,8 +317,13 @@ TEST_F(BuildTest, TwoStep) {
EXPECT_TRUE(builder_.Build(&err));
EXPECT_EQ("", err);
ASSERT_EQ(3, commands_ran_.size());
- EXPECT_EQ("cat in1 > cat1", commands_ran_[0]);
- EXPECT_EQ("cat in1 in2 > cat2", commands_ran_[1]);
+ // Depending on how the pointers work out, we could've ran
+ // the first two commands in either order.
+ EXPECT_TRUE((commands_ran_[0] == "cat in1 > cat1" &&
+ commands_ran_[1] == "cat in1 in2 > cat2") ||
+ (commands_ran_[1] == "cat in1 > cat1" &&
+ commands_ran_[0] == "cat in1 in2 > cat2"));
+
EXPECT_EQ("cat cat1 cat2 > cat12", commands_ran_[2]);
// Modifying in2 requires rebuilding one intermediate file