6987114: Fix top level "test" Makefile logic, add jdk/make/Makefile test target
authorohair
Fri, 24 Sep 2010 14:22:01 -0700
changeset 6681 e721d11e4826
parent 6680 b770b6b96142
child 6682 d3bd940d7f64
6987114: Fix top level "test" Makefile logic, add jdk/make/Makefile test target 6987113: Remove SCCS logic from makefiles Reviewed-by: mchung
jdk/make/Makefile
jdk/make/common/Cscope.gmk
jdk/make/common/Defs.gmk
jdk/make/common/Rules-SCCS.gmk
jdk/make/common/shared/Defs-utils.gmk
jdk/test/ProblemList.txt
--- a/jdk/make/Makefile	Fri Sep 24 14:06:57 2010 -0700
+++ b/jdk/make/Makefile	Fri Sep 24 14:22:01 2010 -0700
@@ -75,7 +75,6 @@
 import_fastdebug  -- copy in the fastdebug components \n\
 import_debug      -- copy in the debug components \n\
 modules           -- build the jdk and jre module images (experimental) \n\
-sccs_get          -- make sure all SCCS files are up-to-date (need SCCS) \n\
 create_links      -- create softlinks in Solaris 32bit build to 64bit dirs \n\
 "
 
@@ -278,21 +277,6 @@
 $(OUTPUTDIR) $(TEMPDIR):
 	$(MKDIR) -p $@
 
-# cleanup everything. If the workspace is not being built by the control
-# workspace, and if it is a Teamware workspace, then see if there are
-# any files which are not under SCCS control.
-clean clobber:: 
-ifndef EXTERNALSANITYCONTROL
-	@if [ -d $(TOPDIR)/Codemgr_wsdata ]; then \
-	  $(ECHO) '\nPerforming workspace scan for remnant files.\n' \
-		'  Any files listed below are not under SCCS control in the workspace\n' \
-		'  and you should review them and possibly remove them manually:' ; \
-	  $(FIND) $(TOPDIR)/make $(TOPDIR)/src -type f | \
-		$(SED) 's+SCCS/[ps]\.++' | $(SORT) | $(UNIQ) -c | $(NAWK) '$$1<2 {print $$2;}' ; \
-	  $(ECHO) 'End of workspace scan.' ; \
-	fi
-endif
-
 # this should be the last rule in this file:
 all::
 	@if [ -r $(WARNING_FILE) ]; then \
@@ -341,16 +325,70 @@
 include $(BUILDDIR)/common/internal/BinaryPlugs.gmk
 
 #
-# Get top level sccs_get rule
+# Test rule
 #
-include $(BUILDDIR)/common/Rules-SCCS.gmk
+
+.NOTPARALLEL: test_run
+
+test:
+	$(MAKE) test_run
+
+test_run: test_clean test_start test_summary
+
+test_start:
+	@$(ECHO) "Tests started at `$(DATE)`"
+
+test_clean:
+	$(RM) $(OUTPUTDIR)/test_failures.txt $(OUTPUTDIR)/test_log.txt
 
+test_summary: $(OUTPUTDIR)/test_failures.txt
+	@$(ECHO) "#################################################"
+	@$(ECHO) "Tests completed at `$(DATE)`"
+	@( $(EGREP) '^TEST STATS:' $(OUTPUTDIR)/test_log.txt \
+          || $(ECHO) "No TEST STATS seen in log" )
+	@$(ECHO) "For complete details see: $(OUTPUTDIR)/test_log.txt"
+	@$(ECHO) "#################################################"
+	@if [ -s $< ] ; then                                           \
+          $(ECHO) "ERROR: Test failure count: `$(CAT) $< | $(WC) -l`"; \
+          $(CAT) $<;                                                   \
+          exit 1;                                                      \
+        else                                                           \
+          $(ECHO) "Success! No failures detected";                     \
+        fi
+
+# Get failure list from log
+$(OUTPUTDIR)/test_failures.txt: $(OUTPUTDIR)/test_log.txt
+	@$(RM) $@
+	@( $(EGREP) '^FAILED:' $< || $(ECHO) "" ) | $(NAWK) 'length>0' > $@
+
+# Get log file of all tests run
+JDK_TO_TEST := $(shell 							\
+  if [ -d "$(ABS_OUTPUTDIR)/j2sdk-image" ] ; then 			\
+    $(ECHO) "$(ABS_OUTPUTDIR)/j2sdk-image"; 				\
+  elif [ -d "$(ABS_OUTPUTDIR)/bin" ] ; then 				\
+    $(ECHO) "$(ABS_OUTPUTDIR)"; 					\
+  elif [ "$(PRODUCT_HOME)" != "" -a -d "$(PRODUCT_HOME)/bin" ] ; then 	\
+    $(ECHO) "$(PRODUCT_HOME)"; 						\
+  fi 									\
+)
+
+TEST_TARGETS=jdk_all
+$(OUTPUTDIR)/test_log.txt:
+	$(RM) $@
+	( $(CD) ../test &&                                              \
+          $(MAKE) NO_STOPPING=- PRODUCT_HOME=$(JDK_TO_TEST) $(TEST_TARGETS) \
+        ) | tee $@
+
+#
 # JPRT rules
