Skip to content
Commits on Source (2)
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@debian.org> Thu, 17 Jan 2019 15:54:27 +0000
......
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@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);
- }
}
......@@ -5,3 +5,4 @@
50-tests-exclude-Barclay.patch
remove_google_nio.patch
fix_javadoc_ascii.patch
fix_unreadabletests.patch
......@@ -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
......