[med-svn] [Git][med-team/htsjdk][master] reintroduce tests
Olivier Sallou
gitlab at salsa.debian.org
Tue Apr 17 13:21:08 BST 2018
Olivier Sallou pushed to branch master at Debian Med / htsjdk
Commits:
3000bdb2 by Olivier Sallou at 2018-04-17T12:21:15+00:00
reintroduce tests
- - - - -
5 changed files:
- debian/changelog
- + debian/patches/60-enable-tests
- + debian/patches/70-removesometests-testng.patch
- debian/patches/series
- debian/rules
Changes:
=====================================
debian/changelog
=====================================
--- a/debian/changelog
+++ b/debian/changelog
@@ -17,10 +17,10 @@ htsjdk (2.14.3+dfsg-1) UNRELEASED-targeting-experimental; urgency=medium
[TODO - O. Sallou in progress]
* Reintroduce unit tests now that gradle 3.4 is available in sid
- - new patch is needed for latest upstream, referencing junit classes
- - add testng() call in build.gradle with a patch and set test call in d/rules back
- - testng fails now with jcommander classnotfound exception (was working before),
- may need to add dependency in testCompile of build.gradle, don't understand the reason (testng depends on it, but gradle does not find it)
+ - [done] new patch added for latest upstream, referencing junit classes
+ - [done] added testng() call in build.gradle with a patch and set test call in d/rules back
+ - testng fails now with jcommander classnotfound exception, this is a testng bug
+ (#895886: testng: jcommander classes not found), wait to be fixed to enable tests in d/rules
-- Andreas Tille <tille at debian.org> Wed, 28 Mar 2018 14:19:04 +0200
=====================================
debian/patches/60-enable-tests
=====================================
--- /dev/null
+++ b/debian/patches/60-enable-tests
@@ -0,0 +1,35 @@
+--- a/build.gradle
++++ b/build.gradle
+@@ -86,9 +86,14 @@
+ events "failed", "skipped"
+ }
+
++ useTestNG()
++ minHeapSize = "1G"
++ maxHeapSize = "2G"
++
+ if (System.env.CI == "true") {
+ jvmArgs += '-Dsamjdk.sra_libraries_download=true'
+ }
++ jvmArgs += ["--add-modules", "java.xml.bind"]
+
+ exclude 'htsjdk/samtools/sra/**'
+ exclude 'htsjdk/samtools/BAMFileIndexTest.java'
+--- a/src/test/java/htsjdk/utils/ClassFinderTest.java
++++ b/src/test/java/htsjdk/utils/ClassFinderTest.java
+@@ -1,7 +1,7 @@
+ package htsjdk.utils;
+
+ import htsjdk.HtsjdkTest;
+-import org.junit.Assert;
++import org.testng.Assert;
+ import org.testng.annotations.Test;
+
+ /**
+@@ -28,4 +28,4 @@
+ Assert.assertEquals(finder.getClasses().stream()
+ .filter(c -> c.getName().equals("htsjdk.utils.ClassFinder")).count(), 1);
+ }
+-}
+\ No newline at end of file
++}
=====================================
debian/patches/70-removesometests-testng.patch
=====================================
--- /dev/null
+++ b/debian/patches/70-removesometests-testng.patch
@@ -0,0 +1,94 @@
+Subject: testng issue with auto parameter mapping
+Description: testng below or equal to 6.9.13.4 does nto correctly map
+ long and Integers. This leads to test issues when provider [0,9] values
+ and methods expects a long (testng sends an Integer).
+ This patch disable some tests around this
+Author: Olivier Sallou <osallou at debian.org>
+Forwarded: Not-Needed
+Last-Updated: 2018-02-19
+--- a/src/test/java/htsjdk/samtools/SAMIntegerTagTest.java
++++ b/src/test/java/htsjdk/samtools/SAMIntegerTagTest.java
+@@ -296,11 +296,11 @@
+ List<Object[]> params = new ArrayList<Object[]>();
+ for (FORMAT format:FORMAT.values()) {
+ for (ValidationStringency stringency:ValidationStringency.values()) {
+- params.add(new Object[]{0, format, stringency});
+- params.add(new Object[]{1, format, stringency});
+- params.add(new Object[]{-1, format, stringency});
+- params.add(new Object[]{Integer.MIN_VALUE, format, stringency});
+- params.add(new Object[]{Integer.MAX_VALUE, format, stringency});
++ //params.add(new Object[]{0, format, stringency});
++ //params.add(new Object[]{1, format, stringency});
++ //params.add(new Object[]{-1, format, stringency});
++ //params.add(new Object[]{Integer.MIN_VALUE, format, stringency});
++ //params.add(new Object[]{Integer.MAX_VALUE, format, stringency});
+
+ params.add(new Object[]{1L, format, stringency});
+ params.add(new Object[]{-1L, format, stringency});
+--- a/src/test/java/htsjdk/samtools/filter/IntervalKeepPairFilterTest.java
++++ b/src/test/java/htsjdk/samtools/filter/IntervalKeepPairFilterTest.java
+@@ -115,10 +115,10 @@
+ intervalList_unmapped.add(interval);
+
+ return new Object[][]{
+- {intervalList_twoPair, 4},
+- {intervalList_noMatch, 0},
+- {intervalList_onePair, 2},
+- {intervalList_unmapped, 4}
++ {intervalList_twoPair, 4L},
++ {intervalList_noMatch, 0L},
++ {intervalList_onePair, 2L},
++ {intervalList_unmapped, 4L}
+ };
+ }
+ }
+--- a/src/test/java/htsjdk/samtools/seekablestream/SeekableStreamGZIPinputStreamIntegrationTest.java
++++ b/src/test/java/htsjdk/samtools/seekablestream/SeekableStreamGZIPinputStreamIntegrationTest.java
+@@ -118,6 +118,7 @@
+ return data.iterator();
+ }
+
++ /*
+ @Test(dataProvider = "compressedVcfsToTest")
+ public void testWrappedSeekableStreamInGZIPinputStream(final File input, final long nLines) throws Exception {
+ try (final LineReader reader = new BufferedLineReader(new GZIPInputStream(new SeekableFileStream(input)))) {
+@@ -126,9 +127,10 @@
+ }
+ Assert.assertNull(reader.readLine());
+ Assert.assertEquals(reader.getLineNumber(), nLines);
+- }
+ }
++ */
+
++ /*
+ @Test(dataProvider = "compressedVcfsToTest")
+ public void testConsistencyWithBgzip(final File input, final long nLines) throws Exception {
+ try (final InputStream gzIs = new GZIPInputStream(new SeekableFileStream(input));
+@@ -139,7 +141,7 @@
+ bgz = bgzIs.read();
+ }
+ Assert.assertEquals(gzIs.read(), bgz);
+- }
+
+ }
++ */
+ }
+--- a/src/test/java/htsjdk/samtools/util/GZIIndexTest.java
++++ b/src/test/java/htsjdk/samtools/util/GZIIndexTest.java
+@@ -110,6 +110,7 @@
+ return data.iterator();
+ }
+
++ /*
+ @Test(dataProvider = "virtualOffsetForSeekData")
+ public void testGetVirtualOffsetForSeek(final long uncompressedOffset,
+ final long expectedBlockAddress, final long expectedBlockOffset,
+@@ -118,5 +119,6 @@
+ Assert.assertEquals(BlockCompressedFilePointerUtil.getBlockAddress(virtualOffset), expectedBlockAddress);
+ Assert.assertEquals(BlockCompressedFilePointerUtil.getBlockOffset(virtualOffset), expectedBlockOffset);
+ }
++ */
+
+-}
+\ No newline at end of file
++}
=====================================
debian/patches/series
=====================================
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -4,3 +4,5 @@
30-disable-scalatest.patch
40-fix-java9
50-fix-javadoc
+60-enable-tests
+70-removesometests-testng.patch
=====================================
debian/rules
=====================================
--- a/debian/rules
+++ b/debian/rules
@@ -15,8 +15,7 @@ override_dh_auto_build:
dh_auto_build -- jar javadoc
override_dh_auto_test:
- # Bug 877590: gradle 3.2 fails to execute tests, disable unit testing
- # waiting for gradle 3.4 availability
+ # testng bug 895886: testng: jcommander classes not found
# dh_auto_build -- test
override_jh_installlibs:
View it on GitLab: https://salsa.debian.org/med-team/htsjdk/commit/3000bdb26eee29af66b02edab243ad834a2c60e0
---
View it on GitLab: https://salsa.debian.org/med-team/htsjdk/commit/3000bdb26eee29af66b02edab243ad834a2c60e0
You're receiving this email because of your account on salsa.debian.org.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/debian-med-commit/attachments/20180417/e97ad795/attachment-0001.html>
More information about the debian-med-commit
mailing list