/hg/icedtea-web: Added configure switch for whitelist processing...

jkang at icedtea.classpath.org jkang at icedtea.classpath.org
Wed Oct 29 15:45:01 UTC 2014


changeset 6fcf45805efd in /hg/icedtea-web
details: http://icedtea.classpath.org/hg/icedtea-web?cmd=changeset;node=6fcf45805efd
author: Jie Kang <jkang at redhat.com>
date: Wed Oct 29 11:43:02 2014 -0400

	Added configure switch for whitelist processing: 'configure --enable-whitelist-processing'

	2014-10-29  Jie Kang  <jkang at redhat.com>

		Configue switch for whitelist processing added.
		'configure --enable-whitelist-processing': Process white-listed
		reproducers based on directory name and run all processed reproducers.
		'configure': Process all reproducers and run reproducers white-listed
		on test-case name.
		* Makefile.am: support for --enable-whitelist-processing switch
		* configure.ac: added switch --enable-whitelist-processing


diffstat:

 ChangeLog    |  10 ++++++++++
 Makefile.am  |  47 ++++++++++++++++++++++++++++-------------------
 configure.ac |   8 ++++++++
 3 files changed, 46 insertions(+), 19 deletions(-)

diffs (139 lines):

diff -r a3ee07da4b63 -r 6fcf45805efd ChangeLog
--- a/ChangeLog	Fri Oct 24 14:49:21 2014 +0200
+++ b/ChangeLog	Wed Oct 29 11:43:02 2014 -0400
@@ -1,3 +1,13 @@
+2014-10-29  Jie Kang  <jkang at redhat.com>
+
+	Configue switch for whitelist processing added. 
+	'configure --enable-whitelist-processing': Process white-listed
+	reproducers based on directory name and run all processed reproducers.
+	'configure': Process all reproducers and run reproducers white-listed
+	on test-case name.
+	* Makefile.am: support for --enable-whitelist-processing switch
+	* configure.ac: added switch --enable-whitelist-processing
+
 2014-10-24  Jiri Vanek  <jvanek at redhat.com>
 
 	Opening of connections moved into factory
diff -r a3ee07da4b63 -r 6fcf45805efd Makefile.am
--- a/Makefile.am	Fri Oct 24 14:49:21 2014 +0200
+++ b/Makefile.am	Wed Oct 29 11:43:02 2014 -0400
@@ -178,6 +178,14 @@
 endif
 endif
 
+if ENABLE_WHITELIST
+COMPILE_WHITELIST_FILTER=`cat $(REPRODUCERS_CLASS_WHITELIST)`
+RUN_WHITELIST_FILTER=.*
+else
+COMPILE_WHITELIST_FILTER=.*
+RUN_WHITELIST_FILTER=`cat $(REPRODUCERS_CLASS_WHITELIST)`
+endif
+
 if WITH_RHINO
   RHINO_TESTS=stamps/check-pac-functions.stamp
 else
@@ -691,26 +699,23 @@
 	mkdir -p $(REPRODUCERS_BUILD_DIR)
 	touch $@
 
-junit-jnlp-dist-custom.txt: $(REPRODUCERS_CLASS_WHITELIST)
+junit-jnlp-dist-custom.txt:
 	cd $(REPRODUCERS_TESTS_SRCDIR)/$(CUSTOM_REPRODUCERS)/ ; \
-	whiteListed=`cat $(REPRODUCERS_CLASS_WHITELIST)`; \
-	for x in $$whiteListed ; do \
+	for x in $(COMPILE_WHITELIST_FILTER) ; do \
 	  find .  -maxdepth 1 -mindepth 1 | sed "s/.\/*//" | grep $$x > $(abs_top_builddir)/$@ || true ; \
 	done
 
-junit-jnlp-dist-simple.txt: $(REPRODUCERS_CLASS_WHITELIST)
+junit-jnlp-dist-simple.txt:
 	cd $(REPRODUCERS_TESTS_SRCDIR)/simple/ ; \
-	whiteListed=`cat $(REPRODUCERS_CLASS_WHITELIST)`; \
-	for x in $$whiteListed ; do \
+	for x in $(COMPILE_WHITELIST_FILTER) ; do \
 	  find .  -maxdepth 1 -mindepth 1 | sed "s/.\/*//" | grep $$x > $(abs_top_builddir)/$@ || true ; \
 	done
 
-stamps/junit-jnlp-dist-signed.stamp: $(REPRODUCERS_CLASS_WHITELIST)
+stamps/junit-jnlp-dist-signed.stamp:
 	types=($(SIGNED_REPRODUCERS)) ; \
 	for which in "$${types[@]}" ; do \
 	  pushd $(REPRODUCERS_TESTS_SRCDIR)/$$which/ ; \
