[med-svn] [Git][med-team/picard-tools][master] 2 commits: add PF_STATUS to test

Olivier Sallou gitlab at salsa.debian.org
Fri Jan 18 14:47:49 GMT 2019


Olivier Sallou pushed to branch master at Debian Med / picard-tools


Commits:
a8f248ce by Olivier Sallou at 2019-01-17T17:58:22Z
add PF_STATUS to test

- - - - -
b5887cee by Olivier Sallou at 2019-01-18T14:12:11Z
remove failing tests with autopkgtests, due to root access

- - - - -


4 changed files:

- debian/changelog
- + debian/patches/fix_unreadabletests.patch
- debian/patches/series
- debian/tests/run-unit-test


Changes:

=====================================
debian/changelog
=====================================
@@ -1,8 +1,6 @@
-picard-tools (2.18.23+dfsg-2) UNRELEASE; urgency=medium
+picard-tools (2.18.23+dfsg-2) unstable; urgency=medium
 
   * Fix Class-Path in manifest file for dependencies  (Closes: #919559).
-   [TODO] 2 tests are still failing with autopkgtest though source build
-   and testing works fine.
 
  -- Olivier Sallou <osallou at debian.org>  Thu, 17 Jan 2019 15:54:27 +0000
 


=====================================
debian/patches/fix_unreadabletests.patch
=====================================
@@ -0,0 +1,76 @@
+Subject: tests on unreadable fail
+Description: some tests try to check that a non readable file or directory
+ is correctly managed. However during Debian build, sometimes user is root
+ and unreadable is not effective. This patch removes related tests
+Last-Updated: 2019-01-18
+Author: Olivier Sallou <osallou at debian.org>
+Forwarded: no
+--- a/src/test/java/picard/illumina/ExtractIlluminaBarcodesTest.java
++++ b/src/test/java/picard/illumina/ExtractIlluminaBarcodesTest.java
+@@ -155,33 +155,6 @@
+         Assert.assertEquals(metricsFile.getMetrics().get(12).PERFECT_MATCHES, 1);
+     }
+ 
+-    @Test
+-    public void testNonWritableOutputFile() throws Exception {
+-        final File existingFile = new File(basecallsDir, "s_1_1101_barcode.txt.gz");
+-        try {
+-            existingFile.setReadOnly();
+-            final String readStructure = "25T8B25T";
+-            final int lane = 1;
+-
+-            final File metricsFile = File.createTempFile("eib.", ".metrics");
+-            metricsFile.deleteOnExit();
+-
+-            final List<String> args = new ArrayList<>(Arrays.asList(
+-                    "BASECALLS_DIR=" + basecallsDir.getPath(),
+-                    "LANE=" + lane,
+-                    "READ_STRUCTURE=" + readStructure,
+-                    "METRICS_FILE=" + metricsFile.getPath(),
+-                    "COMPRESS_OUTPUTS=true"
+-            ));
+-            for (final String barcode : BARCODES) {
+-                args.add("BARCODE=" + barcode);
+-            }
+-            Assert.assertEquals(runPicardCommandLine(args), 4);
+-        } finally {
+-            existingFile.setWritable(true);
+-        }
+-
+-    }
+ 
+     /**
+      * 4 cases tested:
+--- a/src/test/java/picard/util/LiftoverVcfTest.java
++++ b/src/test/java/picard/util/LiftoverVcfTest.java
+@@ -1196,30 +1196,4 @@
+         Assert.assertEquals(runPicardCommandLine(args), 1);
+     }
+ 
+-    @Test(expectedExceptions = SAMException.class, expectedExceptionsMessageRegExp = "File exists but is not readable:.*")
+-    public void testUnreadableDictionary() throws IOException {
+-        final Path liftOutput = Files.createTempFile("tmpouput", ".vcf");
+-        liftOutput.toFile().deleteOnExit();
+-        final Path rejectOutput = Files.createTempFile("tmpreject", ".vcf");
+-        rejectOutput.toFile().deleteOnExit();
+-        final Path input = TEST_DATA_PATH.toPath().resolve("testLiftoverBiallelicIndels.vcf");
+-        final Path tmpCopyDir = Files.createTempDirectory("copy");
+-        tmpCopyDir.toFile().deleteOnExit();
+-        final Path referenceCopy = tmpCopyDir.resolve("refCopy.fasta");
+-        referenceCopy.toFile().deleteOnExit();
+-        Files.copy(REFERENCE_FILE.toPath(), referenceCopy);
+-        final Path dictCopy = referenceCopy.resolveSibling(referenceCopy.toFile().getName().replaceAll("fasta$", "dict"));
+-        dictCopy.toFile().deleteOnExit();
+-        final Path dictionary = REFERENCE_FILE.toPath().resolveSibling(REFERENCE_FILE.getName().replaceAll("fasta$", "dict"));
+-        Files.copy(dictionary, dictCopy);
+-        dictCopy.toFile().setReadable(false);
+-        final String[] args = new String[]{
+-                "INPUT=" + input,
+-                "OUTPUT=" + liftOutput,
+-                "REJECT=" + rejectOutput,
+-                "CHAIN=" + CHAIN_FILE,
+-                "REFERENCE_SEQUENCE=" + referenceCopy,
+-        };
+-        runPicardCommandLine(args);
+-    }
+ }


=====================================
debian/patches/series
=====================================
@@ -5,3 +5,4 @@
 50-tests-exclude-Barclay.patch
 remove_google_nio.patch
 fix_javadoc_ascii.patch
+fix_unreadabletests.patch


=====================================
debian/tests/run-unit-test
=====================================
@@ -14,7 +14,7 @@ cp -a /usr/share/doc/${pkg}/test.* .
 cp -a /usr/share/doc/${pkg}/mini.vcf* .
 gunzip -r *
 
-PicardCommandLine ViewSam ALIGNMENT_STATUS=All INPUT=unmapped.sam
+PicardCommandLine ViewSam PF_STATUS=All ALIGNMENT_STATUS=All INPUT=unmapped.sam
 
 PicardCommandLine CollectSequencingArtifactMetrics I=test.sam O=test R=test.fasta
 



View it on GitLab: https://salsa.debian.org/med-team/picard-tools/compare/c93e1866f9549e899c8ce00549e94bd3b53f1804...b5887cee88ee8a326fa4ce0ff35be89d661cd5bd

-- 
View it on GitLab: https://salsa.debian.org/med-team/picard-tools/compare/c93e1866f9549e899c8ce00549e94bd3b53f1804...b5887cee88ee8a326fa4ce0ff35be89d661cd5bd
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/20190118/710f0845/attachment-0001.html>


More information about the debian-med-commit mailing list