/hg/icedtea7: 2 new changesets

andrew at icedtea.classpath.org andrew at icedtea.classpath.org
Wed Jul 27 04:39:00 UTC 2016


changeset ff1876b84749 in /hg/icedtea7
details: http://icedtea.classpath.org/hg/icedtea7?cmd=changeset;node=ff1876b84749
author: Andrew John Hughes <gnu_andrew at member.fsf.org>
date: Wed Jul 27 05:29:59 2016 +0100

	PR2799: Files are missing from resources.jar

	2016-07-26  Andrew John Hughes  <gnu.andrew at redhat.com>

		PR2799: Files are missing from resources.jar
		* Makefile.am:
		(MIME_TYPE_CHECK_BUILD_DIR): Add build directory
		for mime type check.
		(MIME_TYPE_CHECK_SRCS): Specify sources for
		mime type check.
		(EXTRA_DIST): Distribute mime type check sources.
		(check-local): Depend on check-mimetype.
		(clean-tests): Depend on clean-check-mimetype.
		(clean-local): Depend on clean-mimetypecheck.
		(.PHONY): Depend on clean-check-mimetype,
		clean-mimetypecheck, clean-add-mime-types-file,
		clean-add-mime-types-file-debug and
		clean-add-mime-types-file-boot.
		(add-mime-types-file): Add a symlink to the
		system mime.types file if found.
		(clean-add-mime-types-file): Remove symlink
		to the system mime types file.
		(add-mime-types-file-debug): Add a symlink to the
		system mime.types file, if found, in the debug build.
		(clean-add-mime-types-file-debug): Remove symlink
		to the system mime types file in the debug build.
		(icedtea-stage2): Depend on add-mime-types-file.
		(clean-icedtea-stage2): Depend on clean-add-mime-types-file.
		(icedtea-debug-stage2): Depend on add-mime-types-file-debug.
		(clean-icedtea-debug-stage2): Depend on clean-add-mime-types-file-debug.
		(add-mime-types-file-boot): Add a symlink to the
		system mime.types file, if found, in the bootstrap build.
		(clean-add-mime-types-file-boot): Remove symlink
		to the system mime types file in the bootstrap build.
		(icedtea-stage1): Depend on add-mime-types-file-boot.
		(clean-icedtea-stage1): Depend on clean-add-mime-types-file-boot.
		(check-mimetype): Check that we can recognise a HTML
		file and (if system mime.types is available) a Java file.
		(clean-check-mimetype): Cleanup after check-mimetype.
		(mimetypecheck): Build the MIME type check.
		(clean-mimetypecheck): Remove MIME type check build.
		(install-data-local): Install the mime.types symlink.
		* acinclude.m4:
		(IT_CHECK_FOR_MIME_TYPES): Check for a system mime.types
		file and define MIME_TYPES_FILE_FOUND if located.
		* configure.ac:
		Invoke IT_CHECK_FOR_MIME_TYPES.
		* test/RH1195203.java: Testcase to get Java to print
		the MIME type of a file.


changeset 9f713d6ccf2a in /hg/icedtea7
details: http://icedtea.classpath.org/hg/icedtea7?cmd=changeset;node=9f713d6ccf2a
author: Andrew John Hughes <gnu_andrew at member.fsf.org>
date: Wed Jul 27 05:41:48 2016 +0100

	PR3111: Provide option to disable SystemTap tests

	2016-03-04  Andrew John Hughes  <gnu.andrew at member.fsf.org>

		PR3111: Provide option to disable SystemTap tests
		* INSTALL: Document --disable-systemtap-tests.
		* Makefile.am:
		(SYSTEMTAP_TEST_SUITE): Define if SystemTap tests
		are enabled.
		(check-local): Use SYSTEMTAP_TEST_SUITE in place
		of check-tapset.
		(.PHONY): Add check-jdk, check-hotspot, check-langtools,
		jtregcheck, check-tapset, check-tapset-probes and
		check-tapset-jstack
		* NEWS: Updated.
		* acinclude.m4:
		(IT_DISABLE_SYSTEMTAP_TESTS): Add option to
		disable SystemTap tests.
		* configure.ac:
		Call IT_DISABLE_SYSTEMTAP_TESTS.


