8177458: [s390] (jdk10) build broken after 8155672
Reviewed-by: simonis
## Copyright (c) 1995, 2016, Oracle and/or its affiliates. All rights reserved.# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.## This code is free software; you can redistribute it and/or modify it# under the terms of the GNU General Public License version 2 only, as# published by the Free Software Foundation. Oracle designates this# particular file as subject to the "Classpath" exception as provided# by Oracle in the LICENSE file that accompanied this code.## This code is distributed in the hope that it will be useful, but WITHOUT# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License# version 2 for more details (a copy is included in the LICENSE file that# accompanied this code).## You should have received a copy of the GNU General Public License version# 2 along with this work; if not, write to the Free Software Foundation,# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.## Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA# or visit www.oracle.com if you need additional information or have any# questions.##NATIVE_TEST_PATH := hotspot/jtreg/nativeTREAT_EXIT_CODE_1_AS_0 := trueCLEAN_BEFORE_PREP := trueUSE_JTREG_VERSION := 4.1USE_JTREG_ASSERT := falseLIMIT_JTREG_VM_MEMORY := falseIGNORE_MARKED_TESTS := true# Get OS name from uname (Cygwin inexplicably adds _NT-5.1)UNAME_S := $(shell uname -s | cut -f1 -d_)ifeq ($(UNAME_S), SunOS) NUM_CORES := $(shell LC_MESSAGES=C /usr/sbin/psrinfo -v | grep -c on-line)endififeq ($(UNAME_S), Linux) NUM_CORES := $(shell cat /proc/cpuinfo | grep -c processor)endififeq ($(UNAME_S), Darwin) NUM_CORES := $(shell /usr/sbin/sysctl -n hw.ncpu)endififeq ($(findstring CYGWIN,$(UNAME_S)), CYGWIN) ifneq ($(NUMBER_OF_PROCESSORS), ) NUM_CORES := $(NUMBER_OF_PROCESSORS) else ifneq ($(HOTSPOT_BUILD_JOBS), ) NUM_CORES := $(HOTSPOT_BUILD_JOBS) else NUM_CORES := 1 # fallback endif endifendif# Concurrency based on min(cores / 2, 12)CONCURRENCY := $(shell expr $(NUM_CORES) / 2)ifeq ($(CONCURRENCY), 0) CONCURRENCY := 1else ifeq ($(shell expr $(CONCURRENCY) \> 12), 1) CONCURRENCY := 12endif# Make sure MaxRAMFraction is high enough to not cause OOM or swapping since we may end up with a lot of JVM'sJTREG_BASIC_OPTIONS += -vmoption:-XX:MaxRAMFraction=$(shell expr $(CONCURRENCY) \* 4)# Include the common base file with most of the logicinclude ../../test/TestCommon.gmk################################################################# Default make rule (runs jtreg_tests)all: hotspot_all @$(ECHO) "Testing completed successfully"# Support "hotspot_" prefixed test make targets (too)# The hotspot_% targets are used by the top level Makefile# Unless explicitly defined below, hotspot_<x> is interpreted as a jtreg test group namehotspot_%: $(ECHO) "Running tests: $@" $(MAKE) -j 1 TEST_SELECTION=":$@" UNIQUE_DIR=$@ jtreg_tests;hotspot_internal: $(ALT_OUTPUTDIR)/jdk/bin/java -XX:+ExecuteInternalVMTests -XX:+ShowMessageBoxOnError -version################################################################ALT_MAKE ?= closed-include $(ALT_MAKE)/Makefile# flags used to execute java in test targetsTEST_FLAGS += -version -Xinternalversion -X -helpsanitytest: prep $(PRODUCT_HOME) @for flag in $(TEST_FLAGS); \ do \ echo Executing java $(JAVA_OPTIONS) $$flag; \ $(PRODUCT_HOME)/bin/java $(JAVA_OPTIONS) $$flag; \ res=$$?; \ if [ $$res -ne 0 ]; then \ exit $$res; \ fi; \ donePHONY_LIST += sanitytest################################################################# basicvmtest (make sure various basic java options work)# Set up the directory in which the jvm directories live (client/, server/, etc.)ifeq ($(PLATFORM),windows)JVMS_DIR := $(PRODUCT_HOME)/binelseJVMS_DIR := $(PRODUCT_HOME)/libendif# Use the existance of a directory as a sign that jvm variant is availableCANDIDATE_JVM_VARIANTS := client minimal serverJVM_VARIANTS := $(strip $(foreach x,$(CANDIDATE_JVM_VARIANTS),$(if $(wildcard $(JVMS_DIR)/$(x)),$(x))))hotspot_basicvmtest: for variant in $(JVM_VARIANTS); \ do \ $(MAKE) JAVA_ARGS="$(JAVA_ARGS) -$$variant" hotspot_$${variant}test; \ res=$$?; \ if [ $$res -ne 0 ]; then \ exit $$res; \ fi; \ donePHONY_LIST += hotspot_basicvmtest################################################################# clienttest (make sure various basic java client options work)hotspot_clienttest clienttest: sanitytest $(RM) $(PRODUCT_HOME)/jre/lib/*/client/classes.jsa $(RM) $(PRODUCT_HOME)/jre/bin/client/classes.jsa $(PRODUCT_HOME)/bin/java $(JAVA_OPTIONS) -Xshare:dumpPHONY_LIST += hotspot_clienttest clienttest################################################################# minimaltest (make sure various basic java minimal options work)hotspot_minimaltest minimaltest: sanitytestPHONY_LIST += hotspot_minimaltest minimaltest################################################################# servertest (make sure various basic java server options work)hotspot_servertest servertest: sanitytestPHONY_LIST += hotspot_servertest servertest################################################################# Run the native gtest tests from the test imagedefine NEWLINEendefhotspot_gtest: $(foreach v, $(JVM_VARIANTS), \ $(MAKE) hotspot_gtest$v $(NEWLINE) )hotspot_gtestserver hotspot_gtestclient hotspot_gtestminimal: hotspot_gtest%: $(TESTNATIVE_DIR)/hotspot/gtest/$*/gtestLauncher \ -jdk $(shell $(GETMIXEDPATH) "$(PRODUCT_HOME)")PHONY_LIST += hotspot_gtest hotspot_gtestserver hotspot_gtestclient \ hotspot_gtestminimal