Disable logging to string in unittest.
Logging to string is not thread safe and we are not using this feature,
so turn it off.
Bug: 72046357
Test: run unittest with tsan
Change-Id: I6f2dd53b115e9e6c53df237783dbe09aed6ae592
diff --git a/testrunner.cc b/testrunner.cc
index 635e120..81d4548 100644
--- a/testrunner.cc
+++ b/testrunner.cc
@@ -44,6 +44,8 @@
base::CommandLine::Init(argc, argv);
LOG(INFO) << "initializing gtest";
SetUpTests(&argc, argv, true);
+ // Logging to string is not thread safe.
+ brillo::LogToString(false);
LOG(INFO) << "running unit tests";
int test_result = RUN_ALL_TESTS();
LOG(INFO) << "unittest return value: " << test_result;