diffstat:

 ChangeLog           |   67 +++++++++++++++++++++++++
 INSTALL             |    1 +
 Makefile.am         |  139 ++++++++++++++++++++++++++++++++++++++++++++++-----
 NEWS                |    1 +
 acinclude.m4        |   39 ++++++++++++++
 configure.ac        |    3 +
 test/RH1195203.java |   32 +++++++++++
 7 files changed, 268 insertions(+), 14 deletions(-)

diffs (487 lines):

diff -r 56606b0a0abc -r 9f713d6ccf2a ChangeLog
--- a/ChangeLog	Thu Jul 21 02:19:05 2016 +0100
+++ b/ChangeLog	Wed Jul 27 05:41:48 2016 +0100
@@ -1,3 +1,70 @@
+2016-03-04  Andrew John Hughes  <gnu.andrew at member.fsf.org>
+
+	PR3111: Provide option to disable SystemTap tests
+	* INSTALL: Document --disable-systemtap-tests.
+	* Makefile.am:
+	(SYSTEMTAP_TEST_SUITE): Define if SystemTap tests
+	are enabled.
+	(check-local): Use SYSTEMTAP_TEST_SUITE in place
+	of check-tapset.
+	(.PHONY): Add check-jdk, check-hotspot, check-langtools,
+	jtregcheck, check-tapset, check-tapset-probes and
+	check-tapset-jstack
+	* NEWS: Updated.
+	* acinclude.m4:
+	(IT_DISABLE_SYSTEMTAP_TESTS): Add option to
+	disable SystemTap tests.
+	* configure.ac:
+	Call IT_DISABLE_SYSTEMTAP_TESTS.
+
+2016-07-26  Andrew John Hughes  <gnu.andrew at redhat.com>
+
+	PR2799: Files are missing from resources.jar
+	* Makefile.am:
+	(MIME_TYPE_CHECK_BUILD_DIR): Add build directory
+	for mime type check.
+	(MIME_TYPE_CHECK_SRCS): Specify sources for
+	mime type check.
+	(EXTRA_DIST): Distribute mime type check sources.
+	(check-local): Depend on check-mimetype.
+	(clean-tests): Depend on clean-check-mimetype.
+	(clean-local): Depend on clean-mimetypecheck.
+	(.PHONY): Depend on clean-check-mimetype,
+	clean-mimetypecheck, clean-add-mime-types-file,
+	clean-add-mime-types-file-debug and
+	clean-add-mime-types-file-boot.
+	(add-mime-types-file): Add a symlink to the
+	system mime.types file if found.
+	(clean-add-mime-types-file): Remove symlink
+	to the system mime types file.
+	(add-mime-types-file-debug): Add a symlink to the
+	system mime.types file, if found, in the debug build.
+	(clean-add-mime-types-file-debug): Remove symlink
+	to the system mime types file in the debug build.
+	(icedtea-stage2): Depend on add-mime-types-file.
+	(clean-icedtea-stage2): Depend on clean-add-mime-types-file.
+	(icedtea-debug-stage2): Depend on add-mime-types-file-debug.
+	(clean-icedtea-debug-stage2): Depend on clean-add-mime-types-file-debug.
+	(add-mime-types-file-boot): Add a symlink to the
+	system mime.types file, if found, in the bootstrap build.
+	(clean-add-mime-types-file-boot): Remove symlink
+	to the system mime types file in the bootstrap build.
+	(icedtea-stage1): Depend on add-mime-types-file-boot.
+	(clean-icedtea-stage1): Depend on clean-add-mime-types-file-boot.
+	(check-mimetype): Check that we can recognise a HTML
+	file and (if system mime.types is available) a Java file.
+	(clean-check-mimetype): Cleanup after check-mimetype.
+	(mimetypecheck): Build the MIME type check.
+	(clean-mimetypecheck): Remove MIME type check build.
+	(install-data-local): Install the mime.types symlink.
+	* acinclude.m4:
+	(IT_CHECK_FOR_MIME_TYPES): Check for a system mime.types
+	file and define MIME_TYPES_FILE_FOUND if located.
+	* configure.ac:
+	Invoke IT_CHECK_FOR_MIME_TYPES.
+	* test/RH1195203.java: Testcase to get Java to print
+	the MIME type of a file.
+
 2016-07-20  Andrew John Hughes  <gnu.andrew at redhat.com>
 
 	PR3103: Handle case in clean-fonts where
