Suppress logging when creating Runtime for gtests.
Test: m test-art-host-gtest
Change-Id: I5e8a206560131b429298b56699b9111a2a2992d0
diff --git a/runtime/common_runtime_test.cc b/runtime/common_runtime_test.cc
index 0e8a962..131d0d8 100644
--- a/runtime/common_runtime_test.cc
+++ b/runtime/common_runtime_test.cc
@@ -121,9 +121,12 @@
}
PreRuntimeCreate();
- if (!Runtime::Create(options, false)) {
- LOG(FATAL) << "Failed to create runtime";
- UNREACHABLE();
+ {
+ ScopedLogSeverity sls(LogSeverity::WARNING);
+ if (!Runtime::Create(options, false)) {
+ LOG(FATAL) << "Failed to create runtime";
+ UNREACHABLE();
+ }
}
PostRuntimeCreate();
runtime_.reset(Runtime::Current());