/hg/icedtea-web: 2 new changesets

jvanek at icedtea.classpath.org jvanek at icedtea.classpath.org
Thu May 24 10:54:39 PDT 2012


changeset 52fbab80caf4 in /hg/icedtea-web
details: http://icedtea.classpath.org/hg/icedtea-web?cmd=changeset;node=52fbab80caf4
author: Jiri Vanek <jvanek at redhat.com>
date: Thu May 24 19:52:17 2012 +0200

	Introduced whitelist for reproducers


changeset 7b3855664763 in /hg/icedtea-web
details: http://icedtea.classpath.org/hg/icedtea-web?cmd=changeset;node=7b3855664763
author: Jiri Vanek <jvanek at redhat.com>
date: Thu May 24 19:57:14 2012 +0200

	Reproducers engine enhanced for jars in subdirectories by "." naming convention


diffstat:

 ChangeLog                 |  19 ++++++++++++++++
 Makefile.am               |  54 ++++++++++++++++++++++++++++++++++++++++++++--
 netx-dist-tests-whitelist |   1 +
 3 files changed, 71 insertions(+), 3 deletions(-)

diffs (122 lines):

diff -r 2c4154754aef -r 7b3855664763 ChangeLog
--- a/ChangeLog	Thu May 24 10:31:44 2012 -0400
+++ b/ChangeLog	Thu May 24 19:57:14 2012 +0200
@@ -1,3 +1,22 @@
+2012-05-20  Jiri Vanek  <jvanek at redhat.com>
+
+	Reproducers engine enhanced for jars in subdirectories by "." naming convention
+	* Makefile.am: (stamps/change-dots-to-paths.stamp) new target to copy jars
+	with dots (.jar omitted) to the java-like package/directory structure in
+	jnlp_test_server
+	(EXPORTED_TEST_CERT) now depends on  stamps/change-dots-to-paths.stamp
+	(clean-netx-dist-tests) removes stamps/change-dots-to-paths.stamp too. 
+
+2012-05-24  Jiri Vanek  <jvanek at redhat.com>
+
+	Introduced whitelist for reproducers
+	* netx-dist-tests-whitelist: new file, contains regular expressions
+	(separated by space) for expr to select testcases which only will be
+	run. By default set to all by expression .*
+	* Makefile.am: (REPRODUCERS_CLASS_NAMES) When class with testcases is
+	going to be included in list, it is at first check for match in whitelist.
+	If there is no match, will not be included. 
+
 2012-05-24  Martin Olsson <martin at minimum.se>
 	* plugin/icedteanp/IcedTeaPluginUtils.cc:
 	Fix two typos.
diff -r 2c4154754aef -r 7b3855664763 Makefile.am
--- a/Makefile.am	Thu May 24 10:31:44 2012 -0400
+++ b/Makefile.am	Thu May 24 19:57:14 2012 +0200
@@ -32,6 +32,7 @@
 JUNIT_RUNNER_JAR=$(abs_top_builddir)/junit-runner.jar
 UNIT_CLASS_NAMES = $(abs_top_builddir)/unit_class_names
 REPRODUCERS_CLASS_NAMES = $(abs_top_builddir)/reproducers_class_names
+REPRODUCERS_CLASS_WHITELIST = $(abs_top_builddir)/netx-dist-tests-whitelist
 EMMA_JAVA_ARGS=-Xmx2G
 META_MANIFEST = META-INF/MANIFEST.MF
 
@@ -544,8 +545,40 @@
  	mkdir -p stamps && \
  	touch $@
 
+stamps/change-dots-to-paths.stamp: stamps/netx-dist-tests-sign-some-reproducers.stamp
+	pushd  $(JNLP_TESTS_SERVER_DEPLOYDIR); \
+	types=(simple signed); \
+	for which in "$${types[@]}" ; do \
+	  . $(abs_top_srcdir)/NEW_LINE_IFS ; \
+	  simpleReproducers=(`cat $(abs_top_builddir)/junit-jnlp-dist-$$which.txt `); \
+	  IFS="$$IFS_BACKUP" ; \
+	  for dir in "$${simpleReproducers[@]}" ; do \
+	    if test "$${dir:0:1}" = "." ; then \
+	      echo "reproducer $$dir starts with dot. It is forbidden" ; \
+	      exit 5; \
+	    fi; \
+	    if test "$${dir:(-1)}" = "." ; then \
+	      echo "reproducer $$dir ends with dot. It is forbidden" ; \
+	      exit 5; \
+	    fi; \
+	    q=`expr index "$$dir" .`; \
+	    r=$$? ; \
+	    if [ $$r = 0  ]; then \
+	      slashed_dir="./$${dir//.//}" ; \
+	      path="`dirname $$slashed_dir`" ; \
+	      file="`basename $$slashed_dir`.jar" ; \
+	      echo "copying $$dir.jar to $$path as $$file" ; \
+	      mkdir --parents $$path ; \
+	      cp $$dir".jar" "$$path"/"$$file" ; \
+	    fi ; \
+	  done ; \
+	done ; \
+	popd ; \
+	mkdir -p stamps && \
+	touch $@
+
 #this always tries to remove  previous testcert
-$(EXPORTED_TEST_CERT): stamps/netx-dist-tests-sign-some-reproducers.stamp netx-dist-tests-remove-cert-from-public
+$(EXPORTED_TEST_CERT): stamps/change-dots-to-paths.stamp netx-dist-tests-remove-cert-from-public
 	keytool -export -alias $(TEST_CERT_ALIAS) -file $(EXPORTED_TEST_CERT) -storepass $(PRIVATE_KEYSTORE_PASS) -keystore $(PRIVATE_KEYSTORE_NAME) 
 
 stamps/netx-dist-tests-import-cert-to-public: $(EXPORTED_TEST_CERT)
@@ -587,13 +620,27 @@
 	mkdir -p stamps && \
 	touch $@
 
-$(REPRODUCERS_CLASS_NAMES):
+$(REPRODUCERS_CLASS_NAMES): $(REPRODUCERS_CLASS_WHITELIST)
+	whiteListed=`cat $(REPRODUCERS_CLASS_WHITELIST)`; \
 	cd $(JNLP_TESTS_ENGINE_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' ` ; \
-	  class_names="$$class_names $$class_name" ; \
+	  INLCUDE="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" ; \
+	    fi; \
+	  done; \
+	  if [ "$$INLCUDE" = "YES"  ]; then \
+	    class_names="$$class_names $$class_name" ; \
+	  else \
+	    echo "$$class_name had no match in $(REPRODUCERS_CLASS_WHITELIST). Excluding"; \
+	  fi; \
 	done ; \
 	echo $$class_names > $(REPRODUCERS_CLASS_NAMES)
 
@@ -955,6 +1002,7 @@
 	rm -f stamps/netx-dist-tests-prepare-reproducers.stamp
 	rm -f stamps/netx-dist-tests-compile-testcases.stamp
 	rm -f stamps/netx-dist-tests-sign-some-reproducers.stamp
+	rm -f stamps/change-dots-to-paths.stamp
 	rm -f junit-jnlp-dist-simple.txt
 	rm -f junit-jnlp-dist-signed.txt
 	rm -f $(REPRODUCERS_CLASS_NAMES)
diff -r 2c4154754aef -r 7b3855664763 netx-dist-tests-whitelist
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/netx-dist-tests-whitelist	Thu May 24 19:57:14 2012 +0200
@@ -0,0 +1,1 @@
+.*



More information about the distro-pkg-dev mailing list