+#
+
 include jprt.gmk
 
 #
 # Phonies to avoid accidents.
 #
 .PHONY: all build clean clobber optimized debug fastdebug create_links \
-	import import_product import_fastdebug import_debug
+	import import_product import_fastdebug import_debug \
+	test test_run test_start test_clean test_summary
 
--- a/jdk/make/common/Cscope.gmk	Fri Sep 24 14:06:57 2010 -0700
+++ b/jdk/make/common/Cscope.gmk	Fri Sep 24 14:22:01 2010 -0700
@@ -76,7 +76,7 @@
 # What files should we include?  A simple rule might be just those files under
 # SCM control, however this would miss files we create like the opcodes and
 # CClassHeaders.  The following attempts to find everything that is *useful*.
-# (.del files are created by sccsrm, demo directories contain many .java files
+# (demo directories contain many .java files
 # that probably aren't useful for development, and the pkgarchive may contain
 # duplicates of files within the source hierarchy).  The ordering of the .raw
 # file is an attempt to make cscope display the most relevant files first.
--- a/jdk/make/common/Defs.gmk	Fri Sep 24 14:06:57 2010 -0700
+++ b/jdk/make/common/Defs.gmk	Fri Sep 24 14:22:01 2010 -0700
@@ -334,7 +334,7 @@
 DOCSDIRSUFFIX       =
 
 # The MESSAGE, WARNING and ERROR files are used to store sanityck and 
-# SCCS check messages, warnings and errors. 
+# warnings and errors. 
 ifndef ERROR_FILE
   ERROR_FILE   = $(OUTPUTDIR)/sanityCheckErrors.txt
 endif
@@ -634,38 +634,6 @@
 
 VERSION_DEFINES = -DRELEASE='"$(RELEASE)"'
 
-# Note: As a rule, GNU Make rules should not appear in any of the 
-# Defs*.gmk files. These were added for Kestrel-Solaris and do address
-# a TeamWare bug. They should be moved elsewhere for Merlin.
-# 
-#  Override gnumake built-in rules which do sccs get operations badly.
-#  (They put the checked out code in the current directory, not in the
-#  directory of the original file.) 
-# Since this is a symptom of a teamware failure, complain and die on the spot.
-
-# This message immediately goes to stdout and the build terminates.
-define SCCS-trouble
-$(error  \
-"ERROR: File $@ referenced while building in $(CURRENT_DIRECTORY) \
- is out of date with respect to its SCCS file $<. \
- This can happen from an unresolved Teamware conflict, a file movement, or \
- a failure in which SCCS files are updated but the 'sccs get' was not done. \
- You should double check for other out of date files in your workspace. \
- Or run: cd $(TOPDIR) && $(MAKE) sccs_get")
-endef
-
-%:: s.%
-	@$(SCCS-trouble)
-%:: SCCS/s.%
-	@$(SCCS-trouble)
-	@$(ECHO) "         is out of date with respect to its SCCS file." >> $(WARNING_FILE)
-	@$(ECHO) "         This file may be from an unresolved Teamware conflict." >> $(WARNING_FILE)
-	@$(ECHO) "         This is also a symptom of a Teamware bringover/putback failure" >> $(WARNING_FILE)
-	@$(ECHO) "         in which SCCS files are updated but not checked out." >> $(WARNING_FILE)
-	@$(ECHO) "         Check for other out of date files in your workspace." >> $(WARNING_FILE)
-	@$(ECHO) "" >> $(WARNING_FILE)
-	@#exit 666
-
 ifdef INSANE
   export INSANE
 endif
