changeset 2291:e63ec10f8b3d

Allow all or individual test suites to be disabled. Allows quicker make distcheck runs. 2010-07-18 Andrew John Hughes <ahughes@redhat.com> Allow all or individual test suites to be disabled. * Makefile.am: (TEST_SUITES): Test suites to run. (TESTS_TO_RUN): Dependencies of jtregcheck. (check-local): Re-enable. (.PHONY): Add jtregcheck. (jtregcheck): Use TEST_SUITES and TESTS_TO_RUN. * acinclude.m4: (IT_DISABLE_TESTS): New option to allow all tests to be turned off. (IT_DISABLE_HOTSPOT_TESTS): Likewise just for HotSpot tests. (IT_DISABLE_LANGTOOLS_TESTS): Likewise just for langtools tests. (IT_DISABLE_JDK_TESTS): Likewise just for JDK tests. * configure.ac: Call new macros.
author Andrew John Hughes <ahughes@redhat.com>
date Sun, 18 Jul 2010 18:25:01 +0100
parents a7b8e4ae90c0
children 2651dc3085aa
files ChangeLog Makefile.am acinclude.m4 configure.ac
diffstat 4 files changed, 129 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/ChangeLog	Fri Jul 16 19:59:59 2010 +0100
+++ b/ChangeLog	Sun Jul 18 18:25:01 2010 +0100
@@ -1,3 +1,22 @@
+2010-07-18  Andrew John Hughes  <ahughes@redhat.com>
+
+	Allow all or individual test suites to be
+	disabled.
+	* Makefile.am:
+	(TEST_SUITES): Test suites to run.
+	(TESTS_TO_RUN): Dependencies of jtregcheck.
+	(check-local): Re-enable.
+	(.PHONY): Add jtregcheck.
+	(jtregcheck): Use TEST_SUITES and TESTS_TO_RUN.
+	* acinclude.m4:
+	(IT_DISABLE_TESTS): New option to allow all tests
+	to be turned off.
+	(IT_DISABLE_HOTSPOT_TESTS): Likewise just for HotSpot tests.
+	(IT_DISABLE_LANGTOOLS_TESTS): Likewise just for langtools tests.
+	(IT_DISABLE_JDK_TESTS): Likewise just for JDK tests.
+	* configure.ac:
+	Call new macros.
+
 2010-07-16  Andrew John Hughes  <ahughes@redhat.com>
 
 	* Makefile.am:
--- a/Makefile.am	Fri Jul 16 19:59:59 2010 +0100
+++ b/Makefile.am	Sun Jul 18 18:25:01 2010 +0100
@@ -248,6 +248,19 @@
   SRC_DIR_LINK = $(REFLINK)
 endif
 
+if !DISABLE_TESTS
+if !DISABLE_HOTSPOT_TESTS
+TEST_SUITES = hotspot
+endif
+if !DISABLE_JDK_TESTS
+TEST_SUITES = $(TEST_SUITES) jdk
+endif
+if !DISABLE_LANGTOOLS_TESTS
+TEST_SUITES = $(TEST_SUITES) langtools
+endif
+TESTS_TO_RUN = jtreg $(addprefix check-,$(TEST_SUITES))
+endif
+
 # Target to ensure a patched OpenJDK tree containing Zero & Shark
 # and any overlays is available in $(abs_top_builddir)/openjdk
 OPENJDK_TREE = stamps/overlay.stamp
@@ -749,7 +762,7 @@
 
 all-local: icedtea-stage2
 
-#check-local: jtregcheck
+check-local: jtregcheck
 
 clean-local: clean-jtreg clean-jtreg-reports clean-pulse-java \
  clean-icedtea clean-icedtea-boot clean-clone clean-clone-boot \
@@ -786,7 +799,7 @@
 	clean-bootstrap-directory-symlink-stage1 icedtea icedtea-debug \
 	clean-icedtea icedtea-stage2 clean-icedtea-boot \
 	clean-rt clean-plugin hotspot hotspot-helper clean-extra clean-jtreg \
-	clean-jtreg-reports clean-netx clean-drops
+	clean-jtreg-reports clean-netx clean-drops jtregcheck
 
 env:
 	@echo 'unset JAVA_HOME'
@@ -2483,8 +2496,8 @@
 jtreg_pids = ps x --no-headers -ww -o pid,ppid,args \
 	| awk '$$2 == 1 && $$3 ~ /^$(subst /,\/,$(CURDIR)/$(sdkimg))/ {print $$1}'
 
