[jffi] 02/05: enable junit tests

Tony Mancill tmancill at moszumanska.debian.org
Sat Apr 4 22:33:27 UTC 2015


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

tmancill pushed a commit to branch master
in repository jffi.

commit d06e234c581f2bc070d72a557cb5416080f3a168
Author: tony mancill <tmancill at debian.org>
Date:   Sat Apr 4 14:04:29 2015 -0700

    enable junit tests
    
    ignore compilation warnings for ./libtest/
    set test.fork="true"
---
 .../disable-warnings-as-errors-for-libtest.patch   | 11 ++++++
 debian/patches/junit_path_for_tests.patch          | 41 ++++++++++++++++++++++
 debian/patches/series                              |  3 ++
 debian/patches/test_fork_true.patch                | 11 ++++++
 debian/rules                                       |  2 +-
 5 files changed, 67 insertions(+), 1 deletion(-)

diff --git a/debian/patches/disable-warnings-as-errors-for-libtest.patch b/debian/patches/disable-warnings-as-errors-for-libtest.patch
new file mode 100644
index 0000000..22062da
--- /dev/null
+++ b/debian/patches/disable-warnings-as-errors-for-libtest.patch
@@ -0,0 +1,11 @@
+--- a/libtest/GNUmakefile
++++ b/libtest/GNUmakefile
+@@ -45,7 +45,7 @@
+ #   http://weblogs.java.net/blog/kellyohair/archive/2006/01/compilation_of_1.html
+ JFLAGS = -fno-omit-frame-pointer -fno-strict-aliasing
+ OFLAGS = -O2 $(JFLAGS)
+-WFLAGS = -W -Werror -Wall -Wno-unused -Wno-parentheses
++WFLAGS = -W -Wall -Wno-unused -Wno-parentheses
+ PICFLAGS = -fPIC
+ SOFLAGS = -shared -Wl,-O1
+ LDFLAGS += $(SOFLAGS)
diff --git a/debian/patches/junit_path_for_tests.patch b/debian/patches/junit_path_for_tests.patch
new file mode 100644
index 0000000..6ba0f7c
--- /dev/null
+++ b/debian/patches/junit_path_for_tests.patch
@@ -0,0 +1,41 @@
+--- a/build.xml
++++ b/build.xml
+@@ -2,8 +2,11 @@
+ <project name="jffi" default="jar" basedir=".">
+   <description>Builds, tests, and runs the project jffi.</description>
+   <path id="classpath.test">
++    <!--
+     <pathelement location="lib/junit_4/junit-4.5.jar"/>
+     <pathelement location="lib/junit_4/junit-4.5-api.jar"/>
++    -->
++    <pathelement location="/usr/share/java/junit4.jar"/>
+   </path>
+ 
+   <target name="clean" depends="-init">
+@@ -163,7 +166,7 @@
+       <classpath>
+         <pathelement location="${build.classes.dir}"/>
+         <pathelement location="${build.test.dir}/classes"/>
+-        <pathelement location="lib/junit_4/junit-4.5.jar"/>
++        <pathelement location="/usr/share/java/junit4.jar"/>
+       </classpath>
+       <sysproperty key="java.library.path" value="${build.native.dir}"/>
+ 
+@@ -188,7 +191,7 @@
+       <classpath>
+         <pathelement location="${build.classes.dir}"/>
+         <pathelement location="${build.test.dir}/classes"/>
+-        <pathelement location="lib/junit_4/junit-4.5.jar"/>
++        <pathelement location="/usr/share/java/junit4.jar"/>
+       </classpath>
+       <sysproperty key="java.library.path" value="${build.native.dir}"/>
+       <formatter type="plain" usefile="false"/>
+@@ -209,7 +212,7 @@
+     <javac srcdir="${src.test.dir}" destdir="${build.test.dir}/classes" includeantruntime="false" classpathref="classpath.test">
+       <classpath>
+         <pathelement location="${build.classes.dir}"/>
+-        <pathelement location="lib/junit_4/junit-4.5.jar"/>
++        <pathelement location="/usr/share/java/junit4.jar"/>
+       </classpath>
+     </javac>
+   </target>
diff --git a/debian/patches/series b/debian/patches/series
index 09b1c8b..7d4d48c 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1 +1,4 @@
 disable-warnings-as-errors-for-jni.patch
+junit_path_for_tests.patch
+disable-warnings-as-errors-for-libtest.patch
+test_fork_true.patch
diff --git a/debian/patches/test_fork_true.patch b/debian/patches/test_fork_true.patch
new file mode 100644
index 0000000..3dad91b
--- /dev/null
+++ b/debian/patches/test_fork_true.patch
@@ -0,0 +1,11 @@
+--- a/build.xml
++++ b/build.xml
+@@ -60,7 +60,7 @@
+     <property name="ant.build.javac.target" value="1.5"/>
+     <property name="ant.build.javac.source" value="1.5"/>
+     <property name="ant.build.javac.includeantruntime" value="false"/>
+-    <property name="test.fork" value="no"/>
++    <property name="test.fork" value="true"/>
+ 
+     <mkdir dir="${build.native.dir}"/>
+ 
diff --git a/debian/rules b/debian/rules
index f35cd6b..4502f68 100755
--- a/debian/rules
+++ b/debian/rules
@@ -18,7 +18,7 @@ override_dh_install:
 	
 override_dh_auto_build:
 	mkdir -p archive
-	ant -Duse.system.libffi=1
+	ant -Duse.system.libffi=1 jar test
 	dh_auto_build
 
 override_dh_clean:

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



More information about the pkg-java-commits mailing list