Make test-art-host-run-test and test-art-host-oat run with and without interpreter.

Change-Id: I54e7162c839910fcf8b8a394aebff2d3c807ccfb
diff --git a/Android.mk b/Android.mk
index 6c68428..7638be9 100644
--- a/Android.mk
+++ b/Android.mk
@@ -125,11 +125,11 @@
 	@echo test-art-gtest PASSED
 
 .PHONY: test-art-oat
-test-art-oat: test-art-host-oat test-art-target-oat test-art-host-interpreter-oat
+test-art-oat: test-art-host-oat test-art-target-oat
 	@echo test-art-oat PASSED
 
 .PHONY: test-art-run-test
-test-art-run-test: test-art-host-run-test test-art-target-run-test test-art-host-interpreter-run-test
+test-art-run-test: test-art-host-run-test test-art-target-run-test
 	@echo test-art-run-test PASSED
 
 ########################################################################
@@ -137,11 +137,11 @@
 
 # "mm test-art-host" to build and run all host tests
 .PHONY: test-art-host
-test-art-host: test-art-host-gtest test-art-host-oat test-art-host-run-test test-art-host-interpreter
+test-art-host: test-art-host-gtest test-art-host-oat test-art-host-run-test
 	@echo test-art-host PASSED
 
 .PHONY: test-art-host-interpreter
-test-art-host-interpreter: test-art-host-interpreter-oat test-art-host-interpreter-run-test
+test-art-host-interpreter: test-art-host-oat-interpreter test-art-host-run-test-interpreter
 	@echo test-art-host-interpreter PASSED
 
 .PHONY: test-art-host-dependencies
@@ -161,39 +161,47 @@
 	$(call run-host-gtests-with,valgrind --leak-check=full)
 	@echo valgrind-test-art-host-gtest PASSED
 
+.PHONY: test-art-host-oat-default
+test-art-host-oat-default: $(ART_TEST_HOST_OAT_DEFAULT_TARGETS)
+	@echo test-art-host-oat-default PASSED
+
+.PHONY: test-art-host-oat-interpreter
+test-art-host-oat-interpreter: $(ART_TEST_HOST_OAT_INTERPRETER_TARGETS)
+	@echo test-art-host-oat-interpreter PASSED
+
 .PHONY: test-art-host-oat
-test-art-host-oat: $(ART_TEST_HOST_OAT_TARGETS)
+test-art-host-oat: test-art-host-oat-default test-art-host-oat-interpreter
 	@echo test-art-host-oat PASSED
 
-.PHONY: test-art-host-interpreter-oat
-test-art-host-interpreter-oat: $(ART_TEST_HOST_INTERPRETER_OAT_TARGETS)
-	@echo test-art-host-interpreter-oat PASSED
-
 define declare-test-art-host-run-test
-.PHONY: test-art-host-run-test-$(1)
-test-art-host-run-test-$(1): test-art-host-dependencies
+.PHONY: test-art-host-run-test-default-$(1)
+test-art-host-run-test-default-$(1): test-art-host-dependencies
 	art/test/run-test --host $(1)
-	@echo test-art-host-run-test-$(1) PASSED
+	@echo test-art-host-run-test-default-$(1) PASSED
 
-TEST_ART_HOST_RUN_TEST_TARGETS += test-art-host-run-test-$(1)
+TEST_ART_HOST_RUN_TEST_DEFAULT_TARGETS += test-art-host-run-test-default-$(1)
 
-.PHONY: test-art-host-interpreter-run-test-$(1)
-test-art-host-interpreter-run-test-$(1): test-art-host-dependencies
+.PHONY: test-art-host-run-test-interpreter-$(1)
+test-art-host-run-test-interpreter-$(1): test-art-host-dependencies
 	art/test/run-test --host --interpreter $(1)
-	@echo test-art-host-interpreter-run-test-$(1) PASSED
+	@echo test-art-host-run-test-interpreter-$(1) PASSED
 
-TEST_ART_HOST_INTERPRETER_RUN_TEST_TARGETS += test-art-host-interpreter-run-test-$(1)
+TEST_ART_HOST_RUN_TEST_INTERPRETER_TARGETS += test-art-host-run-test-interpreter-$(1)
 endef
 
 $(foreach test, $(wildcard art/test/[0-9]*), $(eval $(call declare-test-art-host-run-test,$(notdir $(test)))))
 
-.PHONY: test-art-host-run-test
-test-art-host-run-test: $(TEST_ART_HOST_RUN_TEST_TARGETS)
-	@echo test-art-host-run-test PASSED
+.PHONY: test-art-host-run-test-default
+test-art-host-run-test-default: $(TEST_ART_HOST_RUN_TEST_DEFAULT_TARGETS)
+	@echo test-art-host-run-test-default PASSED
 
-.PHONY: test-art-host-interpreter-run-test
-test-art-host-interpreter-run-test: $(TEST_ART_HOST_INTERPRETER_RUN_TEST_TARGETS)
-	@echo test-art-host-interpreter-run-test PASSED
+.PHONY: test-art-host-run-test-interpreter
+test-art-host-run-test-interpreter: $(TEST_ART_HOST_RUN_TEST_INTERPRETER_TARGETS)
+	@echo test-art-host-run-test-interpreter PASSED
+
+.PHONY: test-art-host-run-test
+test-art-host-run-test: test-art-host-run-test-default test-art-host-run-test-interpreter
+	@echo test-art-host-run-test PASSED
 
 ########################################################################
 # target test targets
