summaryrefslogtreecommitdiff
path: root/runtime/common_runtime_test.cc
diff options
context:
space:
mode:
author David Srbecky <dsrbecky@google.com> 2020-05-11 23:30:29 +0000
committer David Srbecky <dsrbecky@google.com> 2020-05-15 18:06:16 +0100
commit883c1346b87537ed93f7d4fd88bbbb041c14d320 (patch)
treeefb8205d15d677d3e3fdf90f0ae09c4a2eba9a4f /runtime/common_runtime_test.cc
parent612809740453427ce4c9211062794dde3823ab6d (diff)
Revert^2 "Remove test_per_src from ART tests."
Second attempt at this, which fixes the asan failures. Remove test_per_src since it is not supported by atest. Replace it with gtest_isolate which is transparent to atest, and which still allows us to run tests in parallel. The size of test binaries halves (from 1GB to 0.5GB). Test run-time on host is unchanged. Test run-time on target is 4x faster (tested on walleye). Added a gtest_main.cc with the gtest isolated main function, and ART-specific initialization. Bug: 147819342 Test: m test-art-host-gtest Test: art/tools/run-gtests.sh Test: art/test/testrunner/run_build_test_target.py art-gtest-asan Change-Id: I515c911bb7d44285495802fc66cd732fc8e6d8df
Diffstat (limited to 'runtime/common_runtime_test.cc')
-rw-r--r--runtime/common_runtime_test.cc22
1 files changed, 0 insertions, 22 deletions
diff --git a/runtime/common_runtime_test.cc b/runtime/common_runtime_test.cc
index a846346edd..c4e83b9ad4 100644
--- a/runtime/common_runtime_test.cc
+++ b/runtime/common_runtime_test.cc
@@ -650,25 +650,3 @@ void CheckJniAbortCatcher::Hook(void* data, const std::string& reason) {
}
} // namespace art
-
-// Allow other test code to run global initialization/configuration before
-// gtest infra takes over.
-extern "C"
-__attribute__((visibility("default"))) __attribute__((weak))
-void ArtTestGlobalInit() {
-}
-
-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::Locks::Init();
- art::InitLogging(argv, art::Runtime::Abort);
- art::MemMap::Init();
- LOG(INFO) << "Running main() from common_runtime_test.cc...";
- testing::InitGoogleTest(&argc, argv);
- ArtTestGlobalInit();
- return RUN_ALL_TESTS();
-}