OSDN Git Service

Change JIT tests to use interpreter image
authorMathieu Chartier <mathieuc@google.com>
Fri, 27 Feb 2015 21:21:15 +0000 (13:21 -0800)
committerMathieu Chartier <mathieuc@google.com>
Fri, 27 Feb 2015 22:26:29 +0000 (14:26 -0800)
Bug: 19528920
Change-Id: I079cfcca7bb57e492c82a44f104e41228cb33b4f

build/Android.oat.mk
test/Android.run-test.mk
test/run-test

index 894f98f..4d2fa41 100644 (file)
@@ -64,10 +64,6 @@ define create-core-oat-host-rules
     core_compile_options += --compiler-filter=interpret-only
     core_infix := -interpreter
   endif
-  ifeq ($(1),jit)
-    core_compile_options += --compiler-filter=interpret-only
-    core_infix := -jit
-  endif
   ifeq ($(1),default)
     # Default has no infix, no compile options.
   endif
@@ -147,14 +143,12 @@ endef
 $(eval $(call create-core-oat-host-rule-combination,default,,))
 $(eval $(call create-core-oat-host-rule-combination,optimizing,,))
 $(eval $(call create-core-oat-host-rule-combination,interpreter,,))
-$(eval $(call create-core-oat-host-rule-combination,jit,,))
 
 valgrindHOST_CORE_IMG_OUTS :=
 valgrindHOST_CORE_OAT_OUTS :=
 $(eval $(call create-core-oat-host-rule-combination,default,valgrind,32))
 $(eval $(call create-core-oat-host-rule-combination,optimizing,valgrind,32))
 $(eval $(call create-core-oat-host-rule-combination,interpreter,valgrind,32))
-$(eval $(call create-core-oat-host-rule-combination,jit,valgrind,32))
 
 valgrind-test-art-host-dex2oat-host: $(valgrindHOST_CORE_IMG_OUTS)
 
@@ -184,10 +178,6 @@ define create-core-oat-target-rules
     core_compile_options += --compiler-filter=interpret-only
     core_infix := -interpreter
   endif
-  ifeq ($(1),jit)
-    core_compile_options += --compiler-filter=interpret-only
-    core_infix := -jit
-  endif
   ifeq ($(1),default)
     # Default has no infix, no compile options.
   endif
@@ -271,14 +261,12 @@ endef
 $(eval $(call create-core-oat-target-rule-combination,default,,))
 $(eval $(call create-core-oat-target-rule-combination,optimizing,,))
 $(eval $(call create-core-oat-target-rule-combination,interpreter,,))
-$(eval $(call create-core-oat-target-rule-combination,jit,,))
 
 valgrindTARGET_CORE_IMG_OUTS :=
 valgrindTARGET_CORE_OAT_OUTS :=
 $(eval $(call create-core-oat-target-rule-combination,default,valgrind,32))
 $(eval $(call create-core-oat-target-rule-combination,optimizing,valgrind,32))
 $(eval $(call create-core-oat-target-rule-combination,interpreter,valgrind,32))
-$(eval $(call create-core-oat-target-rule-combination,jit,valgrind,32))
 
 valgrind-test-art-host-dex2oat-target: $(valgrindTARGET_CORE_IMG_OUTS)
 
index e5a07d4..c764414 100644 (file)
@@ -569,32 +569,38 @@ define define-test-art-run-test
       endif
     endif
   endif
+  ifeq ($(4),jit)
+    # Use interpreter image for JIT.
+    image_suffix := interpreter
+  else
+    image_suffix := $(4)
+  endif
   ifeq ($(9),no-image)
     test_groups += ART_RUN_TEST_$$(uc_host_or_target)_NO_IMAGE_RULES
     run_test_options += --no-image
     # Add the core dependency. This is required for pre-building.
     ifeq ($(1),host)
-      prereq_rule += $(HOST_CORE_IMAGE_$(4)_no-pic_$(12))
+      prereq_rule += $(HOST_CORE_IMAGE_$(image_suffix)_no-pic_$(12))
     else
-      prereq_rule += $(TARGET_CORE_IMAGE_$(4)_no-pic_$(12))
+      prereq_rule += $(TARGET_CORE_IMAGE_$(image_suffix)_no-pic_$(12))
     endif
   else
     ifeq ($(9),image)
       test_groups += ART_RUN_TEST_$$(uc_host_or_target)_IMAGE_RULES
       # Add the core dependency.
       ifeq ($(1),host)
-        prereq_rule += $(HOST_CORE_IMAGE_$(4)_no-pic_$(12))
+        prereq_rule += $(HOST_CORE_IMAGE_$(image_suffix)_no-pic_$(12))
       else
-        prereq_rule += $(TARGET_CORE_IMAGE_$(4)_no-pic_$(12))
+        prereq_rule += $(TARGET_CORE_IMAGE_$(image_suffix)_no-pic_$(12))
       endif
     else
       ifeq ($(9),picimage)
         test_groups += ART_RUN_TEST_$$(uc_host_or_target)_PICIMAGE_RULES
         run_test_options += --pic-image
         ifeq ($(1),host)
-          prereq_rule += $(HOST_CORE_IMAGE_$(4)_pic_$(12))
+          prereq_rule += $(HOST_CORE_IMAGE_$(image_suffix)_pic_$(12))
         else
-          prereq_rule += $(TARGET_CORE_IMAGE_$(4)_pic_$(12))
+          prereq_rule += $(TARGET_CORE_IMAGE_$(image_suffix)_pic_$(12))
         endif
       else
         $$(error found $(9) expected $(IMAGE_TYPES))
index 888e4ed..52f5e0c 100755 (executable)
@@ -195,7 +195,7 @@ while true; do
         shift
     elif [ "x$1" = "x--jit" ]; then
         run_args="${run_args} --jit"
-        image_suffix="-jit"
+        image_suffix="-interpreter"
         shift
     elif [ "x$1" = "x--optimizing" ]; then
         run_args="${run_args} -Xcompiler-option --compiler-backend=Optimizing"