diff -r 56606b0a0abc -r 9f713d6ccf2a INSTALL
--- a/INSTALL	Thu Jul 21 02:19:05 2016 +0100
+++ b/INSTALL	Wed Jul 27 05:41:48 2016 +0100
@@ -238,6 +238,7 @@
 * --disable-hotspot-tests: Disable the running of the HotSpot JTReg suite.
 * --disable-langtools-tests: Disable the running of the langtools JTReg suite.
 * --disable-jdk-tests: Disable the running of the jdk JTreg suite.
+* --disable-systemtap-tests: Disable the running of the SystemTap test suite.
 * --disable-xrender: Don't include the XRender pipeline.
 * --enable-nss: Enable the NSS security provider.
 * --enable-cacao: Replace HotSpot with the CACAO VM.
diff -r 56606b0a0abc -r 9f713d6ccf2a Makefile.am
--- a/Makefile.am	Thu Jul 21 02:19:05 2016 +0100
+++ b/Makefile.am	Wed Jul 27 05:41:48 2016 +0100
@@ -69,6 +69,7 @@
 STAGE2_BOOT_DIR = $(abs_top_builddir)/bootstrap/icedtea
 JAMVM_IMPORT_PATH = $(abs_top_builddir)/jamvm/install/hotspot
 CRYPTO_CHECK_BUILD_DIR = $(abs_top_builddir)/test/cryptocheck.build
+MIME_TYPE_CHECK_BUILD_DIR = $(abs_top_builddir)/test/mimetypecheck.build
 STAGE1_BOOT_RUNTIME = $(STAGE1_BOOT_DIR)/jre/lib/rt.jar
 STAGE2_BOOT_RUNTIME = $(STAGE2_BOOT_DIR)/jre/lib/rt.jar
 FONTCONFIG_PATH = openjdk/jdk/src/solaris/classes/sun/awt/fontconfigs
@@ -366,6 +367,7 @@
 
 REWRITER_SRCS = $(top_srcdir)/rewriter/com/redhat/rewriter/ClassRewriter.java
 CRYPTO_CHECK_SRCS = $(top_srcdir)/TestCryptoLevel.java
+MIME_TYPE_CHECK_SRCS = $(top_srcdir)/test/RH1195203.java
 
 # Patch list
 
@@ -709,6 +711,10 @@
 	PAX_COMMAND="${PAX_COMMAND}"
 endif
 
+if !DISABLE_SYSTEMTAP_TESTS
+SYSTEMTAP_TEST_SUITE = check-tapset
+endif
+
 if ENABLE_SUNEC
 ICEDTEA_ENV += \
 	SYSTEM_NSS="true" \
@@ -916,16 +922,18 @@
 	rewriter/agpl-3.0.txt \
 	$(REWRITER_SRCS) \
 	test/tapset \
-	$(CRYPTO_CHECK_SRCS)
+	$(CRYPTO_CHECK_SRCS) \
+	$(MIME_TYPE_CHECK_SRCS)
 
 # Top-Level Targets
 # =================
 
 all-local: icedtea-stage2 $(DESKTOP_FILES)
 
-check-local: jtregcheck check-tapset
-
-clean-tests: clean-jtreg clean-tapset-report clean-jtreg-reports
+check-local: jtregcheck $(SYSTEMTAP_TEST_SUITE) check-mimetype
+
+clean-tests: clean-jtreg clean-tapset-report clean-jtreg-reports \
+  clean-check-mimetype
 	if [ $(abs_top_srcdir) != $(abs_top_builddir) ] ; then \
 	  if [ -e test ] ; then \
 	    rmdir test ; \
@@ -941,7 +949,7 @@
  clean-add-cacao clean-add-cacao-debug clean-rt clean-rewrite-rhino clean-rewriter \
  clean-add-systemtap clean-add-systemtap-debug clean-add-nss clean-add-tzdata-support \
  clean-add-tzdata-support-debug clean-cryptocheck clean-policytool- at JAVA_VER@.desktop \
- clean-jconsole- at JAVA_VER@.desktop
+ clean-jconsole- at JAVA_VER@.desktop clean-mimetypecheck
 	if [ -e bootstrap ]; then \
 	  rmdir bootstrap ; \
 	fi
@@ -972,7 +980,7 @@
 	clean-tests clean-tapset-report clean-add-systemtap \
 	clean-add-systemtap-debug clean-add-systemtap-boot \
 	clean-add-nss clean-add-tzdata-support clean-add-tzdata-support-debug \
