ART: Refactor CommonRuntimeTest::SetUp
Factor out finishing up the runtime. This code will execute the
interpreter to initialize important classes etc., which is not
necessary for testing RuntimeMethod sizes and trampoline entrypoints,
in fact it may violate pointer-size invariants.
Also add InstructionSet parsing tests to the ParsedOptions test.
Change-Id: I75cd00c6d358e1bc962c8f1845244f6400c1cd6c
diff --git a/runtime/entrypoints/quick/quick_trampoline_entrypoints_test.cc b/runtime/entrypoints/quick/quick_trampoline_entrypoints_test.cc
index 4e85913..01e22a4 100644
--- a/runtime/entrypoints/quick/quick_trampoline_entrypoints_test.cc
+++ b/runtime/entrypoints/quick/quick_trampoline_entrypoints_test.cc
@@ -31,6 +31,13 @@
options->push_back(std::make_pair("imageinstructionset", "x86_64"));
}
+ // Do not do any of the finalization. We don't want to run any code, we don't need the heap
+ // prepared, it actually will be a problem with setting the instruction set to x86_64 in
+ // SetUpRuntimeOptions.
+ void FinalizeSetup() OVERRIDE {
+ ASSERT_EQ(InstructionSet::kX86_64, Runtime::Current()->GetInstructionSet());
+ }
+
static ArtMethod* CreateCalleeSaveMethod(InstructionSet isa, Runtime::CalleeSaveType type)
NO_THREAD_SAFETY_ANALYSIS {
Runtime* r = Runtime::Current();