-jtregcheck: jtreg check-hotspot check-langtools check-jdk
-	for i in hotspot langtools jdk; do \
+jtregcheck: $(TESTS_TO_RUN)
+	for i in $(TEST_SUITES); do \
 	  echo "--------------- jtreg console summary for $$i ---------------"; \
 	  egrep -v '^(Passed:|Directory|Re[a-z]+\ written\ to)' test/check-$$i.log; \
 	done | tee test/jtreg-summary.log
--- a/acinclude.m4	Fri Jul 16 19:59:59 2010 +0100
+++ b/acinclude.m4	Sun Jul 18 18:25:01 2010 +0100
@@ -1855,3 +1855,92 @@
 AC_MSG_RESULT(${PARALLEL_JOBS})
 AC_SUBST(PARALLEL_JOBS)
 ])
+
+AC_DEFUN_ONCE([IT_DISABLE_TESTS],
+[
+  AC_MSG_CHECKING([whether to disable the execution of the JTReg tests])
+  AC_ARG_ENABLE([tests],
+                [AS_HELP_STRING(--disable-tests,do not run the JTReg tests via make check [[default=no]])],
+  [
+    case "${enableval}" in
+      no)
+        disable_tests=yes
+        ;;
+      *)
+        disable_tests=no
+        ;;
+    esac
+  ],
+  [
+    disable_tests=no
+  ])
+  AC_MSG_RESULT([$disable_tests])
+  AM_CONDITIONAL([DISABLE_TESTS], test x"${disable_tests}" = "xyes")
+])
+
+AC_DEFUN_ONCE([IT_DISABLE_HOTSPOT_TESTS],
+[
+  AC_MSG_CHECKING([whether to disable the execution of the HotSpot JTReg tests])
+  AC_ARG_ENABLE([hotspot-tests],
+                [AS_HELP_STRING(--disable-hotspot-tests,do not run the HotSpot JTReg tests via make check-hotspot [[default=no]])],
+  [
+    case "${enableval}" in
+      no)
+        disable_hotspot_tests=yes
+        ;;
+      *)
+        disable_hotspot_tests=no
+        ;;
+    esac
+  ],
+  [
+    disable_hotspot_tests=no
+  ])
+  AC_MSG_RESULT([$disable_hotspot_tests])
+  AM_CONDITIONAL([DISABLE_HOTSPOT_TESTS], test x"${disable_hotspot_tests}" = "xyes")
+])
+
+AC_DEFUN_ONCE([IT_DISABLE_LANGTOOLS_TESTS],
+[
+  AC_MSG_CHECKING([whether to disable the execution of the langtools JTReg tests])
+  AC_ARG_ENABLE([langtools-tests],
+                [AS_HELP_STRING(--disable-tests,do not run the langtools JTReg tests via make check-langtools [[default=no]])],
+  [
+    case "${enableval}" in
+      no)
+        disable_langtools_tests=yes
+        ;;
+      *)
+        disable_langtools_tests=no
+        ;;
+    esac
+  ],
+  [
+    disable_langtools_tests=no
+  ])
+  AC_MSG_RESULT([$disable_langtools_tests])
+  AM_CONDITIONAL([DISABLE_LANGTOOLS_TESTS], test x"${disable_langtools_tests}" = "xyes")
+])
+
+AC_DEFUN_ONCE([IT_DISABLE_JDK_TESTS],
+[
+  AC_MSG_CHECKING([whether to disable the execution of the JDK JTReg tests])
+  AC_ARG_ENABLE([jdk-tests],
+                [AS_HELP_STRING(--disable-tests,do not run the JDK JTReg tests via make check-jdk [[default=no]])],
+  [
+    case "${enableval}" in
+      no)
+        disable_jdk_tests=yes
+        ;;
+      *)
+        disable_jdk_tests=no
+        ;;
+    esac
+  ],
+  [
+    disable_jdk_tests=no
+  ])
+  AC_MSG_RESULT([$disable_jdk_tests])
+  AM_CONDITIONAL([DISABLE_JDK_TESTS], test x"${disable_jdk_tests}" = "xyes")
+])
+
--- a/configure.ac	Fri Jul 16 19:59:59 2010 +0100
+++ b/configure.ac	Sun Jul 18 18:25:01 2010 +0100
@@ -50,6 +50,10 @@
 IT_FIND_NUMBER_OF_PROCESSORS
 IT_CP_SUPPORTS_REFLINK
 IT_CAN_HARDLINK_TO_SOURCE_TREE
+IT_DISABLE_TESTS
+IT_DISABLE_HOTSPOT_TESTS
+IT_DISABLE_LANGTOOLS_TESTS
+IT_DISABLE_JDK_TESTS
 
 AC_MSG_CHECKING([whether to build the LiveConnect plugin])
 AC_ARG_ENABLE([plugin],