summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Przemyslaw Szczepaniak <pszczepaniak@google.com> 2016-07-25 17:31:06 +0100
committer Przemyslaw Szczepaniak <pszczepaniak@google.com> 2016-08-01 09:32:56 +0000
commita794c26a0909f5d882f236f12d7f5fd30a336f35 (patch)
tree664866998697ba023710234b952e987da6e99f8f
parentbffecdbb50c42c775219dfbf32132fe6a9067762 (diff)
Fix art::ArchTest::FinalizeSetup not being called.
CommonRuntimeTestImpl::SetUp() is calling FinalizeSetup. Since CommonRuntimeTestImpl::FinalizeSetup is not virtual (it's virtual one step higher in class hierarchy in CommonRuntimeTestBase), overridden version in ArchTest was never used. This is causing ArchTest to fail with openjdk8u60 version of java.lang.reflect (it's calling Class#getDeclaredField in clinit, which fails on 32 bit version because of different pointer sizes [arch_test forces 64-bit ISA]) Bug: 28666126 Test: make -j 32 test-art-host-gtest Change-Id: Ief370f5b18ef787575ac0f88ecbe17ebbf037542
-rw-r--r--runtime/common_runtime_test.h18
1 files changed, 7 insertions, 11 deletions
diff --git a/runtime/common_runtime_test.h b/runtime/common_runtime_test.h
index 8f7d18b67a..f445e52d20 100644
--- a/runtime/common_runtime_test.h
+++ b/runtime/common_runtime_test.h
@@ -141,11 +141,13 @@ class CommonRuntimeTestImpl {
std::unique_ptr<CompilerCallbacks> callbacks_;
- void SetUp();
+ virtual void SetUp();
- void TearDown();
+ virtual void TearDown();
- void FinalizeSetup();
+ // Called to finish up runtime creation and filling test fields. By default runs root
+ // initializers, initialize well-known classes, and creates the heap thread pool.
+ virtual void FinalizeSetup();
private:
static std::string GetCoreFileLocation(const char* suffix);
@@ -160,19 +162,13 @@ class CommonRuntimeTestBase : public TestType, public CommonRuntimeTestImpl {
virtual ~CommonRuntimeTestBase() {}
protected:
- virtual void SetUp() {
+ virtual void SetUp() OVERRIDE {
CommonRuntimeTestImpl::SetUp();
}
- virtual void TearDown() {
+ virtual void TearDown() OVERRIDE {
CommonRuntimeTestImpl::TearDown();
}
-
- // Called to finish up runtime creation and filling test fields. By default runs root
- // initializers, initialize well-known classes, and creates the heap thread pool.
- virtual void FinalizeSetup() {
- CommonRuntimeTestImpl::FinalizeSetup();
- }
};
using CommonRuntimeTest = CommonRuntimeTestBase<testing::Test>;