--- a/jdk/test/Makefile Mon Nov 23 10:29:33 2009 -0700
+++ b/jdk/test/Makefile Mon Nov 23 09:51:52 2009 -0800
@@ -337,9 +337,11 @@
# 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)
+ifndef JT_HOME
+ JT_HOME = $(SLASH_JAVA)/re/jtreg/4.0/promoted/latest/binaries/jtreg
+ ifdef JPRT_JTREG_HOME
+ JT_HOME = $(JPRT_JTREG_HOME)
+ endif
endif
# Expect JPRT to set TESTDIRS to the jtreg test dirs
@@ -361,21 +363,22 @@
# Some tests annoy me and fail frequently
PROBLEM_LIST=ProblemList.txt
+PROBLEM_LISTS=$(PROBLEM_LIST) $(wildcard closed/$(PROBLEM_LIST))
EXCLUDELIST=$(ABS_TEST_OUTPUT_DIR)/excludelist.txt
# Create exclude list for this platform and arch
ifdef NO_EXCLUDES
-$(EXCLUDELIST): $(PROBLEM_LIST) $(TESTDIRS)
+$(EXCLUDELIST): $(PROBLEM_LISTS) $(TESTDIRS)
@$(ECHO) "NOTHING_EXCLUDED" > $@
else
-$(EXCLUDELIST): $(PROBLEM_LIST) $(TESTDIRS)
+$(EXCLUDELIST): $(PROBLEM_LISTS) $(TESTDIRS)
@$(RM) $@ $@.temp1 $@.temp2
- @( ( $(EGREP) -- '$(OS_NAME)-all' $< ) ;\
- ( $(EGREP) -- '$(OS_NAME)-$(OS_ARCH)' $< ) ;\
- ( $(EGREP) -- '$(OS_NAME)-$(OS_VERSION)' $< ) ;\
- ( $(EGREP) -- 'generic-$(OS_ARCH)' $< ) ;\
- ( $(EGREP) -- 'generic-all' $< ) ;\
- ( $(ECHO) "#") ;\
+ @(($(CAT) $(PROBLEM_LISTS) | $(EGREP) -- '$(OS_NAME)-all' ) ;\
+ ($(CAT) $(PROBLEM_LISTS) | $(EGREP) -- '$(OS_NAME)-$(OS_ARCH)' ) ;\
+ ($(CAT) $(PROBLEM_LISTS) | $(EGREP) -- '$(OS_NAME)-$(OS_VERSION)') ;\
+ ($(CAT) $(PROBLEM_LISTS) | $(EGREP) -- 'generic-$(OS_ARCH)' ) ;\
+ ($(CAT) $(PROBLEM_LISTS) | $(EGREP) -- 'generic-all' ) ;\
+ ($(ECHO) "#") ;\
) | $(SED) -e 's@^[\ ]*@@' \
| $(EGREP) -v '^#' > $@.temp1
@for tdir in $(TESTDIRS) ; do \
@@ -386,14 +389,18 @@
@$(ECHO) "Excluding list contains `$(EXPAND) $@ | $(WC) -l` items"
endif
+# Select list of directories that exist
+define TestDirs
+$(foreach i,$1,$(wildcard ${i})) $(foreach i,$1,$(wildcard closed/${i}))
+endef
# Running batches of tests with or without samevm
define RunSamevmBatch
-$(ECHO) "Running tests in samevm mode: $?"
-$(MAKE) TESTDIRS="$?" USE_JTREG_SAMEVM=true UNIQUE_DIR=$@ jtreg_tests
+$(ECHO) "Running tests in samevm mode: $(call TestDirs, $?)"
+$(MAKE) TESTDIRS="$(call TestDirs, $?)" USE_JTREG_SAMEVM=true UNIQUE_DIR=$@ jtreg_tests
endef
define RunOthervmBatch
-$(ECHO) "Running tests in othervm mode: $?"
-$(MAKE) TESTDIRS="$?" USE_JTREG_SAMEVM=false UNIQUE_DIR=$@ jtreg_tests
+$(ECHO) "Running tests in othervm mode: $(call TestDirs, $?)"
+$(MAKE) TESTDIRS="$(call TestDirs, $?)" USE_JTREG_SAMEVM=false UNIQUE_DIR=$@ jtreg_tests
endef
define SummaryInfo
$(ECHO) "Summary for: $?"
@@ -428,6 +435,9 @@
jdk_beans3: java/beans/XMLEncoder
$(call RunOthervmBatch)
+jdk_beans: jdk_beans1 jdk_beans2 jdk_beans3
+ @$(SummaryInfo)
+
# Stable samevm testruns (minus items from PROBLEM_LIST)
JDK_ALL_TARGETS += jdk_io
jdk_io: java/io
@@ -450,6 +460,9 @@
jdk_management2: com/sun/jmx com/sun/management sun/management
$(call RunOthervmBatch)
+jdk_management: jdk_management1 jdk_management2
+ @$(SummaryInfo)
+
# Stable samevm testruns (minus items from PROBLEM_LIST)
JDK_ALL_TARGETS += jdk_math
jdk_math: java/math
@@ -482,6 +495,9 @@
jdk_nio3: com/sun/nio sun/nio
$(call RunOthervmBatch)
+jdk_nio: jdk_nio1 jdk_nio2 jdk_nio3
+ @$(SummaryInfo)
+
# Stable othervm testruns (minus items from PROBLEM_LIST)
# Using samevm has serious problems with these tests
JDK_ALL_TARGETS += jdk_rmi
@@ -502,6 +518,9 @@
jdk_security3: com/sun/security lib/security javax/security sun/security
$(call RunOthervmBatch)
+jdk_security: jdk_security1 jdk_security2 jdk_security3
+ @$(SummaryInfo)
+
# Stable othervm testruns (minus items from PROBLEM_LIST)
# Using samevm has problems, and doesn't help performance as much as others.
JDK_ALL_TARGETS += jdk_swing
@@ -522,6 +541,9 @@
jdk_tools2: com/sun/tools sun/jvmstat sun/tools tools vm com/sun/servicetag com/sun/tracing
$(call RunOthervmBatch)
+jdk_tools: jdk_tools1 jdk_tools2
+ @$(SummaryInfo)
+
# Stable samevm testruns (minus items from PROBLEM_LIST)
JDK_ALL_TARGETS += jdk_util
jdk_util: java/util sun/util