-	  whiteListed=`cat $(REPRODUCERS_CLASS_WHITELIST)`; \
-	    for x in $$whiteListed ; do \
+	    for x in $(COMPILE_WHITELIST_FILTER) ; do \
 	      find .  -maxdepth 1 -mindepth 1 | sed "s/.\/*//" | grep $$x > $(abs_top_builddir)/junit-jnlp-dist-$$which.txt ; \
 	    done ; \
 	  popd ; \
@@ -864,14 +869,18 @@
 	touch $@
 
 test-extensions-tests-source-files.txt:
-	find $(TEST_EXTENSIONS_TESTS_SRCDIR) -name '*.java' | sort > $@
+	for x in $(COMPILE_WHITELIST_FILTER) ; do \
+	  find $(TEST_EXTENSIONS_TESTS_SRCDIR) -name '*.java' | grep $$x | sort > $@ ; \
+	done
 
 stamps/test-extensions-tests-compile.stamp: stamps/junit-jnlp-dist-dirs test-extensions-tests-source-files.txt  stamps/test-extensions-compile.stamp
 	mkdir -p $(TEST_EXTENSIONS_TESTS_DIR);
-	$(BOOT_DIR)/bin/javac $(IT_JAVACFLAGS) \
-	 -d $(TEST_EXTENSIONS_TESTS_DIR) \
-	 -classpath $(JUNIT_JAR):$(NETX_DIR)/lib/classes.jar:$(TEST_EXTENSIONS_DIR) \
-	 @test-extensions-tests-source-files.txt && \
+	for x in `cat $(abs_top_srcdir)/test-extensions-tests-source-file.txt` ; do \
+	  $(BOOT_DIR)/bin/javac $(IT_JAVACFLAGS) \
+	   -d $(TEST_EXTENSIONS_TESTS_DIR) \
+	   -classpath $(JUNIT_JAR):$(NETX_DIR)/lib/classes.jar:$(TEST_EXTENSIONS_DIR) \
+	   $$x ; \
+	done ; \
 	mkdir -p stamps && \
 	touch $@
 
@@ -914,23 +923,23 @@
 	mkdir -p stamps && \
 	touch $@
 
-$(REPRODUCERS_CLASS_NAMES): $(REPRODUCERS_CLASS_WHITELIST)
-	whiteListed=`cat $(REPRODUCERS_CLASS_WHITELIST)`; \
+$(REPRODUCERS_CLASS_NAMES):
+	whiteListed=$(RUN_WHITELIST_FILTER); \
 	cd $(TEST_EXTENSIONS_TESTS_DIR) ; \
 	class_names= ; \
 	for test in `find -type f` ; do \
 	  class_name=`echo $$test | sed -e 's|\.class$$||' -e 's|^\./||'` ; \
 	  class_name=`echo $$class_name | sed -e 's|/|.|g' ` ; \
-	  INLCUDE="NO" ; \
+	  INCLUDE="NO" ; \
 	  for x in $$whiteListed ; do \
 	    q=`expr match "$$class_name" "$$x"`; \
 	    r=$$? ; \
 	    if [ $$r = 0  ]; then \
 	      echo "$$class_name will be included in reproducers testcases because of $$x pattern in $(REPRODUCERS_CLASS_WHITELIST). Matching was  $$q"; \
-	      INLCUDE="YES" ; \
+	      INCLUDE="YES" ; \
 	    fi; \
 	  done; \
-	  if [ "$$INLCUDE" = "YES"  ]; then \
+	  if [ "$$INCLUDE" = "YES" ]; then \
 	    class_names="$$class_names $$class_name" ; \
 	  else \
 	    echo "$$class_name had no match in $(REPRODUCERS_CLASS_WHITELIST). Excluding"; \
diff -r a3ee07da4b63 -r 6fcf45805efd configure.ac
--- a/configure.ac	Fri Oct 24 14:49:21 2014 +0200
+++ b/configure.ac	Wed Oct 29 11:43:02 2014 -0400
@@ -28,6 +28,14 @@
 AM_CONDITIONAL([ENABLE_DOCS], [test x$ENABLE_DOCS = xyes])
 AC_MSG_RESULT(${ENABLE_DOCS})
 
+AC_MSG_CHECKING([whether to filter by whitelisting on directory name when processing, compiling and running reproducers])
+AC_ARG_ENABLE([whitelist-processing],
+	      [AS_HELP_STRING([--enable-whitelist-processing],
+	      		      [Enable whitelist filter on directory name when processing, compiling and running reproducers. Otherwise filter on testcase name when running reproducers])],
+	      [ENABLE_WHITELIST="${enableval}"], [ENABLE_WHITELIST='no'])
+AM_CONDITIONAL([ENABLE_WHITELIST], [test x$ENABLE_WHITELIST = xyes])
+AC_MSG_RESULT(${ENABLE_WHITELIST})
+
 AC_PATH_PROG([BIN_BASH], [bash],, [/bin])
 if test x"$BIN_BASH" = x ; then
     AC_MSG_ERROR([/bin/bash is used in runtime and for about generation. Dying sooner rather then later])


More information about the distro-pkg-dev mailing list