[test] Reset timer flag after test is done
authorArthur Eubanks <aeubanks@google.com>
Thu, 13 Oct 2022 20:31:22 +0000 (13:31 -0700)
committerArthur Eubanks <aeubanks@google.com>
Thu, 13 Oct 2022 20:31:22 +0000 (13:31 -0700)
Fixes some test failures after D135219 on internal bots.

llvm/unittests/IR/TimePassesTest.cpp

index e3d2c72..33f8e00 100644 (file)
@@ -110,6 +110,9 @@ TEST(TimePassesTest, LegacyCustomOut) {
   EXPECT_TRUE(TimePassesStr.str().contains("report"));
   EXPECT_FALSE(TimePassesStr.str().contains("Pass1"));
   EXPECT_TRUE(TimePassesStr.str().contains("Pass2"));
+
+  // Reset flag to not affect other tests.
+  TimePassesIsEnabled = false;
 }
 
 class MyPass1 : public PassInfoMixin<MyPass1> {};