Étienne Mollier pushed to branch master at Debian Med / pplacer


Commits:
59c67fa0 by Étienne Mollier at 2024-05-23T21:20:02+02:00
d/t/run-unit-test: relax success conditions for non-amd64.

Results are stored in XML files that have some fluctuations in the
floating point values they store depending on the underlying CPU
architecture during the test.  Visual inspection of a subset of the
(very) many values suggest no strong divergence, so a strict check
character-for-character of the XML files is probably not suitable
for non-amd64 CPU architectures.

- - - - -
35fd51a0 by Étienne Mollier at 2024-05-23T21:27:55+02:00
ready to upload to unstable.

- - - - -


2 changed files:

- debian/changelog
- debian/tests/run-unit-test


Changes:

=====================================
debian/changelog
=====================================
@@ -1,3 +1,16 @@
+pplacer (1.1~alpha19-8) unstable; urgency=medium
+
+  * Team upload.
+  * d/t/run-unit-test: relax success conditions for non-amd64.
+    Results are stored in XML files that have some fluctuations in the
+    floating point values they store depending on the underlying CPU
+    architecture during the test.  Visual inspection of a subset of the
+    (very) many values suggest no strong divergence, so a strict check
+    character-for-character of the XML files is probably not suitable
+    for non-amd64 CPU architectures.
+
+ -- Étienne Mollier <emoll...@debian.org>  Thu, 23 May 2024 21:25:04 +0200
+
 pplacer (1.1~alpha19-7) unstable; urgency=medium
 
   [ Mohammed Bilal ]


=====================================
debian/tests/run-unit-test
=====================================
@@ -36,6 +36,25 @@ guppy epca --prefix pca_out -c vaginal_16s.refpkg 
src/*.jplace
 #squash clustering
 guppy squash -c vaginal_16s.refpkg --out-dir . src/*.jplace
 
-
-md5sum --check checksums
+if [ "$(uname -m)" = "x86_64" ]
+then
+       # Implement strict checking for results on amd64.
+       du p4z1r36.xml pca_out.xml  # XXX getting reference file size.
+       md5sum --check checksums
+else
+       # On other architecture, visual inspection suggested some drifting in
+       # floating point values, but they tended to remain within "reasonable"
+       # margins.  Since the XML does not really make comparisons easy without
+       # having to spawn a parser and compare each floating point value and
+       # compare to a reference, we just make sure the test results in an XML
+       # that has a certain size within a certain margin.
+       file "p4z1r36.xml" | grep 'XML 1.0 document'
+       file "pca_out.xml" | grep 'XML 1.0 document'
+       readonly p4z1r36_size="$(du p4z1r36.xml | cut -f1)" # expect 176 k
+       readonly pca_out_size="$(du pca_out.xml | cut -f1)" # expect 588 k
+       test "$p4z1r36_size" -ge 168
+       test "$p4z1r36_size" -le 184
+       test "$pca_out_size" -ge 580
+       test "$pca_out_size" -le 596
+fi
 echo -e "\e[92m\e[1mPASS\e[0m"



View it on GitLab: 
https://salsa.debian.org/med-team/pplacer/-/compare/a418f78b6468f7e83c26264ce584b259742d8f7a...35fd51a020d4c96e1d07113dec6b986507e30d7f

-- 
This project does not include diff previews in email notifications.
View it on GitLab: 
https://salsa.debian.org/med-team/pplacer/-/compare/a418f78b6468f7e83c26264ce584b259742d8f7a...35fd51a020d4c96e1d07113dec6b986507e30d7f
You're receiving this email because of your account on salsa.debian.org.


_______________________________________________
debian-med-commit mailing list
debian-med-com...@alioth-lists.debian.net
https://alioth-lists.debian.net/cgi-bin/mailman/listinfo/debian-med-commit

Reply via email to