-	clean-add-tzdata-support-boot \
+	clean-add-tzdata-support-boot clean-check-mimetype clean-mimetypecheck \
 	clean-check-crypto clean-check-crypto-debug clean-check-crypto-boot \
 	clean-add-archive clean-add-archive-debug clean-add-archive-boot clean-cryptocheck \
 	clean-download-hotspot clean-download-corba clean-download-jaxp \
@@ -980,7 +988,10 @@
 	clean-extract-corba clean-extract-jaxp clean-extract-jaxws clean-extract-jdk \
 	clean-extract-langtools clean-split-debuginfo clean-split-debuginfo-debug \
 	clean-split-debuginfo-boot clean-policytool- at JAVA_VER@.desktop clean-jconsole- at JAVA_VER@.desktop \
-	clean-fonts
+	clean-fonts clean-add-mime-types-file clean-add-mime-types-file-debug clean-add-mime-types-file-boot \
+	clean-tests clean-tapset-report clean-ecccheck clean-check-ecc \
+	check-jdk check-hotspot check-langtools jtregcheck check-tapset check-tapset-probes \
+	check-tapset-jstack
 
 env:
 	@echo 'unset JAVA_HOME'
@@ -2141,6 +2152,20 @@
 	rm -rvf $(BUILD_DEBUGINFO_DIR)
 	rm -f stamps/split-debuginfo.stamp
 
+stamps/add-mime-types-file.stamp: stamps/icedtea.stamp
+if MIME_TYPES_FILE_FOUND
+	if [ -e $(BUILD_SDK_DIR)/jre/lib ] ; then \
+	  ln -sf $(MIME_TYPES_FILE) $(BUILD_SDK_DIR)/jre/lib/mime.types ; \
+	fi
+endif
+	touch $@
+
+clean-add-mime-types-file:
+	if [ -e $(BUILD_SDK_DIR)/jre/lib/mime.types ] ; then \
+	  rm -vf $(BUILD_SDK_DIR)/jre/lib/mime.types ; \
+	fi
+	rm -f stamps/add-mime-types-file.stamp
+
 stamps/icedtea-debug.stamp: stamps/bootstrap-directory-symlink-stage2.stamp \
  stamps/download.stamp stamps/extract.stamp $(OPENJDK_TREE) \
  stamps/cacao.stamp stamps/rewrite-rhino.stamp stamps/jamvm.stamp
@@ -2267,25 +2292,41 @@
 	rm -rvf $(BUILD_DEBUG_DEBUGINFO_DIR)
 	rm -f stamps/split-debuginfo-debug.stamp
 
+stamps/add-mime-types-file-debug.stamp: stamps/icedtea-debug.stamp
+if MIME_TYPES_FILE_FOUND
+	if [ -e $(BUILD_DEBUG_SDK_DIR)/jre/lib ] ; then \
+	  ln -sf $(MIME_TYPES_FILE) $(BUILD_DEBUG_SDK_DIR)/jre/lib/mime.types ; \
+	fi
+endif
+	touch $@
+
+clean-add-mime-types-file-debug:
+	if [ -e $(BUILD_DEBUG_SDK_DIR)/jre/lib/mime.types ] ; then \
+	  rm -vf $(BUILD_DEBUG_SDK_DIR)/jre/lib/mime.types ; \
+	fi
+	rm -f stamps/add-mime-types-file-debug.stamp
+
 stamps/icedtea-stage2.stamp: stamps/icedtea.stamp stamps/add-cacao.stamp \
  stamps/add-zero.stamp stamps/add-jamvm.stamp stamps/add-systemtap.stamp \
  stamps/add-tzdata-support.stamp stamps/check-crypto.stamp stamps/add-archive.stamp \
- stamps/split-debuginfo.stamp
+ stamps/split-debuginfo.stamp stamps/add-mime-types-file.stamp
 	mkdir -p stamps
 	touch $@
 
-clean-icedtea-stage2: clean-add-jamvm clean-check-crypto clean-add-archive clean-split-debuginfo
+clean-icedtea-stage2: clean-add-jamvm clean-check-crypto clean-add-archive clean-split-debuginfo \
+ clean-add-mime-types-file
 	rm -f stamps/icedtea-stage2.stamp
 
 stamps/icedtea-debug-stage2.stamp: stamps/icedtea-debug.stamp \
  stamps/add-cacao-debug.stamp stamps/add-zero-debug.stamp stamps/add-jamvm-debug.stamp \
  stamps/add-systemtap-debug.stamp stamps/add/tzdata-support-debug.stamp \