diff --git a/test/Android.mk b/test/Android.mk
index a91ed3d..87e15a8 100644
--- a/test/Android.mk
+++ b/test/Android.mk
@@ -96,8 +96,8 @@
 ########################################################################
 
 ART_TEST_TARGET_OAT_TARGETS :=
-ART_TEST_HOST_OAT_TARGETS :=
-ART_TEST_HOST_INTERPRETER_OAT_TARGETS :=
+ART_TEST_HOST_OAT_DEFAULT_TARGETS :=
+ART_TEST_HOST_OAT_INTERPRETER_TARGETS :=
 
 # $(1): directory
 # $(2): arguments
@@ -113,29 +113,29 @@
 $(HOST_OUT_JAVA_LIBRARIES)/oat-test-dex-$(1).odex: $(HOST_OUT_JAVA_LIBRARIES)/oat-test-dex-$(1).jar $(HOST_CORE_IMG_OUT) | $(DEX2OAT)
 	$(DEX2OAT) --runtime-arg -Xms16m --runtime-arg -Xmx16m --boot-image=$(HOST_CORE_IMG_OUT) --dex-file=$$< --oat-file=$$@ --instruction-set=$(HOST_ARCH) --host --host-prefix="" --android-root=$(HOST_OUT)
 
-.PHONY: test-art-host-oat-$(1)
-test-art-host-oat-$(1): $(HOST_OUT_JAVA_LIBRARIES)/oat-test-dex-$(1).odex test-art-host-dependencies
-	mkdir -p /tmp/android-data/test-art-host-oat-$(1)
-	ANDROID_DATA=/tmp/android-data/test-art-host-oat-$(1) \
+.PHONY: test-art-host-oat-default-$(1)
+test-art-host-oat-default-$(1): $(HOST_OUT_JAVA_LIBRARIES)/oat-test-dex-$(1).odex test-art-host-dependencies
+	mkdir -p /tmp/android-data/test-art-host-oat-default-$(1)
+	ANDROID_DATA=/tmp/android-data/test-art-host-oat-default-$(1) \
 	  ANDROID_ROOT=$(HOST_OUT) \
 	  LD_LIBRARY_PATH=$(HOST_OUT_SHARED_LIBRARIES) \
 	  dalvikvm -XXlib:libartd.so -Ximage:$(shell pwd)/$(HOST_CORE_IMG_OUT) -classpath $(HOST_OUT_JAVA_LIBRARIES)/oat-test-dex-$(1).jar -Djava.library.path=$(HOST_OUT_SHARED_LIBRARIES) $(1) $(2) \
-          && echo test-art-host-oat-$(1) PASSED || (echo test-art-host-oat-$(1) FAILED && exit 1)
-	$(hide) rm -r /tmp/android-data/test-art-host-oat-$(1)
+          && echo test-art-host-oat-default-$(1) PASSED || (echo test-art-host-oat-default-$(1) FAILED && exit 1)
+	$(hide) rm -r /tmp/android-data/test-art-host-oat-default-$(1)
 
-.PHONY: test-art-host-interpreter-oat-$(1)
-test-art-host-interpreter-oat-$(1): $(HOST_OUT_JAVA_LIBRARIES)/oat-test-dex-$(1).odex test-art-host-dependencies
-	mkdir -p /tmp/android-data/test-art-host-interpreter-oat-$(1)
-	ANDROID_DATA=/tmp/android-data/test-art-host-interpreter-oat-$(1) \
+.PHONY: test-art-host-oat-interpreter-$(1)
+test-art-host-oat-interpreter-$(1): $(HOST_OUT_JAVA_LIBRARIES)/oat-test-dex-$(1).odex test-art-host-dependencies
+	mkdir -p /tmp/android-data/test-art-host-oat-interpreter-$(1)
+	ANDROID_DATA=/tmp/android-data/test-art-host-oat-interpreter-$(1) \
 	  ANDROID_ROOT=$(HOST_OUT) \
 	  LD_LIBRARY_PATH=$(HOST_OUT_SHARED_LIBRARIES) \
 	  dalvikvm -XXlib:libartd.so -Ximage:$(shell pwd)/$(HOST_CORE_IMG_OUT) -Xint -classpath $(HOST_OUT_JAVA_LIBRARIES)/oat-test-dex-$(1).jar -Djava.library.path=$(HOST_OUT_SHARED_LIBRARIES) $(1) $(2) \
-          && echo test-art-host-interpreter-oat-$(1) PASSED || (echo test-art-host-interpreter-oat-$(1) FAILED && exit 1)
-	$(hide) rm -r /tmp/android-data/test-art-host-interpreter-oat-$(1)
+          && echo test-art-host-oat-interpreter-$(1) PASSED || (echo test-art-host-oat-interpreter-$(1) FAILED && exit 1)
+	$(hide) rm -r /tmp/android-data/test-art-host-oat-interpreter-$(1)
 
 ART_TEST_TARGET_OAT_TARGETS += test-art-target-oat-$(1)
-ART_TEST_HOST_OAT_TARGETS += test-art-host-oat-$(1)
-ART_TEST_HOST_INTERPRETER_OAT_TARGETS += test-art-host-interpreter-oat-$(1)
+ART_TEST_HOST_OAT_DEFAULT_TARGETS += test-art-host-oat-default-$(1)
+ART_TEST_HOST_OAT_INTERPRETER_TARGETS += test-art-host-oat-interpreter-$(1)
 endef
 $(foreach dir,$(TEST_OAT_DIRECTORIES), $(eval $(call declare-test-art-oat-targets,$(dir))))