#
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# 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.
#
#
# Makefile to run various jdk tests
#
# Empty these to get rid of some default rules
.SUFFIXES:
CO=
GET=
# Utilities used
CD = cd
ECHO = echo
PWD = pwd
# Get OS name from uname
# Commands to run on paths to make mixed paths for java on windows
# Location of developer shared files
# Platform specific settings
# Check for unknown arch, try uname -p if uname -m says unknown
# Check for unknown arch, try uname -p if uname -m says unknown
# GNU Make or MKS overrides $(PROCESSOR_ARCHITECTURE) to always
# return "x86". Use the first word of $(PROCESSOR_IDENTIFIER) instead.
else
SLASH_JAVA = J:
# These need to be different depending on MKS or CYGWIN
else
# Only want major and minor numbers from os version
# Name to use for x86_64 arch (historically amd64, but should change someday)
#OS_ARCH_X64_NAME:=x64
# Alternate arch names (in case this arch is known by a second name)
# PROBLEM_LISTS may use either name.
#OS_ARCH2-x64:=amd64
# Try and use the arch names consistently
# Default ARCH_DATA_MODEL settings
# If ARCH_DATA_MODEL is not defined, try and pick a reasonable default
# Platform directory name
# Check ARCH_DATA_MODEL, adjust OS_ARCH accordingly on solaris
else
else
# Alternate OS_ARCH name (defaults to OS_ARCH)
# Root of this test area (important to use full paths in some places)
# Root of all test results
else
# Expect JPRT to set PRODUCT_HOME (the product or jdk in this case to test)
# Try to use j2sdk-image if it exists
PRODUCT_HOME := \
$(shell \
else \
fi)
# Expect JPRT to set JPRT_PRODUCT_ARGS (e.g. -server etc.)
# Should be passed into 'java' only.
# Could include: -d64 -server -client OR any java option
# Expect JPRT to set JPRT_PRODUCT_VM_ARGS (e.g. -Xcomp etc.)
# Should be passed into anything running the vm (java, javac, javadoc, ...).
# Check JAVA_ARGS arguments based on ARCH_DATA_MODEL etc.
D64_ERROR_MESSAGE=Mismatch between ARCH_DATA_MODEL=$(ARCH_DATA_MODEL) and use of -d64 in JAVA_ARGS=$(JAVA_ARGS)
# Macro to run make and set the shared library permissions
# Expect JPRT to set JPRT_ARCHIVE_BUNDLE (path to zip bundle for results)
# How to create the test bundle (pass or fail, we want to create this)
# Follow command with ";$(BUNDLE_UP_AND_EXIT)", so it always gets executed.
TESTEXIT = \
if [ ! -s $(EXITCODE) ] ; then \
$(ECHO) "ERROR: EXITCODE file not filled in."; \
fi ; \
$(ECHO) "EXIT CODE: $${testExitCode}"; \
exit $${testExitCode}
( \
jtregExitCode=$$? && \
if [ -r "$${_summary}" ] ; then \
if [ $${jtregExitCode} = 0 ] ; then \
jtregExitCode=1; \
fi; \
fi; \
$(ECHO) "TEST STATS: name=$(UNIQUE_DIR) run=$${runc} pass=$${passc} fail=$${failc} excluded=$${exclc}" \
else \
fi; \
fi; \
)
################################################################
# Default make rule (runs jtreg_tests)
@$(ECHO) "Testing completed successfully"
# Prep for output
@$(MKDIR) -p $(ABS_TEST_OUTPUT_DIR)
# Cleanup
$(RM) -r $(ABS_TEST_OUTPUT_DIR)
$(RM) $(ARCHIVE_BUNDLE)
################################################################
# jtreg tests
# Expect JT_HOME to be set for jtreg tests. (home for jtreg)
# Expect JPRT to set TESTDIRS to the jtreg test dirs
# Agentvm settings (default is false)
USE_JTREG_AGENTVM=false
# With agentvm, you cannot use -javaoptions?
else
# Some tests annoy me and fail frequently
# Create exclude list for this platform and arch
@$(ECHO) "NOTHING_EXCLUDED" > $@
else
done
# Select list of directories that exist
# Running batches of tests with or without agentvm
$(ECHO) "Running tests in agentvm mode: $?"
$(ECHO) "Running tests in othervm mode: $?"
$(ECHO) "########################################################"
$(ECHO) "########################################################"
# ------------------------------------------------------------------
# Batches of tests (somewhat arbitrary assigments to jdk_* targets)
# Stable othervm testruns (minus items from PROBLEM_LIST)
# Using samevm has problems, and doesn't help performance as much as others.
# Stable samevm testruns (minus items from PROBLEM_LIST)
jdk_beans1: $(call TestDirs, \
# Stable othervm testruns (minus items from PROBLEM_LIST)
# Using samevm has serious problems with these tests
jdk_beans2: $(call TestDirs, \
# Stable othervm testruns (minus items from PROBLEM_LIST)
# Using agentvm has serious problems with these tests
# All beans tests
@$(SummaryInfo)
# Stable agentvm testruns (minus items from PROBLEM_LIST)
# Stable othervm testruns (minus items from PROBLEM_LIST)
# Using agentvm has serious problems with these tests
else
# Stable agentvm testruns (minus items from PROBLEM_LIST)
# Stable othervm testruns (minus items from PROBLEM_LIST)
# Using agentvm has serious problems with these tests
# Stable othervm testruns (minus items from PROBLEM_LIST)
# Using agentvm has serious problems with these tests
# Stable samevm testruns (minus items from PROBLEM_LIST)
# Stable samevm testruns (minus items from PROBLEM_LIST)
# Stable samevm testruns (minus items from PROBLEM_LIST)
# Stable samevm testruns (minus items from PROBLEM_LIST)
# Stable samevm testruns (minus items from PROBLEM_LIST)
# Stable othervm testruns (minus items from PROBLEM_LIST)
# Using samevm has serious problems with these tests
# Stable samevm testruns (minus items from PROBLEM_LIST)
# Stable othervm testruns (minus items from PROBLEM_LIST)
# Using samevm has serious problems with these tests
# Stable othervm testruns (minus items from PROBLEM_LIST)
# Using samevm has serious problems with these tests
# All security tests
@$(SummaryInfo)
# Stable samevm testruns (minus items from PROBLEM_LIST)
# Stable othervm testruns (minus items from PROBLEM_LIST)
# Using samevm has problems, and doesn't help performance as much as others.
# Stable samevm testruns (minus items from PROBLEM_LIST)
# Stable samevm testruns (minus items from PROBLEM_LIST)
# Stable othervm testruns (minus items from PROBLEM_LIST)
# Using samevm has serious problems with these tests
# Stable samevm testruns (minus items from PROBLEM_LIST)
# ------------------------------------------------------------------
# Run all tests
@$(SummaryInfo)
# These are all phony targets
PHONY_LIST += $(JDK_ALL_TARGETS)
# ------------------------------------------------------------------
# Default JTREG to run (win32 script works for everybody)
# Add any extra options (agentvm etc.)
# Only run automatic tests
JTREG_BASIC_OPTIONS += -a
# Always turn on assertions
# Report details on all failed or error tests, times too
# Retain all files for failing tests
# Ignore tests are not run and completely silent about it
# Multiple by 4 the timeout numbers
# Boost the max memory for jtreg to avoid gc thrashing
# Make sure jtreg exists
# Run jtreg
@$(EXPAND) $(EXCLUDELIST) \
| $(SED) -e 's@^@Excluding: @'
( \
export JT_HOME; \
# Rule that may change execute permissions on shared library files.
# Files in repositories should never have execute permissions, but there
# are some tests that have pre-built shared libraries, and these windows
# dll files must have execute permission. Adding execute permission
# may happen automatically on windows when using certain versions of mercurial
# but it cannot be guaranteed. And blindly adding execute permission might
# be seen as a mercurial 'change', so we avoid adding execute permission to
# repository files. But testing from a plain source tree needs the chmod a+rx.
# Used on select directories and applying the chmod to all shared libraries
# not just dll files. On windows, this may not work with MKS if the files
# were installed with CYGWIN unzip or untar (MKS chmod may not do anything).
# And with CYGWIN and sshd service, you may need CYGWIN=ntsec for this to work.
#
fi
################################################################
# packtest
# Expect JPRT to set JPRT_PACKTEST_HOME.
) ; $(BUNDLE_UP_AND_EXIT)
################################################################
# perftest to collect statistics
# Expect JPRT to set JPRT_PACKTEST_HOME.
) ; $(BUNDLE_UP_AND_EXIT)
################################################################
# vmsqe tests
# Expect JPRT to set JPRT_VMSQE_HOME.
# Expect JPRT to set JPRT_RUNVMSQE_HOME.
# Expect JPRT to set JPRT_TONGA3_HOME.
) ; $(BUNDLE_UP_AND_EXIT)
################################################################
# jck tests
# Expect JPRT to set JPRT_JCK7COMPILER_HOME.
# Expect JPRT to set JPRT_JCK7RUNTIME_HOME.
# Expect JPRT to set JPRT_JCK7DEVTOOLS_HOME.
# The jtjck.jar utility to use to run the tests
# Default tests to run
# Generic rule used to run jck tests
@$(EXPAND) $(EXCLUDELIST) \
| $(SED) -e 's@^@Excluding: @'
) ; $(BUNDLE_UP_AND_EXIT)
# JCK7 compiler tests
$(MAKE) UNIQUE_DIR=$@ \
# JCK7 runtime tests
$(MAKE) UNIQUE_DIR=$@ \
JCK_HOME=$(JCK7RUNTIME_HOME) \
# JCK7 devtools tests
$(MAKE) UNIQUE_DIR=$@ \
# Run all 3 sets of JCK7 tests
################################################################
# Phony targets (e.g. these are not filenames)
################################################################