78
79 ################################################################
80 # Default make rule (runs jtreg_tests)
81 all: hotspot_all
82 @$(ECHO) "Testing completed successfully"
83
84 # Support "hotspot_" prefixed test make targets (too)
85 # The hotspot_% targets are used by the top level Makefile
86 # Unless explicitly defined below, hotspot_<x> is interpreted as a jtreg test group name
87 hotspot_%:
88 $(ECHO) "Running tests: $@"
89 $(MAKE) -j 1 TEST_SELECTION=":$@" UNIQUE_DIR=$@ jtreg_tests;
90
91 hotspot_internal:
92 $(ALT_OUTPUTDIR)/jdk/bin/java -XX:+ExecuteInternalVMTests -XX:+ShowMessageBoxOnError -version
93
94 ################################################################
95 ALT_MAKE ?= closed
96 -include $(ALT_MAKE)/Makefile
97
98 # flags used to execute java in test targets
99 TEST_FLAGS += -version -Xinternalversion -X -help
100
101 sanitytest: prep $(PRODUCT_HOME)
102 @for flag in $(TEST_FLAGS); \
103 do \
104 echo Executing java $(JAVA_OPTIONS) $$flag; \
105 $(PRODUCT_HOME)/bin/java $(JAVA_OPTIONS) $$flag; \
106 res=$$?; \
107 if [ $$res -ne 0 ]; then \
108 exit $$res; \
109 fi; \
110 done
111
112 PHONY_LIST += sanitytest
113
114 ################################################################
115
116 # basicvmtest (make sure various basic java options work)
117
118 # Set up the directory in which the jvm directories live (client/, server/, etc.)
119 ifeq ($(PLATFORM),windows)
120 JVMS_DIR := $(PRODUCT_HOME)/bin
121 else
122 JVMS_DIR := $(PRODUCT_HOME)/lib
123 endif
124
125 # Use the existance of a directory as a sign that jvm variant is available
126 CANDIDATE_JVM_VARIANTS := client minimal server
127 JVM_VARIANTS := $(strip $(foreach x,$(CANDIDATE_JVM_VARIANTS),$(if $(wildcard $(JVMS_DIR)/$(x)),$(x))))
128
129 hotspot_basicvmtest:
130 for variant in $(JVM_VARIANTS); \
131 do \
132 $(MAKE) JAVA_ARGS="$(JAVA_ARGS) -$$variant" hotspot_$${variant}test; \
133 res=$$?; \
134 if [ $$res -ne 0 ]; then \
135 exit $$res; \
136 fi; \
137 done
138
139 PHONY_LIST += hotspot_basicvmtest
140
141 ################################################################
142
143 # clienttest (make sure various basic java client options work)
144
145 hotspot_clienttest clienttest: sanitytest
146 $(RM) $(PRODUCT_HOME)/jre/lib/*/client/classes.jsa
147 $(RM) $(PRODUCT_HOME)/jre/bin/client/classes.jsa
148 $(PRODUCT_HOME)/bin/java $(JAVA_OPTIONS) -Xshare:dump
149
150 PHONY_LIST += hotspot_clienttest clienttest
151
152 ################################################################
153
154 # minimaltest (make sure various basic java minimal options work)
155
156 hotspot_minimaltest minimaltest: sanitytest
157
158 PHONY_LIST += hotspot_minimaltest minimaltest
159
160 ################################################################
161
162 # servertest (make sure various basic java server options work)
163
164 hotspot_servertest servertest: sanitytest
165
166 PHONY_LIST += hotspot_servertest servertest
167
168 ################################################################
169
170 # Run the native gtest tests from the test image
171
172 define NEWLINE
173
174
175 endef
176
177
178 hotspot_gtest:
179 $(foreach v, $(JVM_VARIANTS), \
180 $(MAKE) hotspot_gtest$v $(NEWLINE) )
181
182 hotspot_gtestserver hotspot_gtestclient hotspot_gtestminimal: hotspot_gtest%:
183 $(TESTNATIVE_DIR)/hotspot/gtest/$*/gtestLauncher \
184 -jdk $(shell $(GETMIXEDPATH) "$(PRODUCT_HOME)")
185
186 PHONY_LIST += hotspot_gtest hotspot_gtestserver hotspot_gtestclient \
187 hotspot_gtestminimal
|
78
79 ################################################################
80 # Default make rule (runs jtreg_tests)
81 all: hotspot_all
82 @$(ECHO) "Testing completed successfully"
83
84 # Support "hotspot_" prefixed test make targets (too)
85 # The hotspot_% targets are used by the top level Makefile
86 # Unless explicitly defined below, hotspot_<x> is interpreted as a jtreg test group name
87 hotspot_%:
88 $(ECHO) "Running tests: $@"
89 $(MAKE) -j 1 TEST_SELECTION=":$@" UNIQUE_DIR=$@ jtreg_tests;
90
91 hotspot_internal:
92 $(ALT_OUTPUTDIR)/jdk/bin/java -XX:+ExecuteInternalVMTests -XX:+ShowMessageBoxOnError -version
93
94 ################################################################
95 ALT_MAKE ?= closed
96 -include $(ALT_MAKE)/Makefile
97
98 ################################################################
99
100 # Set up the directory in which the jvm directories live (client/, server/, etc.)
101 ifeq ($(PLATFORM),windows)
102 JVMS_DIR := $(PRODUCT_HOME)/bin
103 else
104 JVMS_DIR := $(PRODUCT_HOME)/lib
105 endif
106
107 # Use the existance of a directory as a sign that jvm variant is available
108 CANDIDATE_JVM_VARIANTS := client minimal server
109 JVM_VARIANTS := $(strip $(foreach x,$(CANDIDATE_JVM_VARIANTS),$(if $(wildcard $(JVMS_DIR)/$(x)),$(x))))
110
111 ################################################################
112
113 # Run the native gtest tests from the test image
114
115 define NEWLINE
116
117
118 endef
119
120
121 hotspot_gtest:
122 $(foreach v, $(JVM_VARIANTS), \
123 $(MAKE) hotspot_gtest$v $(NEWLINE) )
124
125 hotspot_gtestserver hotspot_gtestclient hotspot_gtestminimal: hotspot_gtest%:
126 $(TESTNATIVE_DIR)/hotspot/gtest/$*/gtestLauncher \
127 -jdk $(shell $(GETMIXEDPATH) "$(PRODUCT_HOME)")
128
129 PHONY_LIST += hotspot_gtest hotspot_gtestserver hotspot_gtestclient \
130 hotspot_gtestminimal
|