summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/497-inlining-and-class-loader/clear_dex_cache.cc9
-rw-r--r--test/566-polymorphic-inlining/polymorphic_inline.cc5
-rw-r--r--test/Android.libarttest.mk4
-rw-r--r--test/Android.libnativebridgetest.mk4
-rw-r--r--test/common/runtime_state.cc3
5 files changed, 14 insertions, 11 deletions
diff --git a/test/497-inlining-and-class-loader/clear_dex_cache.cc b/test/497-inlining-and-class-loader/clear_dex_cache.cc
index 50d1a6361d..1597c4a65d 100644
--- a/test/497-inlining-and-class-loader/clear_dex_cache.cc
+++ b/test/497-inlining-and-class-loader/clear_dex_cache.cc
@@ -15,6 +15,7 @@
*/
#include "art_method-inl.h"
+#include "base/enums.h"
#include "jni.h"
#include "scoped_thread_state_change.h"
#include "stack.h"
@@ -44,8 +45,8 @@ extern "C" JNIEXPORT jobject JNICALL Java_Main_cloneResolvedMethods(JNIEnv* env,
CHECK(array != nullptr);
mirror::PointerArray* pointer_array = soa.Decode<mirror::PointerArray*>(array);
for (size_t i = 0; i != num_methods; ++i) {
- ArtMethod* method = mirror::DexCache::GetElementPtrSize(methods, i, sizeof(void*));
- pointer_array->SetElementPtrSize(i, method, sizeof(void*));
+ ArtMethod* method = mirror::DexCache::GetElementPtrSize(methods, i, kRuntimePointerSize);
+ pointer_array->SetElementPtrSize(i, method, kRuntimePointerSize);
}
return array;
}
@@ -61,8 +62,8 @@ extern "C" JNIEXPORT void JNICALL Java_Main_restoreResolvedMethods(
CHECK_EQ(methods != nullptr, old != nullptr);
CHECK_EQ(num_methods, static_cast<size_t>(old->GetLength()));
for (size_t i = 0; i != num_methods; ++i) {
- ArtMethod* method = old->GetElementPtrSize<ArtMethod*>(i, sizeof(void*));
- mirror::DexCache::SetElementPtrSize(methods, i, method, sizeof(void*));
+ ArtMethod* method = old->GetElementPtrSize<ArtMethod*>(i, kRuntimePointerSize);
+ mirror::DexCache::SetElementPtrSize(methods, i, method, kRuntimePointerSize);
}
}
diff --git a/test/566-polymorphic-inlining/polymorphic_inline.cc b/test/566-polymorphic-inlining/polymorphic_inline.cc
index 9f4c6c91f8..89293cc38a 100644
--- a/test/566-polymorphic-inlining/polymorphic_inline.cc
+++ b/test/566-polymorphic-inlining/polymorphic_inline.cc
@@ -15,6 +15,7 @@
*/
#include "art_method.h"
+#include "base/enums.h"
#include "jit/jit.h"
#include "jit/jit_code_cache.h"
#include "jit/profiling_info.h"
@@ -29,7 +30,7 @@ static void do_checks(jclass cls, const char* method_name) {
mirror::Class* klass = soa.Decode<mirror::Class*>(cls);
jit::Jit* jit = Runtime::Current()->GetJit();
jit::JitCodeCache* code_cache = jit->GetCodeCache();
- ArtMethod* method = klass->FindDeclaredDirectMethodByName(method_name, sizeof(void*));
+ ArtMethod* method = klass->FindDeclaredDirectMethodByName(method_name, kRuntimePointerSize);
OatQuickMethodHeader* header = nullptr;
// Infinite loop... Test harness will have its own timeout.
@@ -53,7 +54,7 @@ static void do_checks(jclass cls, const char* method_name) {
static void allocate_profiling_info(jclass cls, const char* method_name) {
ScopedObjectAccess soa(Thread::Current());
mirror::Class* klass = soa.Decode<mirror::Class*>(cls);
- ArtMethod* method = klass->FindDeclaredDirectMethodByName(method_name, sizeof(void*));
+ ArtMethod* method = klass->FindDeclaredDirectMethodByName(method_name, kRuntimePointerSize);
ProfilingInfo::Create(soa.Self(), method, /* retry_allocation */ true);
}
diff --git a/test/Android.libarttest.mk b/test/Android.libarttest.mk
index 7813d16657..ec5b7d23c0 100644
--- a/test/Android.libarttest.mk
+++ b/test/Android.libarttest.mk
@@ -86,7 +86,7 @@ define build-libarttest
LOCAL_ADDITIONAL_DEPENDENCIES := art/build/Android.common_build.mk
LOCAL_ADDITIONAL_DEPENDENCIES += $(LOCAL_PATH)/Android.libarttest.mk
ifeq ($$(art_target_or_host),target)
- $(call set-target-local-clang-vars)
+ LOCAL_CLANG := $(ART_TARGET_CLANG)
ifeq ($$(suffix),d)
$(call set-target-local-cflags-vars,debug)
else
@@ -109,7 +109,7 @@ define build-libarttest
LOCAL_CFLAGS += $(ART_HOST_NON_DEBUG_CFLAGS)
LOCAL_ASFLAGS += $(ART_HOST_NON_DEBUG_ASFLAGS)
endif
- LOCAL_LDLIBS := $(ART_HOST_LDLIBS) -ldl -lpthread
+ LOCAL_LDLIBS := -ldl -lpthread
LOCAL_IS_HOST_MODULE := true
LOCAL_MULTILIB := both
include $(BUILD_HOST_SHARED_LIBRARY)
diff --git a/test/Android.libnativebridgetest.mk b/test/Android.libnativebridgetest.mk
index 992332e922..5c97e4dabb 100644
--- a/test/Android.libnativebridgetest.mk
+++ b/test/Android.libnativebridgetest.mk
@@ -48,7 +48,7 @@ define build-libnativebridgetest
LOCAL_ADDITIONAL_DEPENDENCIES := art/build/Android.common_build.mk
LOCAL_ADDITIONAL_DEPENDENCIES += $(LOCAL_PATH)/Android.libnativebridgetest.mk
ifeq ($$(art_target_or_host),target)
- $(call set-target-local-clang-vars)
+ LOCAL_CLANG := $(ART_TARGET_CLANG)
$(call set-target-local-cflags-vars,debug)
LOCAL_SHARED_LIBRARIES += libdl
LOCAL_STATIC_LIBRARIES := libgtest
@@ -62,7 +62,7 @@ define build-libnativebridgetest
LOCAL_CFLAGS := $(ART_HOST_CFLAGS) $(ART_HOST_DEBUG_CFLAGS)
LOCAL_ASFLAGS := $(ART_HOST_ASFLAGS) $(ART_HOST_DEBUG_ASFLAGS)
LOCAL_SHARED_LIBRARIES := libcutils
- LOCAL_LDLIBS := $(ART_HOST_LDLIBS) -ldl -lpthread
+ LOCAL_LDLIBS := -ldl -lpthread
ifeq ($(HOST_OS),linux)
LOCAL_LDLIBS += -lrt
endif
diff --git a/test/common/runtime_state.cc b/test/common/runtime_state.cc
index e70a95cbb5..806e130cb9 100644
--- a/test/common/runtime_state.cc
+++ b/test/common/runtime_state.cc
@@ -16,6 +16,7 @@
#include "jni.h"
+#include "base/enums.h"
#include "base/logging.h"
#include "dex_file-inl.h"
#include "jit/jit.h"
@@ -135,7 +136,7 @@ extern "C" JNIEXPORT void JNICALL Java_Main_ensureJitCompiled(JNIEnv* env,
CHECK(chars.c_str() != nullptr);
mirror::Class* klass = soa.Decode<mirror::Class*>(cls);
- ArtMethod* method = klass->FindDeclaredDirectMethodByName(chars.c_str(), sizeof(void*));
+ ArtMethod* method = klass->FindDeclaredDirectMethodByName(chars.c_str(), kRuntimePointerSize);
jit::JitCodeCache* code_cache = jit->GetCodeCache();
OatQuickMethodHeader* header = nullptr;