- stamps/check-crypto-debug.stamp stamps/add-archive-debug.stamp stamps/split-debuginfo-debug.stamp
+ stamps/check-crypto-debug.stamp stamps/add-archive-debug.stamp stamps/split-debuginfo-debug.stamp \
+ stamps/add-mime-types-file-debug.stamp
 	mkdir -p stamps
 	touch $@
 
 clean-icedtea-debug-stage2: clean-add-jamvm-debug clean-check-crypto-debug \
- clean-add-archive-debug clean-split-debuginfo-debug
+ clean-add-archive-debug clean-split-debuginfo-debug clean-add-mime-types-file-debug
 	rm -f stamps/icedtea-debug-stage2.stamp
 
 # OpenJDK boot Targets
@@ -2401,15 +2442,30 @@
 	rm -rvf $(BUILD_BOOT_DEBUGINFO_DIR)
 	rm -f stamps/split-debuginfo-boot.stamp
 
+stamps/add-mime-types-file-boot.stamp: stamps/icedtea-boot.stamp
+if MIME_TYPES_FILE_FOUND
+	if [ -e $(BUILD_BOOT_SDK_DIR)/jre/lib ] ; then \
+	  ln -sf $(MIME_TYPES_FILE) $(BUILD_BOOT_SDK_DIR)/jre/lib/mime.types ; \
+	fi
+endif
+	touch $@
+
+clean-add-mime-types-file-boot:
+	if [ -e $(BUILD_BOOT_SDK_DIR)/jre/lib/mime.types ] ; then \
+	  rm -vf $(BUILD_BOOT_SDK_DIR)/jre/lib/mime.types ; \
+	fi
+	rm -f stamps/add-mime-types-file-boot.stamp
+
 stamps/icedtea-stage1.stamp: stamps/icedtea-boot.stamp \
  stamps/add-systemtap-boot.stamp stamps/add-tzdata-support-boot.stamp \
  stamps/check-crypto-boot.stamp stamps/add-archive-boot.stamp \
- stamps/split-debuginfo-boot.stamp
+ stamps/split-debuginfo-boot.stamp stamps/add-mime-types-file-boot.stamp
 	mkdir -p stamps
 	touch $@
 
 clean-icedtea-stage1: clean-add-systemtap-boot clean-add-tzdata-support-boot \
- clean-check-crypto-boot clean-add-archive-boot clean-split-debuginfo-boot
+ clean-check-crypto-boot clean-add-archive-boot clean-split-debuginfo-boot \
+ clean-add-mime-types-file-boot
 	rm -f stamps/icedtea-stage1.stamp
 
 # Rebuild targets
@@ -2740,7 +2796,7 @@
 
 # end additional VMs
 
-# jtreg
+# Test cases
 
 stamps/jtreg.stamp: stamps/icedtea-stage2.stamp
 	rm -rf test/jtreg/classes
@@ -2881,6 +2937,35 @@
 	rm -f test/check-stap.log
 endif
 
+stamps/check-mimetype.stamp: stamps/mimetypecheck.stamp stamps/icedtea.stamp
+	if [ -e $(BUILD_SDK_DIR)/bin/java ] ; then \
+	  echo "<html><head/><body/></html>" > $(MIME_TYPE_CHECK_BUILD_DIR)/test.html ; \
+	  expected="text/html" ; \
+	  html=$$($(BUILD_SDK_DIR)/bin/java -cp $(MIME_TYPE_CHECK_BUILD_DIR) RH1195203 \
+	    $(MIME_TYPE_CHECK_BUILD_DIR)/test.html) ; \
+	  if test "x$${html}" != "x$${expected}" ; then \
+	    echo "MIME type test failed; expected $${expected}, got $${html}" ; \
+	    exit -1; \
+	  fi ; \
+	fi
+if MIME_TYPES_FILE_FOUND
+	if [ -e $(BUILD_SDK_DIR)/bin/java ] ; then \
+	  expected="text/x-java-source" ; \
+	  java=$$($(BUILD_SDK_DIR)/bin/java -cp $(MIME_TYPE_CHECK_BUILD_DIR) RH1195203 \
+	    $(MIME_TYPE_CHECK_SRCS)) ; \
+	  if test "x$${java}" != "x$${expected}"; then \
+	    echo "MIME type test failed; expected $${expected}, got $${java}" ; \
+	    exit -1; \
+	  fi ; \
+	fi
+endif
+	mkdir -p stamps
+	touch $@
+
+clean-check-mimetype:
+	rm -f $(MIME_TYPE_CHECK_BUILD_DIR)/test.html
+	rm -f stamps/check-mimetype.stamp
+
 # Support classes for non-OpenJDK bootstraps
 
 rt-source-files.txt: $(OPENJDK_BOOT_TREE)
