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
diff --git a/libartbase/base/common_art_test.cc b/libartbase/base/common_art_test.cc
index 5f3574d..9c35dd4 100644
--- a/libartbase/base/common_art_test.cc
+++ b/libartbase/base/common_art_test.cc
@@ -462,7 +462,8 @@
std::string prefix = GetAndroidBuildTop();
for (std::string& location : result) {
CHECK_GT(location.size(), prefix.size());
- CHECK_EQ(location.compare(0u, prefix.size(), prefix), 0);
+ CHECK_EQ(location.compare(0u, prefix.size(), prefix), 0)
+ << " prefix=" << prefix << " location=" << location;
location.erase(0u, prefix.size());
}
}