[gluegen2] 03/06: New patch test.diff to run the test suite at build time

Gilles Filippini pini at debian.org
Sat Oct 10 22:42:12 UTC 2015


This is an automated email from the git hooks/post-receive script.

pini pushed a commit to branch master
in repository gluegen2.

commit ef98c4f470a3addb13e067dcd78b9a53c9213e59
Author: Gilles Filippini <pini at debian.org>
Date:   Sat Oct 10 02:03:28 2015 +0000

    New patch test.diff to run the test suite at build time
    
    Added corresponding targets to debian/rules.
---
 debian/patches/series     |   1 +
 debian/patches/tests.diff | 163 ++++++++++++++++++++++++++++++++++++++++++++++
 debian/rules              |  18 ++++-
 3 files changed, 180 insertions(+), 2 deletions(-)

diff --git a/debian/patches/series b/debian/patches/series
index 0d53c06..2f40232 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -21,3 +21,4 @@ missing-arch-symbol.diff
 
 ppc64el-support.diff
 fix-arm64-build-config.diff
+tests.diff
diff --git a/debian/patches/tests.diff b/debian/patches/tests.diff
new file mode 100644
index 0000000..1c19841
--- /dev/null
+++ b/debian/patches/tests.diff
@@ -0,0 +1,163 @@
+Index: gluegen2/make/build-test.xml
+===================================================================
+--- gluegen2.orig/make/build-test.xml
++++ gluegen2/make/build-test.xml
+@@ -84,6 +84,7 @@
+             <pathelement location="${junit.jar}" />
+             <pathelement location="${semver.jar}" />
+             <pathelement location="${gluegen.jar}" />
++            <pathelement location="/usr/share/java/jsr305.jar" />
+         </path>
+ 
+         <path id="junit.run.classpath">
+Index: gluegen2/make/scripts/runtest.sh
+===================================================================
+--- gluegen2.orig/make/scripts/runtest.sh
++++ gluegen2/make/scripts/runtest.sh
+@@ -42,7 +42,7 @@ rm -f $LOG
+ GLUEGEN_ROOT=`dirname $builddir`
+ ROOTREL_BUILD=`basename $builddir`
+ 
+-X_ARGS="-Drootrel.build=$ROOTREL_BUILD -Dgluegen.root=$GLUEGEN_ROOT"
++X_ARGS="-Drootrel.build=$ROOTREL_BUILD -Dgluegen.root=$GLUEGEN_ROOT -Djava.library.path=$builddir/obj:$builddir/test/build/natives"
+ #D_ARGS="-Djogamp.debug.ProcAddressHelper -Djogamp.debug.NativeLibrary -Djogamp.debug.NativeLibrary.Lookup"
+ #D_ARGS="-Djogamp.debug.TraceLock"
+ #D_ARGS="-Djogamp.debug.Platform -Djogamp.debug.NativeLibrary"
+@@ -62,12 +62,12 @@ X_ARGS="-Drootrel.build=$ROOTREL_BUILD -
+ #D_ARGS="-Djogamp.debug.IOUtil"
+ #D_ARGS="-Djogamp.debug.ByteBufferInputStream"
+ #D_ARGS="-Djogamp.debug.Bitstream"
+-#D_ARGS="-Djogamp.debug=all"
++D_ARGS="-Djogamp.debug=all"
+ #D_ARGS="-Djogamp.debug.Logging"
+ 
+ function onetest() {
+     #USE_CLASSPATH=lib/junit.jar:$ANT_JARS:lib/semantic-versioning/semver.jar:"$builddir"/../make/lib/TestJarsInJar.jar:"$builddir"/gluegen-rt.jar:"$builddir"/gluegen.jar:"$builddir"/gluegen-test-util.jar:"$builddir"/test/build/gluegen-test.jar
+-    USE_CLASSPATH=lib/junit.jar:$ANT_JARS:lib/semantic-versioning/semver.jar:"$builddir"/../make/lib/TestJarsInJar.jar:"$builddir"/gluegen-rt.jar:"$builddir"/gluegen.jar:"$builddir"/gluegen-test-util.jar:"$builddir"/test/build/gluegen-test.jar:"$builddir"/gluegen-rt-natives.jar
++    USE_CLASSPATH=/usr/share/java/junit4.jar:$ANT_JARS:lib/semantic-versioning/semver.jar:"$builddir"/../test/TestJarsInJar/TestJarsInJar.jar:"$builddir"/gluegen-rt.jar:"$builddir"/gluegen.jar:"$builddir"/gluegen-test-util.jar:"$builddir"/test/build/gluegen-test.jar:"$builddir"/gluegen-rt-natives.jar
+     #USE_CLASSPATH=lib/junit.jar:$ANT_JARS:lib/semantic-versioning/semver.jar:"$builddir"/../make/lib/TestJarsInJar.jar:"$builddir"/gluegen-rt-alt.jar:"$builddir"/gluegen.jar:"$builddir"/gluegen-test-util.jar:"$builddir"/test/build/gluegen-test.jar
+     libspath="$builddir"/test/build/natives
+     #USE_CLASSPATH=lib/junit.jar:$ANT_JARS:"$builddir"/../make/lib/TestJarsInJar.jar:"$builddir"/classes:"$builddir"/test/build/classes
+@@ -86,63 +86,65 @@ function onetest() {
+     echo
+ }
+ #
+-#onetest com.jogamp.common.GlueGenVersion 2>&1 | tee -a $LOG
+-#onetest com.jogamp.common.util.TestSystemPropsAndEnvs 2>&1 | tee -a $LOG
+-#onetest com.jogamp.common.util.TestVersionInfo 2>&1 | tee -a $LOG
+-#onetest com.jogamp.common.util.TestVersionNumber 2>&1 | tee -a $LOG
+-onetest com.jogamp.common.util.TestVersionSemantics 2>&1 | tee -a $LOG
+-#onetest com.jogamp.common.util.TestIteratorIndexCORE 2>&1 | tee -a $LOG
+-#onetest com.jogamp.common.util.locks.TestRecursiveLock01 2>&1 | tee -a $LOG
+-#onetest com.jogamp.common.util.locks.TestRecursiveThreadGroupLock01 2>&1 | tee -a $LOG
+-#onetest com.jogamp.common.util.locks.TestSingletonServerSocket00 2>&1 | tee -a $LOG
+-#onetest com.jogamp.common.util.locks.TestSingletonServerSocket01 2>&1 | tee -a $LOG
+-#onetest com.jogamp.common.util.locks.TestSingletonServerSocket02 2>&1 | tee -a $LOG
+-#onetest com.jogamp.common.util.TestFloatStack01 2>&1 | tee -a $LOG
+-#onetest com.jogamp.common.util.TestIntegerStack01 2>&1 | tee -a $LOG
+-#onetest com.jogamp.common.util.TestArrayHashSet01 2>&1 | tee -a $LOG
+-#onetest com.jogamp.common.util.IntIntHashMapTest 2>&1 | tee -a $LOG
+-#onetest com.jogamp.common.util.IntObjectHashMapTest 2>&1 | tee -a $LOG
+-#onetest com.jogamp.common.util.LongIntHashMapTest 2>&1 | tee -a $LOG
+-#onetest com.jogamp.common.util.TestPlatform01 2>&1 | tee -a $LOG
+-#onetest com.jogamp.common.util.TestRunnableTask01 2>&1 | tee -a $LOG
+-#onetest com.jogamp.common.util.TestIOUtil01 2>&1 | tee -a $LOG
+-#onetest com.jogamp.common.util.TestTempJarCache 2>&1 | tee -a $LOG
+-#onetest com.jogamp.common.util.TestJarUtil 2>&1 | tee -a $LOG
+-#onetest com.jogamp.common.util.TestValueConversion 2>&1 | tee -a $LOG
+-#onetest com.jogamp.common.util.TestSyncRingBuffer01 $*
+-#onetest com.jogamp.common.util.TestLFRingBuffer01 $*
+-#onetest com.jogamp.common.util.TestBitstream00 2>&1 | tee -a $LOG
+-#onetest com.jogamp.common.util.TestBitstream01 2>&1 | tee -a $LOG
+-#onetest com.jogamp.common.util.TestBitstream02 2>&1 | tee -a $LOG
+-#onetest com.jogamp.common.util.TestBitstream03 2>&1 | tee -a $LOG
+-#onetest com.jogamp.common.util.TestBitstream04 2>&1 | tee -a $LOG
+-#onetest com.jogamp.common.net.TestUrisWithAssetHandler 2>&1 | tee -a $LOG
+-#onetest com.jogamp.common.net.TestUriQueryProps 2>&1 | tee -a $LOG
+-#onetest com.jogamp.common.net.TestUri01 2>&1 | tee -a $LOG
+-#onetest com.jogamp.common.net.TestUri02Composing 2>&1 | tee -a $LOG
+-#onetest com.jogamp.common.net.TestUri03Resolving 2>&1 | tee -a $LOG
+-#onetest com.jogamp.common.net.TestUri99LaunchOnReservedCharPathBug908 2>&1 | tee -a $LOG
+-#onetest com.jogamp.common.net.AssetURLConnectionUnregisteredTest 2>&1 | tee -a $LOG
+-#onetest com.jogamp.common.net.AssetURLConnectionRegisteredTest 2>&1 | tee -a $LOG
+-#onetest com.jogamp.junit.sec.TestSecIOUtil01 2>&1 | tee -a $LOG
+-#onetest com.jogamp.common.nio.TestBuffersFloatDoubleConversion 2>&1 | tee -a $LOG
+-#onetest com.jogamp.common.nio.TestPointerBufferEndian 2>&1 | tee -a $LOG
+-#onetest com.jogamp.common.nio.TestStructAccessorEndian 2>&1 | tee -a $LOG
+-#onetest com.jogamp.common.nio.TestByteBufferInputStream 2>&1 | tee -a $LOG
+-#onetest com.jogamp.common.nio.TestByteBufferOutputStream 2>&1 | tee -a $LOG
+-#onetest com.jogamp.common.nio.TestByteBufferCopyStream 2>&1 | tee -a $LOG
+-#onetest com.jogamp.common.os.TestElfReader01 $* 2>&1 | tee -a $LOG
+-#onetest com.jogamp.gluegen.test.junit.internals.TestType 2>&1 | tee -a $LOG
++(cd $builddir/../test/TestJarsInJar && sh make.sh)
++#
++onetest com.jogamp.common.GlueGenVersion 2>&1 | tee -a $LOG
++onetest com.jogamp.common.util.TestSystemPropsAndEnvs 2>&1 | tee -a $LOG
++onetest com.jogamp.common.util.TestVersionInfo 2>&1 | tee -a $LOG
++onetest com.jogamp.common.util.TestVersionNumber 2>&1 | tee -a $LOG
++#onetest com.jogamp.common.util.TestVersionSemantics 2>&1 | tee -a $LOG
++onetest com.jogamp.common.util.TestIteratorIndexCORE 2>&1 | tee -a $LOG
++onetest com.jogamp.common.util.locks.TestRecursiveLock01 2>&1 | tee -a $LOG
++onetest com.jogamp.common.util.locks.TestRecursiveThreadGroupLock01 2>&1 | tee -a $LOG
++onetest com.jogamp.common.util.locks.TestSingletonServerSocket00 2>&1 | tee -a $LOG
++onetest com.jogamp.common.util.locks.TestSingletonServerSocket01 2>&1 | tee -a $LOG
++onetest com.jogamp.common.util.locks.TestSingletonServerSocket02 2>&1 | tee -a $LOG
++onetest com.jogamp.common.util.TestFloatStack01 2>&1 | tee -a $LOG
++onetest com.jogamp.common.util.TestIntegerStack01 2>&1 | tee -a $LOG
++onetest com.jogamp.common.util.TestArrayHashSet01 2>&1 | tee -a $LOG
++onetest com.jogamp.common.util.IntIntHashMapTest 2>&1 | tee -a $LOG
++onetest com.jogamp.common.util.IntObjectHashMapTest 2>&1 | tee -a $LOG
++onetest com.jogamp.common.util.LongIntHashMapTest 2>&1 | tee -a $LOG
++onetest com.jogamp.common.util.TestPlatform01 2>&1 | tee -a $LOG
++onetest com.jogamp.common.util.TestRunnableTask01 2>&1 | tee -a $LOG
++onetest com.jogamp.common.util.TestIOUtil01 2>&1 | tee -a $LOG
++onetest com.jogamp.common.util.TestTempJarCache 2>&1 | tee -a $LOG
++onetest com.jogamp.common.util.TestJarUtil 2>&1 | tee -a $LOG
++onetest com.jogamp.common.util.TestValueConversion 2>&1 | tee -a $LOG
++onetest com.jogamp.common.util.TestSyncRingBuffer01 $*
++onetest com.jogamp.common.util.TestLFRingBuffer01 $*
++onetest com.jogamp.common.util.TestBitstream00 2>&1 | tee -a $LOG
++onetest com.jogamp.common.util.TestBitstream01 2>&1 | tee -a $LOG
++onetest com.jogamp.common.util.TestBitstream02 2>&1 | tee -a $LOG
++onetest com.jogamp.common.util.TestBitstream03 2>&1 | tee -a $LOG
++onetest com.jogamp.common.util.TestBitstream04 2>&1 | tee -a $LOG
++onetest com.jogamp.common.net.TestUrisWithAssetHandler 2>&1 | tee -a $LOG
++onetest com.jogamp.common.net.TestUriQueryProps 2>&1 | tee -a $LOG
++onetest com.jogamp.common.net.TestUri01 2>&1 | tee -a $LOG
++onetest com.jogamp.common.net.TestUri02Composing 2>&1 | tee -a $LOG
++onetest com.jogamp.common.net.TestUri03Resolving 2>&1 | tee -a $LOG
++onetest com.jogamp.common.net.TestUri99LaunchOnReservedCharPathBug908 2>&1 | tee -a $LOG
++onetest com.jogamp.common.net.AssetURLConnectionUnregisteredTest 2>&1 | tee -a $LOG
++onetest com.jogamp.common.net.AssetURLConnectionRegisteredTest 2>&1 | tee -a $LOG
++onetest com.jogamp.junit.sec.TestSecIOUtil01 2>&1 | tee -a $LOG
++onetest com.jogamp.common.nio.TestBuffersFloatDoubleConversion 2>&1 | tee -a $LOG
++onetest com.jogamp.common.nio.TestPointerBufferEndian 2>&1 | tee -a $LOG
++onetest com.jogamp.common.nio.TestStructAccessorEndian 2>&1 | tee -a $LOG
++onetest com.jogamp.common.nio.TestByteBufferInputStream 2>&1 | tee -a $LOG
++onetest com.jogamp.common.nio.TestByteBufferOutputStream 2>&1 | tee -a $LOG
++onetest com.jogamp.common.nio.TestByteBufferCopyStream 2>&1 | tee -a $LOG
++onetest com.jogamp.common.os.TestElfReader01 $* 2>&1 | tee -a $LOG
++onetest com.jogamp.gluegen.test.junit.internals.TestType 2>&1 | tee -a $LOG
+ 
+-#onetest com.jogamp.gluegen.test.junit.generation.PCPPTest 2>&1 | tee -a $LOG
+-#onetest com.jogamp.gluegen.jcpp.IncludeAbsoluteTest 2>&1 | tee -a $LOG
+-#onetest com.jogamp.gluegen.jcpp.CppReaderTest 2>&1 | tee -a $LOG
+-#onetest com.jogamp.gluegen.jcpp.TokenPastingWhitespaceTest 2>&1 | tee -a $LOG
+-#onetest com.jogamp.gluegen.jcpp.PreprocessorTest 2>&1 | tee -a $LOG
++onetest com.jogamp.gluegen.test.junit.generation.PCPPTest 2>&1 | tee -a $LOG
++onetest com.jogamp.gluegen.jcpp.IncludeAbsoluteTest 2>&1 | tee -a $LOG
++onetest com.jogamp.gluegen.jcpp.CppReaderTest 2>&1 | tee -a $LOG
++onetest com.jogamp.gluegen.jcpp.TokenPastingWhitespaceTest 2>&1 | tee -a $LOG
++onetest com.jogamp.gluegen.jcpp.PreprocessorTest 2>&1 | tee -a $LOG
+ 
+-#onetest com.jogamp.gluegen.test.junit.generation.Test1p1JavaEmitter 2>&1 | tee -a $LOG
+-#onetest com.jogamp.gluegen.test.junit.generation.Test1p2ProcAddressEmitter 2>&1 | tee -a $LOG
+-#onetest com.jogamp.gluegen.test.junit.generation.Test1p2LoadJNIAndImplLib 2>&1 | tee -a $LOG
+-#onetest com.jogamp.gluegen.test.junit.structgen.TestStructGen01 2>&1 | tee -a $LOG
+-#onetest com.jogamp.gluegen.test.junit.structgen.TestStructGen02 2>&1 | tee -a $LOG
++onetest com.jogamp.gluegen.test.junit.generation.Test1p1JavaEmitter 2>&1 | tee -a $LOG
++onetest com.jogamp.gluegen.test.junit.generation.Test1p2ProcAddressEmitter 2>&1 | tee -a $LOG
++onetest com.jogamp.gluegen.test.junit.generation.Test1p2LoadJNIAndImplLib 2>&1 | tee -a $LOG
++onetest com.jogamp.gluegen.test.junit.structgen.TestStructGen01 2>&1 | tee -a $LOG
++onetest com.jogamp.gluegen.test.junit.structgen.TestStructGen02 2>&1 | tee -a $LOG
+ 
diff --git a/debian/rules b/debian/rules
index 906dd06..63067ed 100755
--- a/debian/rules
+++ b/debian/rules
@@ -8,7 +8,7 @@ JAVA_HOME            := /usr/lib/jvm/default-java/
 DEB_JARS             := ant-launcher antlrall ant-antlr ant-contrib ant-contrib-cpptasks ant-junit jsr305
 DEB_ANT_CLEAN_TARGET := clean
 DEB_BUILDDIR         := make
-DEB_ANT_BUILD_TARGET := all.no_junit
+DEB_ANT_BUILD_TARGET := all
 DEB_ANT_ARGS += -Dtarget.sourcelevel=1.6 -Dtarget.targetlevel=1.6 -Dtarget.rt.jar=1.6
 
 ifeq ($(DEB_HOST_ARCH),armhf)
@@ -49,9 +49,23 @@ install/libgluegen2-doc::
 	mkdir -p debian/libgluegen2-doc/usr/share/doc/libgluegen2-java/
 	cp -Rf build/javadoc/gluegen/javadoc/* debian/libgluegen2-doc/usr/share/doc/libgluegen2-java/
 
+common-post-build-arch:: runtest.log
+
+# Run the test suite
+runtest.log: common-build-arch
+	ANT_PATH=/usr/share/ant make/scripts/runtest.sh $(CURDIR)/build
+
+DISABLED_TESTS := junit/util/VersionSemanticsUtil common/util/TestVersionSemantics
+post-patches::
+	cd src/junit/com/jogamp && \
+	  $(foreach test,$(DISABLED_TESTS),if [ -f $(test).java ]; then mv $(test).java $(test).java.disabled; fi &&) true
+
 clean::
-	$(RM) -r gluegen/build
+	$(RM) -r gluegen/build build-temp
 	$(RM) make/GnuCTreeParserTokenTypes.txt make/STDCTokenTypes.txt
+	cd src/junit/com/jogamp && \
+	  $(foreach test,$(DISABLED_TESTS),if [ -f $(test).java.disabled ]; then mv $(test).java.disabled $(test).java; fi &&) true
+	$(RM) test/TestJarsInJar/TestJarsInJar.jar runtest.log
 
 get-orig-source::
 	uscan --download-current-version --no-symlink --force-download

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-java/gluegen2.git



More information about the pkg-java-commits mailing list