@@ -2941,6 +3026,19 @@
 	rm -rf $(CRYPTO_CHECK_BUILD_DIR)
 	rm -f stamps/cryptocheck.stamp
 
+# Mime Type Check
+
+stamps/mimetypecheck.stamp: $(INITIAL_BOOTSTRAP_LINK_STAMP)
+	mkdir -p $(MIME_TYPE_CHECK_BUILD_DIR)
+	$(BOOT_DIR)/bin/javac $(IT_JAVACFLAGS) \
+	  -d $(MIME_TYPE_CHECK_BUILD_DIR) $(MIME_TYPE_CHECK_SRCS)
+	mkdir -p stamps
+	touch $@
+
+clean-mimetypecheck:
+	rm -rf $(MIME_TYPE_CHECK_BUILD_DIR)
+	rm -f stamps/mimetypecheck.stamp
+
 # File substitution
 
 policytool- at JAVA_VER@.desktop: policytool.desktop
@@ -3097,6 +3195,9 @@
 	$(INSTALL_DATA) $(BUILD_SDK_DIR)/jre/lib/currency.data $(DESTDIR)${prefix}/jre/lib
 	$(INSTALL_DATA) $(BUILD_SDK_DIR)/jre/lib/jvm.hprof.txt $(DESTDIR)${prefix}/jre/lib
 	$(INSTALL_DATA) $(BUILD_SDK_DIR)/jre/lib/meta-index $(DESTDIR)${prefix}/jre/lib
+if MIME_TYPES_FILE_FOUND
+	$(call install_file,$(BUILD_SDK_DIR)/jre/lib/mime.types,$(DESTDIR)${prefix}/jre/lib,$(INSTALL_DATA))
+endif
 	$(INSTALL_DATA) $(BUILD_SDK_DIR)/jre/lib/psfont.properties.ja $(DESTDIR)${prefix}/jre/lib
 	$(INSTALL_DATA) $(BUILD_SDK_DIR)/jre/lib/$(INSTALL_ARCH_DIR)/jvm.cfg \
 	  $(DESTDIR)${prefix}/jre/lib/$(INSTALL_ARCH_DIR)
@@ -3198,6 +3299,12 @@
 
 add-jamvm-debug: stamps/add-jamvm-debug.stamp
 
+add-mime-types-file: stamps/add-mime-types-file.stamp
+
+add-mime-types-file-debug: stamps/add-mime-types-file-debug.stamp
+
+add-mime-types-file-boot: stamps/add-mime-types-file-boot.stamp
+
 add-nss: stamps/add-nss.stamp
 
 add-nss-debug: stamps/add-nss-debug.stamp
@@ -3234,6 +3341,8 @@
 
 check-crypto-debug: stamps/check-crypto-debug.stamp
 
+check-mimetype: stamps/check-mimetype.stamp
+
 clone-boot: stamps/clone-boot.stamp
 
 cryptocheck: stamps/cryptocheck.stamp
@@ -3298,6 +3407,8 @@
 
 jtreg: stamps/jtreg.stamp
 
+mimetypecheck: stamps/mimetypecheck.stamp
+
 native-ecj: stamps/native-ecj.stamp
 
 overlay: stamps/overlay.stamp
diff -r 56606b0a0abc -r 9f713d6ccf2a NEWS
--- a/NEWS	Thu Jul 21 02:19:05 2016 +0100
+++ b/NEWS	Wed Jul 27 05:41:48 2016 +0100
@@ -48,6 +48,7 @@
   - PR2900: Don't use WithSeed versions of NSS functions as they don't fully process the seed
   - PR3091: SystemTap is heavily confused by multiple JDKs
   - PR3103: Handle case in clean-fonts where linux.fontconfig.Gentoo.properties.old has not been created
+  - PR3111: Provide option to disable SystemTap tests
 * AArch64 port
   - S8148328: aarch64: redundant lsr instructions in stub code.
   - S8148783: aarch64: SEGV running SpecJBB2013