--- a/jdk/make/common/Rules-SCCS.gmk	Fri Sep 24 14:06:57 2010 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,70 +0,0 @@
-#
-# Copyright (c) 2005, 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.
-#
-
-#
-# Only get these rules if SCCS is available
-#
-
-ifdef SCCS
-
-# SCCS command to extract out latest source
-SCCS_GET=$(SCCS) get -s
-
-#
-# Make sure all files in workspace are fresh
-#
-TEMP_ALL_FILES=$(JDK_TOPDIR)/temp_filelist
-$(TEMP_ALL_FILES): $(JDK_TOPDIR)/Codemgr_wsdata/nametable
-	$(prep-target)
-	@$(CUT) -d' ' -f1 $< \
-	    | $(GREP) -v '^VERSION' \
-	    | $(GREP) -v '^deleted_files' \
-	    | $(GREP) -v '^Codemgr_wsdata' > $@
-
-sccs_get: $(TEMP_ALL_FILES)
-	@$(PRINTF) "Workspace has %d files\n"  `$(CAT) $< | $(WC) -l`
-	@count=0; \
-	for i in `$(CAT) $<` ; do \
-	    f=$(JDK_TOPDIR)/$$i; \
-	    count=`$(EXPR) $$count '+' 1`; \
-	    if [ `$(EXPR) $$count '%' 100` = 0 ] ; then \
-		$(PRINTF) "\rChecked $$count files"; \
-	    fi; \
-	    if [ ! -f $$f ] ; then \
-		$(PRINTF) "\r$(SCCS_GET) $$f\n"; \
-		(cd `$(DIRNAME) $$f` && $(SCCS_GET) `$(BASENAME) $$f`); \
-	    elif /usr/bin/test $$f -ot `$(DIRNAME) $$f`/SCCS/s.`$(BASENAME) $$f` ; then \
-		$(PRINTF) "\r$(SCCS_GET) $$f\n"; \
-		(cd `$(DIRNAME) $$f` && $(SCCS_GET) `$(BASENAME) $$f`); \
-	    fi; \
-	done; \
-	$(PRINTF) "\rChecked $$count files\n"
-
-#
-# Phonies to avoid accidents.
-#
-.PHONY: sccs_get
-
-endif
--- a/jdk/make/common/shared/Defs-utils.gmk	Fri Sep 24 14:06:57 2010 -0700
+++ b/jdk/make/common/shared/Defs-utils.gmk	Fri Sep 24 14:22:01 2010 -0700
@@ -33,7 +33,7 @@
 #            UTILS_COMMAND_PATH
 #         /usr/bin/ 
 #            UTILS_USR_BIN_PATH
-#         /usr/ccs/bin/ (sccs, m4, lex, yacc, as, ar, strip, mcs)
+#         /usr/ccs/bin/ (m4, lex, yacc, as, ar, strip, mcs)
 #            UTILS_CCS_BIN_PATH
 #         Dev Tools: zip, unzip, etc that we may have special versions of
 #            UTILS_DEVTOOL_PATH
@@ -117,7 +117,6 @@
 RMDIR          = $(UTILS_COMMAND_PATH)rmdir
 RPM            = $(UTILS_COMMAND_PATH)rpm
 RPMBUILD       = $(UTILS_COMMAND_PATH)rpmbuild
-SCCS           = $(UTILS_CCS_BIN_PATH)sccs
 SED            = $(UTILS_COMMAND_PATH)sed
 SH             = $(UTILS_COMMAND_PATH)sh
 SHOWREV        = $(UTILS_USR_BIN_PATH)showrev
@@ -183,7 +182,7 @@
   NAWK           = $(USRBIN_PATH)gawk
   # Intrinsic unix command, with backslash-escaped character interpretation
   ECHO           = /bin/echo -e
-  # These are really in UTILS_USR_BIN_PATH on Linux (only sccs is not)
+  # These are really in UTILS_USR_BIN_PATH on Linux
   AR             = $(UTILS_USR_BIN_PATH)ar
   AS             = $(UTILS_USR_BIN_PATH)as
   LD             = $(UTILS_USR_BIN_PATH)ld
--- a/jdk/test/ProblemList.txt	Fri Sep 24 14:06:57 2010 -0700
+++ b/jdk/test/ProblemList.txt	Fri Sep 24 14:22:01 2010 -0700
@@ -165,6 +165,12 @@
 #  very small tests and could greatly benefit from a samevm test run.
 #  So a large batch of beans tests are currently run with othervm mode.
 
+# Filed 6986807
+java/beans/Introspector/TestTypeResolver.java   		generic-all
+
+# Filed 6986813
+java/beans/Introspector/memory/Test4508780.java			generic-all
+
 # Linux, some kind of problems with X11 display
 java/beans/PropertyChangeSupport/Test4682386.java		generic-all
 java/beans/PropertyChangeSupport/TestSynchronization.java	generic-all
@@ -493,6 +499,9 @@
 
 # jdk_security
 
+# Filed 6986868
+sun/security/tools/jarsigner/crl.sh				generic-all
+
 # Filed 6951285, not sure how often this fails, last was Linux 64bit Fedora 9
 sun/security/krb5/auto/MaxRetries.java				generic-all
 
@@ -689,10 +698,22 @@
 
 # jdk_tools
 
+# Filed 6952105
+com/sun/jdi/SuspendThreadTest.java				generic-all
+
+# Filed 6986875
+sun/tools/jps/jps-Vvml.sh					generic-all
+
+# Filed 6979016
+sun/tools/jconsole/ResourceCheckTest.sh				generic-all
+
 ############################################################################
 
 # jdk_util
 
+# Filed 6933803
+java/util/concurrent/ThreadPoolExecutor/CoreThreadTimeOut.java	generic-all
+
 # Fails with assertion error on windows
 #   11 separate stacktraces created... file reuse problem?
 java/util/zip/ZipFile/ReadLongZipFileName.java			generic-all