[med-svn] [Git][med-team/htsjdk][master] 2 commits: Ensuring directories exist before tests create files inside them

Pierre Gruet (@pgt) gitlab at salsa.debian.org
Wed Nov 8 11:18:14 GMT 2023



Pierre Gruet pushed to branch master at Debian Med / htsjdk


Commits:
0afb42a4 by Pierre Gruet at 2023-11-08T10:11:39+01:00
Ensuring directories exist before tests create files inside them

- - - - -
1c6d7d61 by Pierre Gruet at 2023-11-08T10:13:18+01:00
Upload to unstable

- - - - -


3 changed files:

- debian/changelog
- + debian/patches/160-mkdirs-before-creating-tempPaths.patch
- debian/patches/series


Changes:

=====================================
debian/changelog
=====================================
@@ -1,3 +1,10 @@
+htsjdk (3.0.5+dfsg-2) unstable; urgency=medium
+
+  * Ensuring directories exist before the unit tests attempt to create files
+    inside (Closes: #1055447)
+
+ -- Pierre Gruet <pgt at debian.org>  Wed, 08 Nov 2023 10:13:12 +0100
+
 htsjdk (3.0.5+dfsg-1) unstable; urgency=medium
 
   * New upstream version 3.0.5+dfsg


=====================================
debian/patches/160-mkdirs-before-creating-tempPaths.patch
=====================================
@@ -0,0 +1,29 @@
+Description: ensuring directories exist before creating temp files inside, as
+ some tests seem to rely on other ones creating the directories for them
+Author: Pierre Gruet <pgt at debian.org>
+Bug-Debian: https://bugs.debian.org/1055447
+Forwarded: no
+Last-Update: 2023-11-08
+
+--- a/src/test/java/htsjdk/tribble/gff/Gff3WriterTest.java
++++ b/src/test/java/htsjdk/tribble/gff/Gff3WriterTest.java
+@@ -59,6 +59,12 @@
+ 
+             //write out to temp files (one gzipped, on not)
+         try {
++            //Create tmpDir if it does not exist yet.
++            for (Path p : tmpDir) {
++                if (!p.toFile().exists()) {
++                    p.toFile().mkdirs();
++                }
++            }
+             final Path tempFile = IOUtil.newTempPath("gff3Writer", ".gff3", tmpDir);
+             final Path tempFileGzip = IOUtil.newTempPath("gff3Writer", ".gff3.gz", tmpDir);
+ 
+@@ -202,4 +208,4 @@
+         }
+         return magic == GZIPInputStream.GZIP_MAGIC;
+     }
+-}
+\ No newline at end of file
++}


=====================================
debian/patches/series
=====================================
@@ -9,3 +9,4 @@
 100-fix-java11
 140-skip-testFlushNotSpammed.patch
 150-use-rhino-as-JS-engine.patch
+160-mkdirs-before-creating-tempPaths.patch



View it on GitLab: https://salsa.debian.org/med-team/htsjdk/-/compare/1a276af47f19c0746d67e7c29fe27187a5f50171...1c6d7d612079f339f38df5a92ed15cce1a12fe47

-- 
View it on GitLab: https://salsa.debian.org/med-team/htsjdk/-/compare/1a276af47f19c0746d67e7c29fe27187a5f50171...1c6d7d612079f339f38df5a92ed15cce1a12fe47
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/20231108/a1548418/attachment-0001.htm>


More information about the debian-med-commit mailing list