mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-27 23:04:50 +02:00
Merge
This commit is contained in:
commit
1d67e1d25c
10 changed files with 171 additions and 184 deletions
|
@ -295,3 +295,9 @@ jprt.test.targets = \
|
||||||
${jprt.my.windows.i586.test.targets}, \
|
${jprt.my.windows.i586.test.targets}, \
|
||||||
${jprt.my.windows.x64.test.targets}
|
${jprt.my.windows.x64.test.targets}
|
||||||
|
|
||||||
|
# The default test/Makefile targets that should be run
|
||||||
|
|
||||||
|
# Example:
|
||||||
|
# jprt.make.rule.test.targets=*-*-*-packtest
|
||||||
|
#jprt.make.rule.test.targets=*-product-*-packtest
|
||||||
|
|
||||||
|
|
|
@ -1129,8 +1129,8 @@ void LIR_Assembler::stack2stack(LIR_Opr src, LIR_Opr dest, BasicType type) {
|
||||||
#else
|
#else
|
||||||
__ pushl(frame_map()->address_for_slot(src ->double_stack_ix(), 0));
|
__ pushl(frame_map()->address_for_slot(src ->double_stack_ix(), 0));
|
||||||
// push and pop the part at src + wordSize, adding wordSize for the previous push
|
// push and pop the part at src + wordSize, adding wordSize for the previous push
|
||||||
__ pushl(frame_map()->address_for_slot(src ->double_stack_ix(), wordSize));
|
__ pushl(frame_map()->address_for_slot(src ->double_stack_ix(), 2 * wordSize));
|
||||||
__ popl (frame_map()->address_for_slot(dest->double_stack_ix(), wordSize));
|
__ popl (frame_map()->address_for_slot(dest->double_stack_ix(), 2 * wordSize));
|
||||||
__ popl (frame_map()->address_for_slot(dest->double_stack_ix(), 0));
|
__ popl (frame_map()->address_for_slot(dest->double_stack_ix(), 0));
|
||||||
#endif // _LP64
|
#endif // _LP64
|
||||||
|
|
||||||
|
|
|
@ -157,6 +157,7 @@ Node *AddNode::Ideal(PhaseGVN *phase, bool can_reshape) {
|
||||||
Node *a12 = add1->in(2);
|
Node *a12 = add1->in(2);
|
||||||
const Type *t12 = phase->type( a12 );
|
const Type *t12 = phase->type( a12 );
|
||||||
if( t12->singleton() && t12 != Type::TOP && (add1 != add1->in(1)) ) {
|
if( t12->singleton() && t12 != Type::TOP && (add1 != add1->in(1)) ) {
|
||||||
|
assert(add1->in(1) != this, "dead loop in AddNode::Ideal");
|
||||||
add2 = add1->clone();
|
add2 = add1->clone();
|
||||||
add2->set_req(2, in(2));
|
add2->set_req(2, in(2));
|
||||||
add2 = phase->transform(add2);
|
add2 = phase->transform(add2);
|
||||||
|
@ -173,6 +174,7 @@ Node *AddNode::Ideal(PhaseGVN *phase, bool can_reshape) {
|
||||||
Node *a22 = add2->in(2);
|
Node *a22 = add2->in(2);
|
||||||
const Type *t22 = phase->type( a22 );
|
const Type *t22 = phase->type( a22 );
|
||||||
if( t22->singleton() && t22 != Type::TOP && (add2 != add2->in(1)) ) {
|
if( t22->singleton() && t22 != Type::TOP && (add2 != add2->in(1)) ) {
|
||||||
|
assert(add2->in(1) != this, "dead loop in AddNode::Ideal");
|
||||||
Node *addx = add2->clone();
|
Node *addx = add2->clone();
|
||||||
addx->set_req(1, in(1));
|
addx->set_req(1, in(1));
|
||||||
addx->set_req(2, add2->in(1));
|
addx->set_req(2, add2->in(1));
|
||||||
|
|
|
@ -2082,7 +2082,7 @@ static void final_graph_reshaping_impl( Node *n, Final_Reshape_Counts &fpu ) {
|
||||||
in2 = n->in(2)->in(1);
|
in2 = n->in(2)->in(1);
|
||||||
} else if ( n->in(2)->Opcode() == Op_ConP ) {
|
} else if ( n->in(2)->Opcode() == Op_ConP ) {
|
||||||
const Type* t = n->in(2)->bottom_type();
|
const Type* t = n->in(2)->bottom_type();
|
||||||
if (t == TypePtr::NULL_PTR) {
|
if (t == TypePtr::NULL_PTR && UseImplicitNullCheckForNarrowOop) {
|
||||||
Node *in1 = n->in(1);
|
Node *in1 = n->in(1);
|
||||||
if (Matcher::clone_shift_expressions) {
|
if (Matcher::clone_shift_expressions) {
|
||||||
// x86, ARM and friends can handle 2 adds in addressing mode.
|
// x86, ARM and friends can handle 2 adds in addressing mode.
|
||||||
|
|
|
@ -932,7 +932,7 @@ void PhaseIdealLoop::split_if_with_blocks_post( Node *n ) {
|
||||||
// to fold a StoreP and an AddP together (as part of an
|
// to fold a StoreP and an AddP together (as part of an
|
||||||
// address expression) and the AddP and StoreP have
|
// address expression) and the AddP and StoreP have
|
||||||
// different controls.
|
// different controls.
|
||||||
if( !x->is_Load() ) _igvn._worklist.yank(x);
|
if( !x->is_Load() && !x->is_DecodeN() ) _igvn._worklist.yank(x);
|
||||||
}
|
}
|
||||||
_igvn.remove_dead_node(n);
|
_igvn.remove_dead_node(n);
|
||||||
}
|
}
|
||||||
|
|
|
@ -1205,6 +1205,13 @@ void Arguments::set_ergonomics_flags() {
|
||||||
warning(" UseCompressedOops does not currently work with UseG1GC; switching off UseCompressedOops. ");
|
warning(" UseCompressedOops does not currently work with UseG1GC; switching off UseCompressedOops. ");
|
||||||
FLAG_SET_DEFAULT(UseCompressedOops, false);
|
FLAG_SET_DEFAULT(UseCompressedOops, false);
|
||||||
}
|
}
|
||||||
|
#ifdef _WIN64
|
||||||
|
if (UseLargePages && UseCompressedOops) {
|
||||||
|
// Cannot allocate guard pages for implicit checks in indexed addressing
|
||||||
|
// mode, when large pages are specified on windows.
|
||||||
|
FLAG_SET_DEFAULT(UseImplicitNullCheckForNarrowOop, false);
|
||||||
|
}
|
||||||
|
#endif // _WIN64
|
||||||
} else {
|
} else {
|
||||||
if (UseCompressedOops && !FLAG_IS_DEFAULT(UseCompressedOops)) {
|
if (UseCompressedOops && !FLAG_IS_DEFAULT(UseCompressedOops)) {
|
||||||
warning("Max heap size too large for Compressed Oops");
|
warning("Max heap size too large for Compressed Oops");
|
||||||
|
|
|
@ -306,6 +306,9 @@ class CommandLineFlags {
|
||||||
lp64_product(bool, CheckCompressedOops, trueInDebug, \
|
lp64_product(bool, CheckCompressedOops, trueInDebug, \
|
||||||
"generate checks in encoding/decoding code") \
|
"generate checks in encoding/decoding code") \
|
||||||
\
|
\
|
||||||
|
product(bool, UseImplicitNullCheckForNarrowOop, true, \
|
||||||
|
"generate implicit null check in indexed addressing mode.") \
|
||||||
|
\
|
||||||
/* UseMembar is theoretically a temp flag used for memory barrier \
|
/* UseMembar is theoretically a temp flag used for memory barrier \
|
||||||
* removal testing. It was supposed to be removed before FCS but has \
|
* removal testing. It was supposed to be removed before FCS but has \
|
||||||
* been re-added (see 6401008) */ \
|
* been re-added (see 6401008) */ \
|
||||||
|
|
|
@ -2777,13 +2777,17 @@ void Threads::threads_do(ThreadClosure* tc) {
|
||||||
// For now, just manually iterate through them.
|
// For now, just manually iterate through them.
|
||||||
tc->do_thread(VMThread::vm_thread());
|
tc->do_thread(VMThread::vm_thread());
|
||||||
Universe::heap()->gc_threads_do(tc);
|
Universe::heap()->gc_threads_do(tc);
|
||||||
{
|
|
||||||
// Grab the Terminator_lock to prevent watcher_thread from being terminated.
|
|
||||||
MutexLockerEx mu(Terminator_lock, Mutex::_no_safepoint_check_flag);
|
|
||||||
WatcherThread *wt = WatcherThread::watcher_thread();
|
WatcherThread *wt = WatcherThread::watcher_thread();
|
||||||
|
// Strictly speaking, the following NULL check isn't sufficient to make sure
|
||||||
|
// the data for WatcherThread is still valid upon being examined. However,
|
||||||
|
// considering that WatchThread terminates when the VM is on the way to
|
||||||
|
// exit at safepoint, the chance of the above is extremely small. The right
|
||||||
|
// way to prevent termination of WatcherThread would be to acquire
|
||||||
|
// Terminator_lock, but we can't do that without violating the lock rank
|
||||||
|
// checking in some cases.
|
||||||
if (wt != NULL)
|
if (wt != NULL)
|
||||||
tc->do_thread(wt);
|
tc->do_thread(wt);
|
||||||
}
|
|
||||||
// If CompilerThreads ever become non-JavaThreads, add them here
|
// If CompilerThreads ever become non-JavaThreads, add them here
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -372,7 +372,8 @@ ReservedHeapSpace::ReservedHeapSpace(size_t size, size_t alignment,
|
||||||
bool large, char* requested_address) :
|
bool large, char* requested_address) :
|
||||||
ReservedSpace(size, alignment, large,
|
ReservedSpace(size, alignment, large,
|
||||||
requested_address,
|
requested_address,
|
||||||
UseCompressedOops ? lcm(os::vm_page_size(), alignment) : 0) {
|
UseCompressedOops && UseImplicitNullCheckForNarrowOop ?
|
||||||
|
lcm(os::vm_page_size(), alignment) : 0) {
|
||||||
// Only reserved space for the java heap should have a noaccess_prefix
|
// Only reserved space for the java heap should have a noaccess_prefix
|
||||||
// if using compressed oops.
|
// if using compressed oops.
|
||||||
protect_noaccess_prefix(size);
|
protect_noaccess_prefix(size);
|
||||||
|
@ -383,7 +384,8 @@ ReservedHeapSpace::ReservedHeapSpace(const size_t prefix_size,
|
||||||
const size_t suffix_size,
|
const size_t suffix_size,
|
||||||
const size_t suffix_align) :
|
const size_t suffix_align) :
|
||||||
ReservedSpace(prefix_size, prefix_align, suffix_size, suffix_align,
|
ReservedSpace(prefix_size, prefix_align, suffix_size, suffix_align,
|
||||||
UseCompressedOops ? lcm(os::vm_page_size(), prefix_align) : 0) {
|
UseCompressedOops && UseImplicitNullCheckForNarrowOop ?
|
||||||
|
lcm(os::vm_page_size(), prefix_align) : 0) {
|
||||||
protect_noaccess_prefix(prefix_size+suffix_size);
|
protect_noaccess_prefix(prefix_size+suffix_size);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
#
|
#
|
||||||
# Copyright 2006 Sun Microsystems, Inc. All Rights Reserved.
|
# Copyright 1995-2008 Sun Microsystems, Inc. All Rights Reserved.
|
||||||
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
#
|
#
|
||||||
# This code is free software; you can redistribute it and/or modify it
|
# This code is free software; you can redistribute it and/or modify it
|
||||||
|
@ -23,13 +23,14 @@
|
||||||
#
|
#
|
||||||
|
|
||||||
#
|
#
|
||||||
# Makefile to run jtreg
|
# Makefile to run various jdk tests
|
||||||
#
|
#
|
||||||
|
|
||||||
|
# Get OS/ARCH specifics
|
||||||
OSNAME = $(shell uname -s)
|
OSNAME = $(shell uname -s)
|
||||||
|
SLASH_JAVA = /java
|
||||||
ifeq ($(OSNAME), SunOS)
|
ifeq ($(OSNAME), SunOS)
|
||||||
PLATFORM = solaris
|
PLATFORM = solaris
|
||||||
JCT_PLATFORM = solaris
|
|
||||||
ARCH = $(shell uname -p)
|
ARCH = $(shell uname -p)
|
||||||
ifeq ($(ARCH), i386)
|
ifeq ($(ARCH), i386)
|
||||||
ARCH=i586
|
ARCH=i586
|
||||||
|
@ -37,7 +38,6 @@ ifeq ($(OSNAME), SunOS)
|
||||||
endif
|
endif
|
||||||
ifeq ($(OSNAME), Linux)
|
ifeq ($(OSNAME), Linux)
|
||||||
PLATFORM = linux
|
PLATFORM = linux
|
||||||
JCT_PLATFORM = linux
|
|
||||||
ARCH = $(shell uname -m)
|
ARCH = $(shell uname -m)
|
||||||
ifeq ($(ARCH), i386)
|
ifeq ($(ARCH), i386)
|
||||||
ARCH = i586
|
ARCH = i586
|
||||||
|
@ -45,7 +45,7 @@ ifeq ($(OSNAME), Linux)
|
||||||
endif
|
endif
|
||||||
ifeq ($(OSNAME), Windows_NT)
|
ifeq ($(OSNAME), Windows_NT)
|
||||||
PLATFORM = windows
|
PLATFORM = windows
|
||||||
JCT_PLATFORM = win32
|
SLASH_JAVA = J:
|
||||||
ifeq ($(word 1, $(PROCESSOR_IDENTIFIER)),ia64)
|
ifeq ($(word 1, $(PROCESSOR_IDENTIFIER)),ia64)
|
||||||
ARCH = ia64
|
ARCH = ia64
|
||||||
else
|
else
|
||||||
|
@ -59,181 +59,144 @@ ifeq ($(OSNAME), Windows_NT)
|
||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
|
EXESUFFIX = .exe
|
||||||
endif
|
endif
|
||||||
|
|
||||||
# Default bundle of all test results (passed or not)
|
# Utilities used
|
||||||
JPRT_ARCHIVE_BUNDLE=$(TEST_ROOT)/JPRT_ARCHIVE_BUNDLE.zip
|
CD = cd
|
||||||
|
CP = cp
|
||||||
|
ECHO = echo
|
||||||
|
MKDIR = mkdir
|
||||||
|
ZIP = zip
|
||||||
|
|
||||||
# Default home for JTREG
|
# Root of this test area (important to use full paths in some places)
|
||||||
ifeq ($(PLATFORM), windows)
|
|
||||||
JT_HOME = J:/svc/jct-tools3.2.2_01
|
|
||||||
else
|
|
||||||
JT_HOME = /java/svc/jct-tools3.2.2_01
|
|
||||||
endif
|
|
||||||
|
|
||||||
# Default JTREG to run
|
|
||||||
JTREG = $(JT_HOME)/$(JCT_PLATFORM)/bin/jtreg
|
|
||||||
|
|
||||||
# Root of this test area
|
|
||||||
TEST_ROOT := $(shell pwd)
|
TEST_ROOT := $(shell pwd)
|
||||||
|
|
||||||
# Default JDK to test
|
|
||||||
JAVA_HOME = $(TEST_ROOT)/../build/$(PLATFORM)-$(ARCH)
|
|
||||||
|
|
||||||
# The test directories to run
|
|
||||||
DEFAULT_TESTDIRS = serviceability
|
|
||||||
TESTDIRS = $(DEFAULT_TESTDIRS)
|
|
||||||
|
|
||||||
# Files that hold total passed and failed counts (passed==0 is bad)
|
|
||||||
JTREG_TOTALS_DIR = $(TEST_ROOT)/JTREG_TOTALS_$(PLATFORM)_$(ARCH)
|
|
||||||
JTREG_FAILED = $(JTREG_TOTALS_DIR)/failed_count
|
|
||||||
JTREG_PASSED = $(JTREG_TOTALS_DIR)/passed_count
|
|
||||||
|
|
||||||
# Root of all test results
|
# Root of all test results
|
||||||
JTREG_ALL_OUTPUT_DIRNAME = JTREG_OUTPUT_$(PLATFORM)_$(ARCH)
|
ABS_BUILD_ROOT = $(TEST_ROOT)/../build/$(PLATFORM)-$(ARCH)
|
||||||
JTREG_ALL_OUTPUT_DIR = $(TEST_ROOT)/$(JTREG_ALL_OUTPUT_DIRNAME)
|
ABS_TEST_OUTPUT_DIR = $(ABS_BUILD_ROOT)/testoutput
|
||||||
|
|
||||||
# Test results for one test directory
|
# Expect JPRT to set PRODUCT_HOME (the product or jdk in this case to test)
|
||||||
JTREG_TEST_OUTPUT_DIR = $(JTREG_ALL_OUTPUT_DIR)/$@
|
ifndef PRODUCT_HOME
|
||||||
JTREG_TEST_REPORT_DIR = $(JTREG_TEST_OUTPUT_DIR)/JTreport
|
# Try to use j2sdk-image if it exists
|
||||||
JTREG_TEST_WORK_DIR = $(JTREG_TEST_OUTPUT_DIR)/JTwork
|
ABS_JDK_IMAGE = $(ABS_BUILD_ROOT)/j2sdk-image
|
||||||
JTREG_TEST_SUMMARY = $(JTREG_TEST_REPORT_DIR)/summary.txt
|
PRODUCT_HOME := \
|
||||||
|
$(shell \
|
||||||
# Temp files used by this Makefile
|
if [ -d $(ABS_JDK_IMAGE) ] ; then \
|
||||||
JTREG_TEST_TEMP_DIR = $(JTREG_ALL_OUTPUT_DIR)/$@/temp
|
$(ECHO) "$(ABS_JDK_IMAGE)"; \
|
||||||
JTREG_TEMP_PASSED = $(JTREG_TEST_TEMP_DIR)/passed
|
|
||||||
JTREG_TEMP_FAILED = $(JTREG_TEST_TEMP_DIR)/failed
|
|
||||||
JTREG_TEMP_OUTPUT = $(JTREG_TEST_TEMP_DIR)/output
|
|
||||||
JTREG_TEMP_RESULTS = $(JTREG_TEST_TEMP_DIR)/results
|
|
||||||
|
|
||||||
# JTREG options (different for 2.1.6 and 3.2.2_01)
|
|
||||||
JTREG_COMMON_OPTIONS = -r:$(JTREG_TEST_REPORT_DIR) \
|
|
||||||
-w:$(JTREG_TEST_WORK_DIR) \
|
|
||||||
-testjdk:$(JAVA_HOME) \
|
|
||||||
-automatic \
|
|
||||||
-verbose:all
|
|
||||||
JTREG_216_OPTIONS = $(JTREG_COMMON_OPTIONS) $@ $(JAVA_ARGS)
|
|
||||||
JTREG_322_OPTIONS = $(JTREG_COMMON_OPTIONS) $(JAVA_ARGS:%=-vmoption:%) $@
|
|
||||||
|
|
||||||
# Default make rule
|
|
||||||
all: clean check tests
|
|
||||||
|
|
||||||
# Chaeck to make sure these directories exist
|
|
||||||
check: $(JT_HOME) $(JAVA_HOME) $(JTREG)
|
|
||||||
|
|
||||||
# Prime the test run
|
|
||||||
primecounts: FRC
|
|
||||||
@rm -f -r $(JTREG_TOTALS_DIR)
|
|
||||||
@mkdir -p $(JTREG_TOTALS_DIR)
|
|
||||||
@echo "0" > $(JTREG_FAILED)
|
|
||||||
@echo "0" > $(JTREG_PASSED)
|
|
||||||
|
|
||||||
# Run the tests and determine the 'make' command exit status
|
|
||||||
# Ultimately we determine the make exit code based on the passed/failed count
|
|
||||||
tests: primecounts $(TESTDIRS)
|
|
||||||
@echo "JTREG TOTAL: passed=`cat $(JTREG_PASSED)` failed=`cat $(JTREG_FAILED)`"
|
|
||||||
zip -q -r $(JPRT_ARCHIVE_BUNDLE) $(JTREG_ALL_OUTPUT_DIRNAME)
|
|
||||||
@if [ `cat $(JTREG_FAILED)` -ne 0 -o \
|
|
||||||
`cat $(JTREG_PASSED)` -le 0 ] ; then \
|
|
||||||
echo "JTREG FAILED"; \
|
|
||||||
exit 1; \
|
|
||||||
else \
|
else \
|
||||||
echo "JTREG PASSED"; \
|
$(ECHO) "$(ABS_BUILD_ROOT)" ; \
|
||||||
exit 0; \
|
fi)
|
||||||
fi
|
endif
|
||||||
|
|
||||||
# Just make sure these directires exist
|
# Expect JPRT to set JAVA_ARGS (e.g. -server etc.)
|
||||||
$(JT_HOME) $(JAVA_HOME): FRC
|
JAVA_OPTIONS =
|
||||||
@if [ ! -d $@ ] ; then \
|
ifdef JAVA_ARGS
|
||||||
echo "ERROR: Directory $@ does not exist"; \
|
JAVA_OPTIONS = $(JAVA_ARGS)
|
||||||
exit 1; \
|
endif
|
||||||
fi
|
|
||||||
|
|
||||||
# Make sure this file exists
|
# Expect JPRT to set JPRT_ARCHIVE_BUNDLE (path to zip bundle for results)
|
||||||
$(JTREG): FRC
|
ARCHIVE_BUNDLE = $(ABS_TEST_OUTPUT_DIR)/ARCHIVE_BUNDLE.zip
|
||||||
@if [ ! -f $@ ] ; then \
|
ifdef JPRT_ARCHIVE_BUNDLE
|
||||||
echo "ERROR: File $@ does not exist"; \
|
ARCHIVE_BUNDLE = $(JPRT_ARCHIVE_BUNDLE)
|
||||||
exit 1; \
|
endif
|
||||||
fi
|
|
||||||
|
|
||||||
# Process each test directory one by one, this rule always completes.
|
# How to create the test bundle (pass or fail, we want to create this)
|
||||||
# Note that the use of 'tee' tosses the jtreg process exit status, this
|
BUNDLE_UP = ( $(MKDIR) -p `dirname $(ARCHIVE_BUNDLE)` \
|
||||||
# is as expected because even if jtreg fails, we need to save the
|
&& $(CD) $(ABS_TEST_OUTPUT_DIR) \
|
||||||
# output. So we update the JTREG_PASSED and JTREG_FAILED count files.
|
&& $(ZIP) -q -r $(ARCHIVE_BUNDLE) . )
|
||||||
# Note that missing the 'results:' line in the last few lines of output
|
BUNDLE_UP_FAILED = ( exitCode=$$? && $(BUNDLE_UP) && exit $${exitCode} )
|
||||||
# will indicate a failure (or a bump by one of the JTREG_FAILED file.
|
|
||||||
# Note that passed: 0 or no passed: indication means a failure.
|
################################################################
|
||||||
# Note that any indication of the word 'failed' indicates failure.
|
|
||||||
# Ultimately if the contents of JTREG_FAILED is not 0, we have failed
|
# Default make rule (runs jtreg_tests)
|
||||||
# tests, and if the contents of JTREG_PASSED is 0, we consider that a
|
all: jtreg_tests
|
||||||
# failure.
|
@$(ECHO) "Testing completed successfully"
|
||||||
$(TESTDIRS): FRC
|
|
||||||
@if [ ! -d $@ ] ; then \
|
# Prep for output
|
||||||
echo "ERROR: Directory $@ does not exist"; \
|
prep: clean
|
||||||
exit 1; \
|
@$(MKDIR) -p $(ABS_TEST_OUTPUT_DIR)
|
||||||
fi
|
@$(MKDIR) -p `dirname $(ARCHIVE_BUNDLE)`
|
||||||
@echo "---------------------------------------------------"
|
|
||||||
@rm -f -r $(JTREG_TEST_OUTPUT_DIR)
|
|
||||||
@mkdir -p $(JTREG_TEST_OUTPUT_DIR)
|
|
||||||
@mkdir -p $(JTREG_TEST_WORK_DIR)
|
|
||||||
@mkdir -p $(JTREG_TEST_WORK_DIR)/scratch
|
|
||||||
@mkdir -p $(JTREG_TEST_REPORT_DIR)
|
|
||||||
@mkdir -p $(JTREG_TEST_TEMP_DIR)
|
|
||||||
@echo "Testing $@"
|
|
||||||
@echo "Using JAVA_HOME=$(JAVA_HOME)"
|
|
||||||
@echo "Using JAVA_ARGS=$(JAVA_ARGS)"
|
|
||||||
@if [ "`$(JTREG) -help 2>&1 | fgrep -- -vmoption`" != "" ] ; then \
|
|
||||||
echo "Assume we are using jtreg 3.2.2_01 or newer"; \
|
|
||||||
echo "$(JTREG) $(JTREG_322_OPTIONS)"; \
|
|
||||||
$(JTREG) $(JTREG_322_OPTIONS) 2>&1 | tee $(JTREG_TEMP_OUTPUT) ; \
|
|
||||||
else \
|
|
||||||
echo "Assume we are using jtreg 2.1.6"; \
|
|
||||||
echo "$(JTREG) $(JTREG_216_OPTIONS)"; \
|
|
||||||
$(JTREG) $(JTREG_216_OPTIONS) 2>&1 | tee $(JTREG_TEMP_OUTPUT) ; \
|
|
||||||
fi
|
|
||||||
@echo "---------------------------------------------------"
|
|
||||||
@echo "Extracting passed and failed counts from jtreg output"
|
|
||||||
@tail -10 $(JTREG_TEMP_OUTPUT) | fgrep -i 'results:' | \
|
|
||||||
tail -1 | tee $(JTREG_TEMP_RESULTS)
|
|
||||||
@sed -e 's@.*\ passed:\ \([1-9][0-9]*\).*@\1@' $(JTREG_TEMP_RESULTS) \
|
|
||||||
> $(JTREG_TEMP_PASSED)
|
|
||||||
@if [ "`cat $(JTREG_TEMP_PASSED)`" = "" ] ; then \
|
|
||||||
echo "ERROR: No passed indication in results"; \
|
|
||||||
expr `cat $(JTREG_FAILED)` '+' 1 > $(JTREG_FAILED); \
|
|
||||||
elif [ `cat $(JTREG_TEMP_PASSED)` -le 0 ] ; then \
|
|
||||||
echo "ERROR: Passed count appears to be 0"; \
|
|
||||||
expr `cat $(JTREG_FAILED)` '+' 1 > $(JTREG_FAILED); \
|
|
||||||
elif [ "`fgrep -i failed $(JTREG_TEMP_RESULTS)`" = "" ] ; then \
|
|
||||||
echo "No indication anything failed"; \
|
|
||||||
expr `cat $(JTREG_PASSED)` '+' `cat $(JTREG_TEMP_PASSED)` \
|
|
||||||
> $(JTREG_PASSED); \
|
|
||||||
else \
|
|
||||||
sed -e 's@.*\ failed:\ \([1-9][0-9]*\).*@\1@' $(JTREG_TEMP_FAILED) \
|
|
||||||
> $(JTREG_TEMP_FAILED); \
|
|
||||||
if [ "`cat $(JTREG_TEMP_FAILED)`" = "" ] ; then \
|
|
||||||
echo "ERROR: Failed pattern but no failed count in results"; \
|
|
||||||
expr `cat $(JTREG_FAILED)` '+' 1 > $(JTREG_FAILED); \
|
|
||||||
elif [ `cat $(JTREG_TEMP_FAILED)` -le 0 ] ; then \
|
|
||||||
echo "ERROR: Failed count is 0, did something failed or not?"; \
|
|
||||||
expr `cat $(JTREG_FAILED)` '+' 1 > $(JTREG_FAILED); \
|
|
||||||
else \
|
|
||||||
expr `cat $(JTREG_FAILED)` '+' `cat $(JTREG_TEMP_FAILED)` \
|
|
||||||
> $(JTREG_FAILED); \
|
|
||||||
fi; \
|
|
||||||
fi
|
|
||||||
@echo "---------------------------------------------------"
|
|
||||||
@echo "Summary: "
|
|
||||||
@if [ -f $(JTREG_TEST_SUMMARY) ] ; then \
|
|
||||||
cat $(JTREG_TEST_SUMMARY) ; \
|
|
||||||
else \
|
|
||||||
echo "ERROR: Missing $(JTREG_TEST_SUMMARY)"; \
|
|
||||||
fi
|
|
||||||
@echo "---------------------------------------------------"
|
|
||||||
|
|
||||||
# Cleanup
|
# Cleanup
|
||||||
clean:
|
clean:
|
||||||
rm -f -r $(JTREG_ALL_OUTPUT_DIR)
|
$(RM) -r $(ABS_TEST_OUTPUT_DIR)
|
||||||
rm -f $(JPRT_ARCHIVE_BUNDLE)
|
$(RM) $(ARCHIVE_BUNDLE)
|
||||||
|
|
||||||
FRC:
|
################################################################
|
||||||
|
|
||||||
|
# jtreg tests
|
||||||
|
|
||||||
|
# Expect JT_HOME to be set for jtreg tests. (home for jtreg)
|
||||||
|
JT_HOME = $(SLASH_JAVA)/re/jtreg/4.0/promoted/latest/binaries/jtreg
|
||||||
|
ifdef JPRT_JTREG_HOME
|
||||||
|
JT_HOME = $(JPRT_JTREG_HOME)
|
||||||
|
endif
|
||||||
|
|
||||||
|
# Expect JPRT to set TESTDIRS to the jtreg test dirs
|
||||||
|
JTREG_TESTDIRS = demo/jvmti/gctest demo/jvmti/hprof
|
||||||
|
ifdef TESTDIRS
|
||||||
|
JTREG_TESTDIRS = $(TESTDIRS)
|
||||||
|
endif
|
||||||
|
|
||||||
|
# Default JTREG to run (win32 script works for everybody)
|
||||||
|
JTREG = $(JT_HOME)/win32/bin/jtreg
|
||||||
|
|
||||||
|
# Option to tell jtreg to not run tests marked with "ignore"
|
||||||
|
ifeq ($(PLATFORM), windows)
|
||||||
|
JTREG_KEY_OPTION = -k:!ignore
|
||||||
|
else
|
||||||
|
JTREG_KEY_OPTION = -k:\!ignore
|
||||||
|
endif
|
||||||
|
|
||||||
|
#EXTRA_JTREG_OPTIONS =
|
||||||
|
|
||||||
|
jtreg_tests: prep $(JT_HOME) $(PRODUCT_HOME) $(JTREG)
|
||||||
|
$(JTREG) -a -v:fail,error \
|
||||||
|
$(JTREG_KEY_OPTION) \
|
||||||
|
$(EXTRA_JTREG_OPTIONS) \
|
||||||
|
-r:$(ABS_TEST_OUTPUT_DIR)/JTreport \
|
||||||
|
-w:$(ABS_TEST_OUTPUT_DIR)/JTwork \
|
||||||
|
-jdk:$(PRODUCT_HOME) \
|
||||||
|
$(JAVA_OPTIONS:%=-vmoption:%) \
|
||||||
|
$(JTREG_TESTDIRS) \
|
||||||
|
|| $(BUNDLE_UP_FAILED)
|
||||||
|
$(BUNDLE_UP)
|
||||||
|
|
||||||
|
PHONY_LIST += jtreg_tests
|
||||||
|
|
||||||
|
################################################################
|
||||||
|
|
||||||
|
# packtest
|
||||||
|
|
||||||
|
# Expect JPRT to set JPRT_PACKTEST_HOME.
|
||||||
|
PACKTEST_HOME = /net/jprt-web.sfbay.sun.com/jprt/allproducts/packtest
|
||||||
|
ifdef JPRT_PACKTEST_HOME
|
||||||
|
PACKTEST_HOME = $(JPRT_PACKTEST_HOME)
|
||||||
|
endif
|
||||||
|
|
||||||
|
#EXTRA_PACKTEST_OPTIONS =
|
||||||
|
|
||||||
|
packtest: prep $(PACKTEST_HOME)/ptest $(PRODUCT_HOME)
|
||||||
|
( $(CD) $(PACKTEST_HOME) && \
|
||||||
|
$(PACKTEST_HOME)/ptest \
|
||||||
|
-t "$(PRODUCT_HOME)" \
|
||||||
|
$(PACKTEST_STRESS_OPTION) \
|
||||||
|
$(EXTRA_PACKTEST_OPTIONS) \
|
||||||
|
-W $(ABS_TEST_OUTPUT_DIR) \
|
||||||
|
$(JAVA_OPTIONS:%=-J %) \
|
||||||
|
) || $(BUNDLE_UP_FAILED)
|
||||||
|
$(BUNDLE_UP)
|
||||||
|
|
||||||
|
packtest_stress: PACKTEST_STRESS_OPTION=-s
|
||||||
|
packtest_stress: packtest
|
||||||
|
|
||||||
|
PHONY_LIST += packtest packtest_stress
|
||||||
|
|
||||||
|
################################################################
|
||||||
|
|
||||||
|
# Phony targets (e.g. these are not filenames)
|
||||||
|
.PHONY: all clean prep $(PHONY_LIST)
|
||||||
|
|
||||||
|
################################################################
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue