changeset 269:7668bf410571

reproducers compilation extended for directory structure
author Jiri Vanek <jvanek@redhat.com>
date Tue, 02 Aug 2011 11:05:47 +0200
parents 35f3c783e997
children f2c80b9ceae1
files ChangeLog Makefile.am tests/jnlp_tests/README
diffstat 3 files changed, 18 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/ChangeLog	Tue Jul 26 13:24:16 2011 +0200
+++ b/ChangeLog	Tue Aug 02 11:05:47 2011 +0200
@@ -1,3 +1,10 @@
+2011-08-02 Jiri Vanek <jvanek@redhat.com>
+
+	*Makefile.am: (stamps/netx-dist-tests-prepare-reproducers.stamp):
+	now are compiled files correctly compiled from directory structure.
+	Also not java files are copied with expected directory structure and
+	jarred together with classes.
+
 2011-07-26  Jiri Vanek <jvanek@redhat.com>
 
 	*tests/netx/jnlp_testsengine/net/sourceforge/jnlp/ServerAccess.java: String
--- a/Makefile.am	Tue Jul 26 13:24:16 2011 +0200
+++ b/Makefile.am	Tue Aug 02 11:05:47 2011 +0200
@@ -465,11 +465,18 @@
 stamps/netx-dist-tests-prepare-reproducers.stamp: junit-jnlp-dist-dirs.txt
 	simpleReproducers=(`cat $(abs_top_builddir)/junit-jnlp-dist-dirs.txt `); \
 	for dir in "$${simpleReproducers[@]}" ; do \
+	  echo "processing: $$dir" ; \
 	  mkdir -p $(JNLP_TESTS_DIR)/$$dir ; \
-	  $(BOOT_DIR)/bin/javac -d  $(JNLP_TESTS_DIR)/$$dir/ $(JNLP_TESTS_SRCDIR)/simple/$$dir/srcs/* ; \
 	  d=`pwd` ; \
+	  cd $(JNLP_TESTS_SRCDIR)/simple/$$dir/srcs/ ; \
+	  srcFiles=`find . -mindepth 1 -type f -name "*.java" | sed "s/.\/*//"` ; \
+	  notSrcFiles=`find . -mindepth 1 -type f \! -name "*.java" | sed "s/.\/*//"` ; \
+	  $(BOOT_DIR)/bin/javac -d  $(JNLP_TESTS_DIR)/$$dir/ $$srcFiles ; \
+	  if [ -n "$$notSrcFiles" ] ; then \
+	    cp -R --parents $$notSrcFiles $(JNLP_TESTS_DIR)/$$dir/ ; \
+	  fi ; \
 	  cd $(JNLP_TESTS_DIR)/$$dir/ ; \
-	    $(BOOT_DIR)/bin/jar cf $(JNLP_TESTS_SERVER_DEPLOYDIR)/$$dir.jar * ; \
+	  $(BOOT_DIR)/bin/jar cf $(JNLP_TESTS_SERVER_DEPLOYDIR)/$$dir.jar * ; \
 	  cd $$d ; \
 	  cp -R $(JNLP_TESTS_SRCDIR)/simple/$$dir/resources/*  $(JNLP_TESTS_SERVER_DEPLOYDIR)/ ; \
 	done ; \
--- a/tests/jnlp_tests/README	Tue Jul 26 13:24:16 2011 +0200
+++ b/tests/jnlp_tests/README	Tue Aug 02 11:05:47 2011 +0200
@@ -1,1 +1,2 @@
-Each file in directory simple must follows naming convention and is compiled/jared automatically into server's working directory and content of resources likewise. The name of jnlp is independent, and there can be even more jnlps for each future jar.  Files in advanced directory have to care about themselves, but even those can have some parts inside simple directory, so some parts of them are processed automatically.  There are three reproducers – simpletest1, simpletest2 and deadlocktest, which tests test’s suite itself and serve as examples of behaviour.
+Each file in directory simple must follows naming convention and is compiled/jared automatically into server's working directory and content of resources likewise. The name of jnlp is independent, and there can be even more jnlps for each future jar.  Directories should be honored in srcs and in resources, but noty in testcases.
+Files in advanced directory have to care about themselves, but even those can have some parts inside simple directory, so some parts of them are processed automatically.  There are three reproducers – simpletest1, simpletest2 and deadlocktest, which tests test’s suite itself and serve as examples of behaviour.