diff -r 56606b0a0abc -r 9f713d6ccf2a acinclude.m4
--- a/acinclude.m4	Thu Jul 21 02:19:05 2016 +0100
+++ b/acinclude.m4	Wed Jul 27 05:41:48 2016 +0100
@@ -3386,3 +3386,42 @@
   AC_SUBST(FREETYPE2_CFLAGS)
   AC_SUBST(FREETYPE2_LIBS)
 ])
+
+AC_DEFUN_ONCE([IT_CHECK_FOR_MIME_TYPES],
+[
+  MIME_TYPES_FILE="/etc/mime.types"
+  AC_MSG_CHECKING([for ${MIME_TYPES_FILE}])
+  if test -f ${MIME_TYPES_FILE}; then
+     mime_types_file_found=yes
+  else
+     mime_types_file_found=no
+  fi
+  AC_MSG_RESULT([$mime_types_file_found])
+  if test "x${mime_types_file_found}" = "xno"; then
+    AC_MSG_WARN([No system MIME types file found.])
+  fi
+  AC_SUBST([MIME_TYPES_FILE])
+  AM_CONDITIONAL(MIME_TYPES_FILE_FOUND, test "x${mime_types_file_found}" = "xyes")
+])
+
+AC_DEFUN_ONCE([IT_DISABLE_SYSTEMTAP_TESTS],
+[
+  AC_MSG_CHECKING([whether to disable the execution of the SystemTap tests])
+  AC_ARG_ENABLE([systemtap-tests],
+                [AS_HELP_STRING(--disable-systemtap-tests,do not run the SystemTap tests via make check [[default=no]])],
+  [
+    case "${enableval}" in
+      no)
+        disable_systemtap_tests=yes
+        ;;
+      *)
+        disable_systemtap_tests=no
+        ;;
+    esac
+  ],
+  [
+    disable_systemtap_tests=no
+  ])
+  AC_MSG_RESULT([$disable_systemtap_tests])
+  AM_CONDITIONAL([DISABLE_SYSTEMTAP_TESTS], test x"${disable_systemtap_tests}" = "xyes")
+])
diff -r 56606b0a0abc -r 9f713d6ccf2a configure.ac
--- a/configure.ac	Thu Jul 21 02:19:05 2016 +0100
+++ b/configure.ac	Wed Jul 27 05:41:48 2016 +0100
@@ -45,6 +45,8 @@
 IT_CHECK_FOR_MERCURIAL
 IT_OBTAIN_HG_REVISIONS
 AC_PATH_TOOL([LSB_RELEASE],[lsb_release])
+IT_CHECK_FOR_MIME_TYPES
+
 IT_WITH_HOTSPOT_BUILD
 AC_PATH_TOOL([LINUX32],[linux32])
 IT_CHECK_GCC_VERSION
@@ -55,6 +57,7 @@
 IT_DISABLE_HOTSPOT_TESTS
 IT_DISABLE_LANGTOOLS_TESTS
 IT_DISABLE_JDK_TESTS
+IT_DISABLE_SYSTEMTAP_TESTS
 IT_ENABLE_SUNEC
 IT_ENABLE_NATIVE_DEBUGINFO
 IT_ENABLE_JAVA_DEBUGINFO
diff -r 56606b0a0abc -r 9f713d6ccf2a test/RH1195203.java
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/RH1195203.java	Wed Jul 27 05:41:48 2016 +0100
@@ -0,0 +1,32 @@
+/* RH1195203 -- Check correct recognition of mime types.
+   Copyright (C) 2015 Red Hat, Inc.
+
+This program is free software: you can redistribute it and/or modify
+it under the terms of the GNU Affero General Public License as
+published by the Free Software Foundation, either version 3 of the
+License, or (at your option) any later version.
+
+This program 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 Affero General Public License for more details.
+
+You should have received a copy of the GNU Affero General Public License
+along with this program.  If not, see <http://www.gnu.org/licenses/>.
+*/
+
+import javax.activation.MimetypesFileTypeMap;
+
+public class RH1195203
+{
+    public static void main(String[] args)
+    {
+        if (args.length == 0)
+        {
+	    System.err.println("No file specified.");
+	    System.exit(-1);
+	}
+
+        System.out.println(MimetypesFileTypeMap.getDefaultFileTypeMap().getContentType(args[0]));
+    }
+}


More information about the distro-pkg-dev mailing list