summary refs log tree commit diff
path: root/gnu
diff options
context:
space:
mode:
authorEfraim Flashner <efraim@flashner.co.il>2021-07-22 10:58:22 +0300
committerEfraim Flashner <efraim@flashner.co.il>2021-07-22 10:58:22 +0300
commitfd8aea010fee199b803c5613ff80212b009cb0d4 (patch)
tree7c3df2195b2afeb4db511328750deefb028107e2 /gnu
parent877792a6a707012a4f1abadbd36cf23436660bbb (diff)
downloadguix-fd8aea010fee199b803c5613ff80212b009cb0d4.tar.gz
gnu: python-pysam: Make the check phase honor the tests? argument.
* gnu/packages/bioinformatics.scm (python-pysam)[arguments]: Adjust
custom 'check phase to skip tests when #:tests is #f.
Diffstat (limited to 'gnu')
-rw-r--r--gnu/packages/bioinformatics.scm31
1 files changed, 16 insertions, 15 deletions
diff --git a/gnu/packages/bioinformatics.scm b/gnu/packages/bioinformatics.scm
index d324424a58..a90a7fa9d4 100644
--- a/gnu/packages/bioinformatics.scm
+++ b/gnu/packages/bioinformatics.scm
@@ -2107,7 +2107,7 @@ has several key features:
              (setenv "CFLAGS" "-D_CURSES_LIB=1")
              #t))
          (replace 'check
-           (lambda* (#:key inputs outputs #:allow-other-keys)
+           (lambda* (#:key tests? #:allow-other-keys)
              ;; Failing test removed in the next release.
              (delete-file "tests/AlignmentFile_test.py")
              ;; Add first subdirectory of "build" directory to PYTHONPATH.
@@ -2117,20 +2117,21 @@ has several key features:
                       ":" (getcwd) "/build/"
                       (car (scandir "build"
                                     (negate (cut string-prefix? "." <>))))))
-             ;; Step out of source dir so python does not import from CWD.
-             (with-directory-excursion "tests"
-               (setenv "HOME" "/tmp")
-               (invoke "make" "-C" "pysam_data")
-               (invoke "make" "-C" "cbcf_data")
-               (invoke "pytest" "-k"
-                       (string-append
-                         ;; requires network access.
-                         "not FileHTTP"
-                         ;; bug in test suite with samtools update
-                         ;; https://github.com/pysam-developers/pysam/issues/961
-                         " and not TestHeaderBAM"
-                         " and not TestHeaderCRAM"
-                         " and not test_text_processing"))))))))
+             (when tests?
+               ;; Step out of source dir so python does not import from CWD.
+               (with-directory-excursion "tests"
+                 (setenv "HOME" "/tmp")
+                 (invoke "make" "-C" "pysam_data")
+                 (invoke "make" "-C" "cbcf_data")
+                 (invoke "pytest" "-k"
+                         (string-append
+                           ;; requires network access.
+                           "not FileHTTP"
+                           ;; bug in test suite with samtools update
+                           ;; https://github.com/pysam-developers/pysam/issues/961
+                           " and not TestHeaderBAM"
+                           " and not TestHeaderCRAM"
+                           " and not test_text_processing")))))))))
     (propagated-inputs
      `(("htslib" ,htslib-1.10)))    ; Included from installed header files.
     (inputs