diff options
-rw-r--r-- | build/Android.common_test.mk | 3 | ||||
-rw-r--r-- | test/Android.oat.mk | 16 | ||||
-rw-r--r-- | test/Android.run-test.mk | 21 | ||||
-rwxr-xr-x | test/run-test | 2 |
4 files changed, 37 insertions, 5 deletions
diff --git a/build/Android.common_test.mk b/build/Android.common_test.mk index 86ef35e..bd698de 100644 --- a/build/Android.common_test.mk +++ b/build/Android.common_test.mk @@ -42,6 +42,9 @@ ART_TEST_OPTIMIZING ?= $(ART_TEST_FULL) # Do you want tracing tests run? ART_TEST_TRACE ?= $(ART_TEST_FULL) +# Do you want tests with GC verification enabled run? +ART_TEST_GC_VERIFY ?= $(ART_TEST_FULL) + # Define the command run on test failure. $(1) is the name of the test. Executed by the shell. define ART_TEST_FAILED ( [ -f $(ART_HOST_TEST_DIR)/skipped/$(1) ] || \ diff --git a/test/Android.oat.mk b/test/Android.oat.mk index 21f1102..16f1fb7 100644 --- a/test/Android.oat.mk +++ b/test/Android.oat.mk @@ -235,6 +235,19 @@ define define-test-art-oat-rules-host ART_TEST_HOST_OAT_DEFAULT_RULES += $$(default_test_rule) ART_TEST_HOST_OAT_DEFAULT_$(1)_RULES += $$(default_test_rule) + gcverify_test_rule := test-art-host-oat-gcverify-default-$(1)$$($(2)ART_PHONY_TEST_HOST_SUFFIX) + ifeq ($$(ART_TEST_GC_VERIFY),true) + $(call define-test-art-oat-rule-host,$(1),$(2),$$(gcverify_test_rule),,-Xgc:preverify -Xgc:postverify -Xgc:preverify_rosalloc -Xgc:postverify_rosalloc) + else + .PHONY: $$(gcverify_test_rule) +$$(gcverify_test_rule): + + endif + + ART_TEST_HOST_OAT_DEFAULT$$($(2)ART_PHONY_TEST_HOST_SUFFIX)_RULES += $$(gcverify_test_rule) + ART_TEST_HOST_OAT_DEFAULT_RULES += $$(gcverify_test_rule) + ART_TEST_HOST_OAT_DEFAULT_$(1)_RULES += $$(gcverify_test_rule) + # Create a rule to run the host oat test with the optimizing compiler. optimizing_test_rule := test-art-host-oat-optimizing-$(1)$$($(2)ART_PHONY_TEST_HOST_SUFFIX) ifeq ($$(ART_TEST_OPTIMIZING),true) @@ -260,7 +273,7 @@ $$(optimizing_test_rule): # Define a phony rule to run both the default and interpreter variants. all_test_rule := test-art-host-oat-$(1)$$($(2)ART_PHONY_TEST_HOST_SUFFIX) .PHONY: $$(all_test_rule) -$$(all_test_rule): $$(default_test_rule) $$(interpreter_test_rule) $$(optimizing_test_rule) +$$(all_test_rule): $$(default_test_rule) $$(gcverify_test_rule) $$(interpreter_test_rule) $$(optimizing_test_rule) $(hide) $$(call ART_TEST_PREREQ_FINISHED,$$@) ART_TEST_HOST_OAT$$($(2)ART_PHONY_TEST_HOST_SUFFIX)_RULES += $$(all_test_rule) @@ -269,6 +282,7 @@ $$(all_test_rule): $$(default_test_rule) $$(interpreter_test_rule) $$(optimizing # Clear locally defined variables. default_test_rule := + gcverify_test_rule := optimizing_test_rule := interpreter_test_rule := all_test_rule := diff --git a/test/Android.run-test.mk b/test/Android.run-test.mk index 80ffcbb..6fcb11b 100644 --- a/test/Android.run-test.mk +++ b/test/Android.run-test.mk @@ -163,7 +163,7 @@ endif # $(2): host or target # $(3): default, optimizing or interpreter # $(4): 32 or 64 -# $(5): run tests with tracing enabled or not: trace or undefined +# $(5): run tests with tracing or GC verification enabled or not: trace, gcverify or undefined define define-test-art-run-test run_test_options := $(addprefix --runtime-option ,$(DALVIKVM_FLAGS)) run_test_rule_name := test-art-$(2)-run-test-$(3)-$(1)$(4) @@ -215,8 +215,17 @@ define define-test-art-run-test skip_test := true endif else - ifneq (,$(5)) - $$(error found $(5) expected undefined or -trace) + ifeq ($(5),gcverify) + run_test_options += --runtime-option -Xgc:preverify --runtime-option -Xgc:postverify \ + --runtime-option -Xgc:preverify_rosalloc --runtime-option -Xgc:postverify_rosalloc + run_test_rule_name := test-art-$(2)-run-test-gcverify-$(3)-$(1)$(4) + ifneq ($$(ART_TEST_GC_VERIFY),true) + skip_test := true + endif + else + ifneq (,$(5)) + $$(error found $(5) expected undefined or -trace) + endif endif endif ifeq ($$(skip_test),false) @@ -289,6 +298,9 @@ define define-test-art-run-test-group $$(eval $$(call define-test-art-run-test,$(1),$(2),default,$$(ART_PHONY_TEST_$$(group_uc_host_or_target)_SUFFIX),trace)) $$(eval $$(call define-test-art-run-test,$(1),$(2),interpreter,$$(ART_PHONY_TEST_$$(group_uc_host_or_target)_SUFFIX),trace)) $$(eval $$(call define-test-art-run-test,$(1),$(2),optimizing,$$(ART_PHONY_TEST_$$(group_uc_host_or_target)_SUFFIX),trace)) + $$(eval $$(call define-test-art-run-test,$(1),$(2),default,$$(ART_PHONY_TEST_$$(group_uc_host_or_target)_SUFFIX),gcverify)) + $$(eval $$(call define-test-art-run-test,$(1),$(2),interpreter,$$(ART_PHONY_TEST_$$(group_uc_host_or_target)_SUFFIX),gcverify)) + $$(eval $$(call define-test-art-run-test,$(1),$(2),optimizing,$$(ART_PHONY_TEST_$$(group_uc_host_or_target)_SUFFIX),gcverify)) do_second := false ifeq ($(2),host) ifneq ($$(HOST_PREFER_32_BIT),true) @@ -306,6 +318,9 @@ define define-test-art-run-test-group $$(eval $$(call define-test-art-run-test,$(1),$(2),default,$$(2ND_ART_PHONY_TEST_$$(group_uc_host_or_target)_SUFFIX),trace)) $$(eval $$(call define-test-art-run-test,$(1),$(2),interpreter,$$(2ND_ART_PHONY_TEST_$$(group_uc_host_or_target)_SUFFIX),trace)) $$(eval $$(call define-test-art-run-test,$(1),$(2),optimizing,$$(2ND_ART_PHONY_TEST_$$(group_uc_host_or_target)_SUFFIX),trace)) + $$(eval $$(call define-test-art-run-test,$(1),$(2),default,$$(2ND_ART_PHONY_TEST_$$(group_uc_host_or_target)_SUFFIX),gcverify)) + $$(eval $$(call define-test-art-run-test,$(1),$(2),interpreter,$$(2ND_ART_PHONY_TEST_$$(group_uc_host_or_target)_SUFFIX),gcverify)) + $$(eval $$(call define-test-art-run-test,$(1),$(2),optimizing,$$(2ND_ART_PHONY_TEST_$$(group_uc_host_or_target)_SUFFIX),gcverify)) endif $$(eval $$(call define-test-art-run-test-group-rule,test-art-$(2)-run-test-default-$(1), \ diff --git a/test/run-test b/test/run-test index 2989f25..1df0ec2 100755 --- a/test/run-test +++ b/test/run-test @@ -241,7 +241,7 @@ if [ "$usage" = "yes" ]; then echo " Runtime Options:" echo " -O Run non-debug rather than debug build (off by default)." echo " -Xcompiler-option Pass an option to the compiler." - echo " -runtime-option Pass an option to the runtime." + echo " --runtime-option Pass an option to the runtime." echo " --debug Wait for a debugger to attach." echo " --gdb Run under gdb; incompatible with some tests." echo " --build-only Build test files only (off by default)." |