[med-svn] [picard-tools] 03/05: Remove coverage tests with jacoco

Vincent Danjean vdanjean at debian.org
Mon Mar 14 22:27:10 UTC 2016


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

vdanjean pushed a commit to branch master
in repository picard-tools.

commit f7ddb805d135f767c1bc58d0c6e7742550de0a94
Author: Vincent Danjean <vdanjean at debian.org>
Date:   Mon Mar 14 23:06:45 2016 +0100

    Remove coverage tests with jacoco
---
 debian/patches/10-build.xml | 91 ++++++++++++++++++++++++++++++++++++++++-----
 1 file changed, 81 insertions(+), 10 deletions(-)

diff --git a/debian/patches/10-build.xml b/debian/patches/10-build.xml
index e84a9b4..23c6a64 100644
--- a/debian/patches/10-build.xml
+++ b/debian/patches/10-build.xml
@@ -29,7 +29,19 @@ Forwarded: no
      <property name="picard-version" value="2.1.1"/>
      <property name="command-line-html-dir" value="${dist}/html"/>
      <property name="testng.verbosity" value="2"/>
-@@ -83,23 +82,17 @@
+@@ -67,11 +66,6 @@
+         <os family="unix"/>
+     </condition>
+ 
+-    <!-- Import JaCoCo Ant tasks -->
+-    <taskdef uri="antlib:org.jacoco.ant" resource="org/jacoco/ant/antlib.xml">
+-        <classpath path="lib/ant/jacocoant.jar" />
+-    </taskdef>
+-
+     <target name="set_excluded_test_groups_unix" if="isUnix">
+         <property name="excludedTestGroups" value="slow, broken"/>
+     </target>
+@@ -83,23 +77,17 @@
      <!-- INIT -->
      <target name="init">
          <path id="classpath">
@@ -60,7 +72,7 @@ Forwarded: no
          </path>
  
      </target>
-@@ -113,23 +106,13 @@
+@@ -113,23 +101,13 @@
          <delete dir="javadoc"/>
      </target>
  
@@ -87,7 +99,7 @@ Forwarded: no
      </target>
  
      <target name="clone-htsjdk" description="Clone HTS-JDK sources from Sourceforge">
-@@ -171,13 +154,13 @@
+@@ -171,13 +149,13 @@
              description="Compile files without cleaning">
      </target>
  
@@ -103,16 +115,75 @@ Forwarded: no
  
      <target name="compile-picard-tests" depends="init" description="Compile picard test files without cleaning">
          <compile-tests includes="picard/**/*.*"/>
-@@ -260,6 +243,8 @@
+@@ -196,9 +174,11 @@
+     </target>
+ 
+     <!-- TEST -->
+-    <target name="test" depends="compile, set_excluded_test_groups" description="Run unit tests">
+-        <taskdef resource="testngtasks" classpathref="classpath"/>
+-        <jacoco:coverage destfile="jacoco.data" xmlns:jacoco="antlib:org.jacoco.ant">
++    <macrodef name="run-test">
++        <attribute name="excludedTestGroups" default=""/>
++        <attribute name="includedTestGroups" default=""/>
++        <sequential>
++          <taskdef resource="testngtasks" classpathref="classpath"/>
+             <testng suitename="picard-tests" classpathref="classpath" outputdir="${test.output}"
+                     failureproperty="tests.failed" excludedgroups="${excludedTestGroups}" workingDir="${basedir}"
+                     verbose="${testng.verbosity}">
+@@ -206,6 +186,7 @@
+                     <pathelement path="${classes}"/>
+                     <pathelement path="${classes.test}"/>
+                     <pathelement path="${scripts}"/>
++                    <pathelement path="/usr/share/java/jcommander.jar"/>
+                 </classpath>
+                 <classfileset dir="${classes.test}">
+                     <include name="**/Test*.class"/>
+@@ -213,8 +194,6 @@
+                 </classfileset>
+                 <jvmarg value="-Xmx2G"/>
+             </testng>
+-        </jacoco:coverage>
+-
+         <junitreport todir="${dist}/test">
+             <fileset dir="${test.output}">
+                 <include name="*.xml"/>
+@@ -223,23 +202,11 @@
+         </junitreport>
+         <copy file="etc/test/testng.css" todir="${dist}/test" overwrite="true"/>
+         <fail if="tests.failed" message="There were failed unit tests"/>
+-    </target>
++      </sequential>
++    </macrodef>
+ 
+-    <target name="test-coverage-report" depends="test" description="Runs tests and creates an HTML code coverage report">
+-        <jacoco:report xmlns:jacoco="antlib:org.jacoco.ant">
+-            <executiondata>
+-                <file file="jacoco.data"/>
+-            </executiondata>
+-            <structure name="Picard">
+-                <classfiles>
+-                    <fileset dir="classes"/>
+-                </classfiles>
+-                <sourcefiles encoding="UTF-8">
+-                    <fileset dir="src"/>
+-                </sourcefiles>
+-            </structure>
+-            <html destdir="report"/>
+-        </jacoco:report>
++    <target name="test" depends="compile, set_excluded_test_groups" description="Run unit tests">
++            <run-test excludedTestGroups="${excludedTestGroups}"/>
+     </target>
+ 
+     <target name="single-test"
+@@ -260,6 +227,7 @@
                  <pathelement path="${classes}"/>
                  <pathelement path="${classes.test}"/>
                  <pathelement path="${scripts}"/>
 +                <pathelement path="/usr/share/java/jcommander.jar"/>
-+                <pathelement path="/usr/share/java/jcommander.jar"/>
              </classpath>
              <classfileset dir="${classes.test}">
                  <include name="**/${name}.class"/>
-@@ -284,7 +269,7 @@
+@@ -284,7 +252,7 @@
          </unzip>
      </target>
  
@@ -121,7 +192,7 @@ Forwarded: no
              description="Builds the main executable picard.jar">
          <mkdir dir="${dist}"/>
          <mkdir dir="${dist.tmp}"/>
-@@ -292,15 +277,11 @@
+@@ -292,15 +260,11 @@
              <fileset dir="${lib}">
                  <exclude name="**/jacocoant.jar"/> <!-- must exclude this jar from packing into picard - this is only used for testing -->
              </fileset>
@@ -137,7 +208,7 @@ Forwarded: no
              <fileset dir="${dist.tmp}" includes="**/*"/>
              <fileset dir="${jar_opt}" includes="**/*"/>
  
-@@ -348,44 +329,17 @@
+@@ -348,44 +312,17 @@
                  <fileset dir="${lib}">
                      <include name="**/*.jar"/>
                  </fileset>
@@ -188,7 +259,7 @@ Forwarded: no
          <mkdir dir="${command-line-html-dir}"/>
          <javadoc doclet="picard.util.MetricsDoclet"
                   docletpathref="metrics.classpath"
-@@ -396,13 +350,12 @@
+@@ -396,13 +333,12 @@
                  <fileset dir="${lib}">
                      <include name="**/*.jar"/>
                  </fileset>
@@ -205,7 +276,7 @@ Forwarded: no
              </fileset>
              <arg line="-f ${command-line-html-dir}/picard-metric-definitions.html"/>
          </javadoc>
-@@ -617,4 +570,25 @@
+@@ -617,4 +553,25 @@
              </javac>
          </sequential>
      </macrodef>

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-med/picard-tools.git



More information about the debian-med-commit mailing list