summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--compiler/linker/output_stream_test.cc4
-rw-r--r--dex2oat/utils/swap_space_test.cc5
-rw-r--r--disassembler/disassembler_arm64_test.cc5
-rw-r--r--runtime/arch/arch_test.cc18
-rw-r--r--runtime/barrier_test.cc4
-rw-r--r--runtime/base/message_queue_test.cc4
-rw-r--r--runtime/base/mutex_test.cc4
-rw-r--r--runtime/base/timing_logger_test.cc4
-rw-r--r--runtime/cha_test.cc5
-rw-r--r--runtime/class_loader_context_test.cc4
-rw-r--r--runtime/class_table_test.cc7
-rw-r--r--runtime/entrypoints/math_entrypoints_test.cc4
-rw-r--r--runtime/entrypoints_order_test.cc4
-rw-r--r--runtime/gc/accounting/card_table_test.cc4
-rw-r--r--runtime/gc/accounting/mod_union_table_test.cc1
-rw-r--r--runtime/gc/accounting/space_bitmap_test.cc4
-rw-r--r--runtime/gc/collector/immune_spaces_test.cc5
-rw-r--r--runtime/gc/heap_test.cc9
-rw-r--r--runtime/gc/heap_verification_test.cc4
-rw-r--r--runtime/gc/reference_queue_test.cc7
-rw-r--r--runtime/gc/space/space_test.h4
-rw-r--r--runtime/gc/system_weak_test.cc4
-rw-r--r--runtime/handle_scope_test.cc7
-rw-r--r--runtime/indirect_reference_table_test.cc7
-rw-r--r--runtime/instrumentation_test.cc4
-rw-r--r--runtime/intern_table_test.cc7
-rw-r--r--runtime/method_handles_test.cc7
-rw-r--r--runtime/mirror/object_test.cc4
-rw-r--r--runtime/mirror/var_handle_test.cc4
-rw-r--r--runtime/monitor_test.cc5
-rw-r--r--runtime/proxy_test.cc4
-rw-r--r--runtime/reference_table_test.cc7
-rw-r--r--runtime/vdex_file_test.cc5
-rw-r--r--runtime/verifier/method_verifier_test.cc4
-rw-r--r--runtime/verifier/reg_type_test.cc4
-rw-r--r--tools/dexanalyze/dexanalyze_test.cc4
36 files changed, 131 insertions, 56 deletions
diff --git a/compiler/linker/output_stream_test.cc b/compiler/linker/output_stream_test.cc
index f1af4cb8b7..31a8516f9e 100644
--- a/compiler/linker/output_stream_test.cc
+++ b/compiler/linker/output_stream_test.cc
@@ -16,9 +16,9 @@
#include <android-base/logging.h>
+#include "base/common_art_test.h"
#include "base/macros.h"
#include "base/unix_file/fd_file.h"
-#include "common_runtime_test.h"
#include "stream/buffered_output_stream.h"
#include "stream/file_output_stream.h"
#include "stream/vector_output_stream.h"
@@ -26,7 +26,7 @@
namespace art {
namespace linker {
-class OutputStreamTest : public CommonRuntimeTest {
+class OutputStreamTest : public CommonArtTest {
protected:
void CheckOffset(off_t expected) {
off_t actual = output_stream_->Seek(0, kSeekCurrent);
diff --git a/dex2oat/utils/swap_space_test.cc b/dex2oat/utils/swap_space_test.cc
index 1650080e66..eb79cfd13e 100644
--- a/dex2oat/utils/swap_space_test.cc
+++ b/dex2oat/utils/swap_space_test.cc
@@ -24,14 +24,13 @@
#include "gtest/gtest.h"
+#include "base/common_art_test.h"
#include "base/os.h"
#include "base/unix_file/fd_file.h"
-#include "common_runtime_test.h"
namespace art {
-class SwapSpaceTest : public CommonRuntimeTest {
-};
+class SwapSpaceTest : public CommonArtTest {};
static void SwapTest(bool use_file) {
ScratchFile scratch;
diff --git a/disassembler/disassembler_arm64_test.cc b/disassembler/disassembler_arm64_test.cc
index 8279ed8424..c1917cc52b 100644
--- a/disassembler/disassembler_arm64_test.cc
+++ b/disassembler/disassembler_arm64_test.cc
@@ -20,8 +20,9 @@
#include <sstream>
-#include "common_runtime_test.h"
+#include "base/common_art_test.h"
#include "disassembler_arm64.h"
+#include "thread.h"
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wshadow"
@@ -38,7 +39,7 @@ namespace arm64 {
/**
* Fixture class for the ArtDisassemblerTest tests.
*/
-class ArtDisassemblerTest : public CommonRuntimeTest {
+class ArtDisassemblerTest : public CommonArtTest {
public:
ArtDisassemblerTest() {
}
diff --git a/runtime/arch/arch_test.cc b/runtime/arch/arch_test.cc
index 23213d9a77..83fd986525 100644
--- a/runtime/arch/arch_test.cc
+++ b/runtime/arch/arch_test.cc
@@ -18,27 +18,13 @@
#include "art_method-inl.h"
#include "base/callee_save_type.h"
+#include "base/common_art_test.h"
#include "entrypoints/quick/callee_save_frame.h"
-#include "common_runtime_test.h"
#include "quick/quick_method_frame_info.h"
namespace art {
-class ArchTest : public CommonRuntimeTest {
- protected:
- void SetUpRuntimeOptions(RuntimeOptions *options) override {
- // Use 64-bit ISA for runtime setup to make method size potentially larger
- // than necessary (rather than smaller) during CreateCalleeSaveMethod
- 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());
- }
-};
+class ArchTest : public CommonArtTest {};
// Grab architecture specific constants.
namespace arm {
diff --git a/runtime/barrier_test.cc b/runtime/barrier_test.cc
index 5ec24bce17..52959bd3f2 100644
--- a/runtime/barrier_test.cc
+++ b/runtime/barrier_test.cc
@@ -52,6 +52,10 @@ class CheckWaitTask : public Task {
class BarrierTest : public CommonRuntimeTest {
public:
+ BarrierTest() {
+ use_boot_image_ = true; // Make the Runtime creation cheaper.
+ }
+
static int32_t num_threads;
};
diff --git a/runtime/base/message_queue_test.cc b/runtime/base/message_queue_test.cc
index 7a788a9dfc..039e96dace 100644
--- a/runtime/base/message_queue_test.cc
+++ b/runtime/base/message_queue_test.cc
@@ -18,12 +18,12 @@
#include <thread>
-#include "common_runtime_test.h"
+#include "base/common_art_test.h"
#include "thread-current-inl.h"
namespace art {
-class MessageQueueTest : public CommonRuntimeTest {};
+class MessageQueueTest : public CommonArtTest {};
namespace {
diff --git a/runtime/base/mutex_test.cc b/runtime/base/mutex_test.cc
index 7eba50b49c..f524d14c67 100644
--- a/runtime/base/mutex_test.cc
+++ b/runtime/base/mutex_test.cc
@@ -16,12 +16,12 @@
#include "mutex-inl.h"
-#include "common_runtime_test.h"
+#include "base/common_art_test.h"
#include "thread-current-inl.h"
namespace art {
-class MutexTest : public CommonRuntimeTest {};
+class MutexTest : public CommonArtTest {};
struct MutexTester {
static void AssertDepth(Mutex& mu, uint32_t expected_depth) {
diff --git a/runtime/base/timing_logger_test.cc b/runtime/base/timing_logger_test.cc
index 6f8d8cdf72..38ae9a5a57 100644
--- a/runtime/base/timing_logger_test.cc
+++ b/runtime/base/timing_logger_test.cc
@@ -16,11 +16,11 @@
#include "timing_logger.h"
-#include "common_runtime_test.h"
+#include "base/common_art_test.h"
namespace art {
-class TimingLoggerTest : public CommonRuntimeTest {};
+class TimingLoggerTest : public CommonArtTest {};
// TODO: Negative test cases (improper pairing of EndSplit, etc.)
diff --git a/runtime/cha_test.cc b/runtime/cha_test.cc
index c60720f4d3..48fd06d165 100644
--- a/runtime/cha_test.cc
+++ b/runtime/cha_test.cc
@@ -16,11 +16,12 @@
#include "cha.h"
-#include "common_runtime_test.h"
+#include "base/common_art_test.h"
+#include "thread-current-inl.h"
namespace art {
-class CHATest : public CommonRuntimeTest {};
+class CHATest : public CommonArtTest {};
// Mocks some methods.
#define METHOD1 (reinterpret_cast<ArtMethod*>(8u))
diff --git a/runtime/class_loader_context_test.cc b/runtime/class_loader_context_test.cc
index fd14476b19..598670be82 100644
--- a/runtime/class_loader_context_test.cc
+++ b/runtime/class_loader_context_test.cc
@@ -46,6 +46,10 @@ namespace art {
class ClassLoaderContextTest : public CommonRuntimeTest {
public:
+ ClassLoaderContextTest() {
+ use_boot_image_ = true; // Make the Runtime creation cheaper.
+ }
+
void SetUp() override {
CommonRuntimeTest::SetUp();
scratch_dir_ = std::make_unique<ScratchDir>();
diff --git a/runtime/class_table_test.cc b/runtime/class_table_test.cc
index 7dbeba51c0..14c5d70207 100644
--- a/runtime/class_table_test.cc
+++ b/runtime/class_table_test.cc
@@ -66,7 +66,12 @@ class CollectRootVisitor {
};
-class ClassTableTest : public CommonRuntimeTest {};
+class ClassTableTest : public CommonRuntimeTest {
+ protected:
+ ClassTableTest() {
+ use_boot_image_ = true; // Make the Runtime creation cheaper.
+ }
+};
TEST_F(ClassTableTest, ClassTable) {
ScopedObjectAccess soa(Thread::Current());
diff --git a/runtime/entrypoints/math_entrypoints_test.cc b/runtime/entrypoints/math_entrypoints_test.cc
index f70a2da2f5..fe61f5dd11 100644
--- a/runtime/entrypoints/math_entrypoints_test.cc
+++ b/runtime/entrypoints/math_entrypoints_test.cc
@@ -18,11 +18,11 @@
#include <limits>
-#include "common_runtime_test.h"
+#include "base/common_art_test.h"
namespace art {
-class MathEntrypointsTest : public CommonRuntimeTest {};
+class MathEntrypointsTest : public CommonArtTest {};
TEST_F(MathEntrypointsTest, DoubleToLong) {
EXPECT_EQ(std::numeric_limits<int64_t>::max(), art_d2l(1.85e19));
diff --git a/runtime/entrypoints_order_test.cc b/runtime/entrypoints_order_test.cc
index e969652c7a..bd822c1530 100644
--- a/runtime/entrypoints_order_test.cc
+++ b/runtime/entrypoints_order_test.cc
@@ -16,8 +16,8 @@
#include <memory>
+#include "base/common_art_test.h"
#include "base/macros.h"
-#include "common_runtime_test.h"
#include "thread.h"
// This test checks the offsets of values in the thread TLS and entrypoint structures. A failure
@@ -59,7 +59,7 @@ namespace art {
#define EXPECT_OFFSET_DIFF_GT3(type, first_field, second_field, diff, name) \
EXPECT_OFFSET_DIFF_GT(type, first_field, type, second_field, diff, name)
-class EntrypointsOrderTest : public CommonRuntimeTest {
+class EntrypointsOrderTest : public CommonArtTest {
protected:
void CheckThreadOffsets() {
CHECKED(OFFSETOF_MEMBER(Thread, tls32_.state_and_flags) == 0, thread_flags_at_zero);
diff --git a/runtime/gc/accounting/card_table_test.cc b/runtime/gc/accounting/card_table_test.cc
index 12baaa4b4e..b34a883f52 100644
--- a/runtime/gc/accounting/card_table_test.cc
+++ b/runtime/gc/accounting/card_table_test.cc
@@ -19,8 +19,8 @@
#include <string>
#include "base/atomic.h"
+#include "base/common_art_test.h"
#include "base/utils.h"
-#include "common_runtime_test.h"
#include "handle_scope-inl.h"
#include "mirror/class-inl.h"
#include "mirror/string-inl.h" // Strings are easiest to allocate
@@ -36,7 +36,7 @@ class Object;
namespace gc {
namespace accounting {
-class CardTableTest : public CommonRuntimeTest {
+class CardTableTest : public CommonArtTest {
public:
std::unique_ptr<CardTable> card_table_;
diff --git a/runtime/gc/accounting/mod_union_table_test.cc b/runtime/gc/accounting/mod_union_table_test.cc
index e42682a112..3f38f5069e 100644
--- a/runtime/gc/accounting/mod_union_table_test.cc
+++ b/runtime/gc/accounting/mod_union_table_test.cc
@@ -46,6 +46,7 @@ class ModUnionTableFactory {
class ModUnionTableTest : public CommonRuntimeTest {
public:
ModUnionTableTest() : java_lang_object_array_(nullptr) {
+ use_boot_image_ = true; // Make the Runtime creation cheaper.
}
mirror::ObjectArray<mirror::Object>* AllocObjectArray(
Thread* self, space::ContinuousMemMapAllocSpace* space, size_t component_count)
diff --git a/runtime/gc/accounting/space_bitmap_test.cc b/runtime/gc/accounting/space_bitmap_test.cc
index 3a69865267..8fcf102406 100644
--- a/runtime/gc/accounting/space_bitmap_test.cc
+++ b/runtime/gc/accounting/space_bitmap_test.cc
@@ -19,8 +19,8 @@
#include <stdint.h>
#include <memory>
+#include "base/common_art_test.h"
#include "base/mutex.h"
-#include "common_runtime_test.h"
#include "runtime_globals.h"
#include "space_bitmap-inl.h"
@@ -28,7 +28,7 @@ namespace art {
namespace gc {
namespace accounting {
-class SpaceBitmapTest : public CommonRuntimeTest {};
+class SpaceBitmapTest : public CommonArtTest {};
TEST_F(SpaceBitmapTest, Init) {
uint8_t* heap_begin = reinterpret_cast<uint8_t*>(0x10000000);
diff --git a/runtime/gc/collector/immune_spaces_test.cc b/runtime/gc/collector/immune_spaces_test.cc
index 3d27a93c4b..caa8106228 100644
--- a/runtime/gc/collector/immune_spaces_test.cc
+++ b/runtime/gc/collector/immune_spaces_test.cc
@@ -16,7 +16,8 @@
#include <sys/mman.h>
-#include "common_runtime_test.h"
+#include "base/common_art_test.h"
+#include "base/utils.h"
#include "gc/collector/immune_spaces.h"
#include "gc/space/image_space.h"
#include "gc/space/space-inl.h"
@@ -59,7 +60,7 @@ class FakeImageSpace : public space::ImageSpace {
MemMap oat_map_;
};
-class ImmuneSpacesTest : public CommonRuntimeTest {
+class ImmuneSpacesTest : public CommonArtTest {
static constexpr size_t kMaxBitmaps = 10;
public:
diff --git a/runtime/gc/heap_test.cc b/runtime/gc/heap_test.cc
index 5e8c1e368a..55ddd72715 100644
--- a/runtime/gc/heap_test.cc
+++ b/runtime/gc/heap_test.cc
@@ -30,6 +30,10 @@ namespace gc {
class HeapTest : public CommonRuntimeTest {
public:
+ HeapTest() {
+ use_boot_image_ = true; // Make the Runtime creation cheaper.
+ }
+
void SetUp() override {
MemMap::Init();
std::string error_msg;
@@ -100,6 +104,11 @@ TEST_F(HeapTest, DumpGCPerformanceOnShutdown) {
}
class ZygoteHeapTest : public CommonRuntimeTest {
+ public:
+ ZygoteHeapTest() {
+ use_boot_image_ = true; // Make the Runtime creation cheaper.
+ }
+
void SetUpRuntimeOptions(RuntimeOptions* options) override {
CommonRuntimeTest::SetUpRuntimeOptions(options);
options->push_back(std::make_pair("-Xzygote", nullptr));
diff --git a/runtime/gc/heap_verification_test.cc b/runtime/gc/heap_verification_test.cc
index 789a8e398f..a7583fe7f1 100644
--- a/runtime/gc/heap_verification_test.cc
+++ b/runtime/gc/heap_verification_test.cc
@@ -33,7 +33,9 @@ namespace gc {
class VerificationTest : public CommonRuntimeTest {
protected:
- VerificationTest() {}
+ VerificationTest() {
+ use_boot_image_ = true; // Make the Runtime creation cheaper.
+ }
template <class T>
ObjPtr<mirror::ObjectArray<T>> AllocObjectArray(Thread* self, size_t length)
diff --git a/runtime/gc/reference_queue_test.cc b/runtime/gc/reference_queue_test.cc
index c680fb5781..c8e71b02ac 100644
--- a/runtime/gc/reference_queue_test.cc
+++ b/runtime/gc/reference_queue_test.cc
@@ -26,7 +26,12 @@
namespace art {
namespace gc {
-class ReferenceQueueTest : public CommonRuntimeTest {};
+class ReferenceQueueTest : public CommonRuntimeTest {
+ protected:
+ ReferenceQueueTest() {
+ use_boot_image_ = true; // Make the Runtime creation cheaper.
+ }
+};
TEST_F(ReferenceQueueTest, EnqueueDequeue) {
Thread* self = Thread::Current();
diff --git a/runtime/gc/space/space_test.h b/runtime/gc/space/space_test.h
index 4b01e83b38..f0aead18f4 100644
--- a/runtime/gc/space/space_test.h
+++ b/runtime/gc/space/space_test.h
@@ -38,6 +38,10 @@ namespace space {
template <class Super>
class SpaceTest : public Super {
public:
+ SpaceTest() {
+ this->use_boot_image_ = true; // Make the Runtime creation cheaper.
+ }
+
jobject byte_array_class_ = nullptr;
void AddSpace(ContinuousSpace* space, bool revoke = true) {
diff --git a/runtime/gc/system_weak_test.cc b/runtime/gc/system_weak_test.cc
index 4f552a6203..dd936538e5 100644
--- a/runtime/gc/system_weak_test.cc
+++ b/runtime/gc/system_weak_test.cc
@@ -35,6 +35,10 @@ namespace art {
namespace gc {
class SystemWeakTest : public CommonRuntimeTest {
+ protected:
+ SystemWeakTest() {
+ use_boot_image_ = true; // Make the Runtime creation cheaper.
+ }
};
struct CountingSystemWeakHolder : public SystemWeakHolder {
diff --git a/runtime/handle_scope_test.cc b/runtime/handle_scope_test.cc
index d72dbe6998..9207303750 100644
--- a/runtime/handle_scope_test.cc
+++ b/runtime/handle_scope_test.cc
@@ -38,7 +38,12 @@ static_assert(std::is_trivially_copyable<MutableHandle<mirror::Object>>::value,
static_assert(std::is_trivially_copyable<ScopedNullHandle<mirror::Object>>::value,
"ScopedNullHandle should be trivially copyable");
-class HandleScopeTest : public CommonRuntimeTest {};
+class HandleScopeTest : public CommonRuntimeTest {
+ protected:
+ HandleScopeTest() {
+ use_boot_image_ = true; // Make the Runtime creation cheaper.
+ }
+};
// Test the offsets computed for members of HandleScope. Because of cross-compiling
// it is impossible the use OFFSETOF_MEMBER, so we do some reasonable computations ourselves. This
diff --git a/runtime/indirect_reference_table_test.cc b/runtime/indirect_reference_table_test.cc
index 5da7a30ece..af0ebaecf0 100644
--- a/runtime/indirect_reference_table_test.cc
+++ b/runtime/indirect_reference_table_test.cc
@@ -28,7 +28,12 @@ namespace art {
using android::base::StringPrintf;
-class IndirectReferenceTableTest : public CommonRuntimeTest {};
+class IndirectReferenceTableTest : public CommonRuntimeTest {
+ protected:
+ IndirectReferenceTableTest() {
+ use_boot_image_ = true; // Make the Runtime creation cheaper.
+ }
+};
static void CheckDump(IndirectReferenceTable* irt, size_t num_objects, size_t num_unique)
REQUIRES_SHARED(Locks::mutator_lock_) {
diff --git a/runtime/instrumentation_test.cc b/runtime/instrumentation_test.cc
index f81f050139..260ccb621c 100644
--- a/runtime/instrumentation_test.cc
+++ b/runtime/instrumentation_test.cc
@@ -183,6 +183,10 @@ class InstrumentationTest : public CommonRuntimeTest {
static constexpr const char* kClientOneKey = "TestClient1";
static constexpr const char* kClientTwoKey = "TestClient2";
+ InstrumentationTest() {
+ use_boot_image_ = true; // Make the Runtime creation cheaper.
+ }
+
void CheckConfigureStubs(const char* key, Instrumentation::InstrumentationLevel level) {
ScopedObjectAccess soa(Thread::Current());
instrumentation::Instrumentation* instr = Runtime::Current()->GetInstrumentation();
diff --git a/runtime/intern_table_test.cc b/runtime/intern_table_test.cc
index 9900c2a4e0..d77ffcba3e 100644
--- a/runtime/intern_table_test.cc
+++ b/runtime/intern_table_test.cc
@@ -27,7 +27,12 @@
namespace art {
-class InternTableTest : public CommonRuntimeTest {};
+class InternTableTest : public CommonRuntimeTest {
+ protected:
+ InternTableTest() {
+ use_boot_image_ = true; // Make the Runtime creation cheaper.
+ }
+};
TEST_F(InternTableTest, Intern) {
ScopedObjectAccess soa(Thread::Current());
diff --git a/runtime/method_handles_test.cc b/runtime/method_handles_test.cc
index eb3f2ad41c..fb2f7bd5c8 100644
--- a/runtime/method_handles_test.cc
+++ b/runtime/method_handles_test.cc
@@ -71,7 +71,12 @@ namespace {
}
} // namespace
-class MethodHandlesTest : public CommonRuntimeTest {};
+class MethodHandlesTest : public CommonRuntimeTest {
+ protected:
+ MethodHandlesTest() {
+ use_boot_image_ = true; // Make the Runtime creation cheaper.
+ }
+};
//
// Primitive -> Primitive Conversions
diff --git a/runtime/mirror/object_test.cc b/runtime/mirror/object_test.cc
index e26cf427b4..f67f6f393d 100644
--- a/runtime/mirror/object_test.cc
+++ b/runtime/mirror/object_test.cc
@@ -50,6 +50,10 @@ namespace mirror {
class ObjectTest : public CommonRuntimeTest {
protected:
+ ObjectTest() {
+ use_boot_image_ = true; // Make the Runtime creation cheaper.
+ }
+
void AssertString(int32_t expected_utf16_length,
const char* utf8_in,
const char* utf16_expected_le,
diff --git a/runtime/mirror/var_handle_test.cc b/runtime/mirror/var_handle_test.cc
index 9c1a2e7456..859e86c1cb 100644
--- a/runtime/mirror/var_handle_test.cc
+++ b/runtime/mirror/var_handle_test.cc
@@ -40,6 +40,10 @@ namespace mirror {
// Tests for mirror::VarHandle and it's descendents.
class VarHandleTest : public CommonRuntimeTest {
public:
+ VarHandleTest() {
+ use_boot_image_ = true; // Make the Runtime creation cheaper.
+ }
+
static ObjPtr<FieldVarHandle> CreateFieldVarHandle(Thread* const self,
ArtField* art_field,
int32_t access_modes_bit_mask)
diff --git a/runtime/monitor_test.cc b/runtime/monitor_test.cc
index 66008f3ff2..64986b65d9 100644
--- a/runtime/monitor_test.cc
+++ b/runtime/monitor_test.cc
@@ -35,12 +35,17 @@ namespace art {
class MonitorTest : public CommonRuntimeTest {
protected:
+ MonitorTest() {
+ use_boot_image_ = true; // Make the Runtime creation cheaper.
+ }
+
void SetUpRuntimeOptions(RuntimeOptions *options) override {
// Use a smaller heap
SetUpRuntimeOptionsForFillHeap(options);
options->push_back(std::make_pair("-Xint", nullptr));
}
+
public:
std::unique_ptr<Monitor> monitor_;
Handle<mirror::String> object_;
diff --git a/runtime/proxy_test.cc b/runtime/proxy_test.cc
index d055186f06..7b662106b3 100644
--- a/runtime/proxy_test.cc
+++ b/runtime/proxy_test.cc
@@ -30,6 +30,10 @@ namespace proxy_test {
class ProxyTest : public CommonRuntimeTest {
protected:
+ ProxyTest() {
+ use_boot_image_ = true; // Make the Runtime creation cheaper.
+ }
+
void SetUp() override {
CommonRuntimeTest::SetUp();
// The creation of a Proxy class uses WellKnownClasses. These are not normally initialized by
diff --git a/runtime/reference_table_test.cc b/runtime/reference_table_test.cc
index 7a1e6682fa..5fc01abadb 100644
--- a/runtime/reference_table_test.cc
+++ b/runtime/reference_table_test.cc
@@ -40,7 +40,12 @@ namespace art {
using android::base::StringPrintf;
-class ReferenceTableTest : public CommonRuntimeTest {};
+class ReferenceTableTest : public CommonRuntimeTest {
+ protected:
+ ReferenceTableTest() {
+ use_boot_image_ = true; // Make the Runtime creation cheaper.
+ }
+};
static ObjPtr<mirror::Object> CreateWeakReference(ObjPtr<mirror::Object> referent)
REQUIRES_SHARED(Locks::mutator_lock_) {
diff --git a/runtime/vdex_file_test.cc b/runtime/vdex_file_test.cc
index 565487e275..1ac10eb733 100644
--- a/runtime/vdex_file_test.cc
+++ b/runtime/vdex_file_test.cc
@@ -20,12 +20,11 @@
#include <gtest/gtest.h>
-#include "common_runtime_test.h"
+#include "base/common_art_test.h"
namespace art {
-class VdexFileTest : public CommonRuntimeTest {
-};
+class VdexFileTest : public CommonArtTest {};
TEST_F(VdexFileTest, OpenEmptyVdex) {
// Verify we fail to open an empty vdex file.
diff --git a/runtime/verifier/method_verifier_test.cc b/runtime/verifier/method_verifier_test.cc
index ec07047a6e..0f0fd17905 100644
--- a/runtime/verifier/method_verifier_test.cc
+++ b/runtime/verifier/method_verifier_test.cc
@@ -37,6 +37,10 @@ using metrics::test::CounterValue;
class MethodVerifierTest : public CommonRuntimeTest {
protected:
+ MethodVerifierTest() {
+ use_boot_image_ = true; // Make the Runtime creation cheaper.
+ }
+
void VerifyClass(const std::string& descriptor)
REQUIRES_SHARED(Locks::mutator_lock_) {
ASSERT_FALSE(descriptor.empty());
diff --git a/runtime/verifier/reg_type_test.cc b/runtime/verifier/reg_type_test.cc
index a157464674..a36cf7134f 100644
--- a/runtime/verifier/reg_type_test.cc
+++ b/runtime/verifier/reg_type_test.cc
@@ -32,7 +32,7 @@ namespace art {
namespace verifier {
class RegTypeTest : public CommonRuntimeTest {
- public:
+ protected:
RegTypeTest() {
use_boot_image_ = true; // Make the Runtime creation cheaper.
}
@@ -360,7 +360,7 @@ TEST_F(RegTypeTest, Primitives) {
EXPECT_TRUE(double_reg_type.HasClass());
}
-class RegTypeReferenceTest : public CommonRuntimeTest {};
+class RegTypeReferenceTest : public RegTypeTest {};
TEST_F(RegTypeReferenceTest, JavalangObjectImprecise) {
// Tests matching precisions. A reference type that was created precise doesn't
diff --git a/tools/dexanalyze/dexanalyze_test.cc b/tools/dexanalyze/dexanalyze_test.cc
index 9e6ed6df67..474615dec2 100644
--- a/tools/dexanalyze/dexanalyze_test.cc
+++ b/tools/dexanalyze/dexanalyze_test.cc
@@ -14,12 +14,12 @@
* limitations under the License.
*/
-#include "common_runtime_test.h"
+#include "base/common_art_test.h"
#include "exec_utils.h"
namespace art {
-class DexAnalyzeTest : public CommonRuntimeTest {
+class DexAnalyzeTest : public CommonArtTest {
public:
std::string GetDexAnalyzePath() {
return GetArtBinDir() + "/dexanalyze";