diff options
author | 2015-01-14 19:53:31 -0800 | |
---|---|---|
committer | 2015-01-15 07:51:55 -0800 | |
commit | 369810a98e6394b6dd162f5349e38a1f597b3bc7 (patch) | |
tree | ec703b9fdfe57f039f833208f879d8c95b813137 /runtime/common_runtime_test.cc | |
parent | 1c1d40ab7fd856eac52e1a3be7ce60da3fc21fb5 (diff) |
ART: Allow scoped adjustments to log verbosity
Add ScopedLogSeverity to adjust the logging level.
Suppress warnings by default in gtests. Suppress errors in instances
where errors are expected.
Change-Id: If3ef865813e9505ab60bc90baed63ff11d90afbb
Diffstat (limited to 'runtime/common_runtime_test.cc')
-rw-r--r-- | runtime/common_runtime_test.cc | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/runtime/common_runtime_test.cc b/runtime/common_runtime_test.cc index e017699b04..d48ac9d6b1 100644 --- a/runtime/common_runtime_test.cc +++ b/runtime/common_runtime_test.cc @@ -20,6 +20,7 @@ #include <dlfcn.h> #include <fcntl.h> #include <ScopedLocalRef.h> +#include <stdlib.h> #include "../../external/icu/icu4c/source/common/unicode/uvernum.h" #include "base/macros.h" @@ -43,6 +44,11 @@ #include "well_known_classes.h" int main(int argc, char **argv) { + // Gtests can be very noisy. For example, an executable with multiple tests will trigger native + // bridge warnings. The following line reduces the minimum log severity to ERROR and suppresses + // everything else. In case you want to see all messages, comment out the line. + setenv("ANDROID_LOG_TAGS", "*:e", 1); + art::InitLogging(argv); LOG(::art::INFO) << "Running main() from common_runtime_test.cc..."; testing::InitGoogleTest(&argc, argv); |