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.
This commit is contained in:
Efraim Flashner 2021-07-22 10:58:22 +03:00
parent 877792a6a7
commit fd8aea010f
No known key found for this signature in database
GPG Key ID: 41AAE7DCCA3D8351

View File

@ -2107,7 +2107,7 @@ has several key features:
(setenv "CFLAGS" "-D_CURSES_LIB=1") (setenv "CFLAGS" "-D_CURSES_LIB=1")
#t)) #t))
(replace 'check (replace 'check
(lambda* (#:key inputs outputs #:allow-other-keys) (lambda* (#:key tests? #:allow-other-keys)
;; Failing test removed in the next release. ;; Failing test removed in the next release.
(delete-file "tests/AlignmentFile_test.py") (delete-file "tests/AlignmentFile_test.py")
;; Add first subdirectory of "build" directory to PYTHONPATH. ;; Add first subdirectory of "build" directory to PYTHONPATH.
@ -2117,6 +2117,7 @@ has several key features:
":" (getcwd) "/build/" ":" (getcwd) "/build/"
(car (scandir "build" (car (scandir "build"
(negate (cut string-prefix? "." <>)))))) (negate (cut string-prefix? "." <>))))))
(when tests?
;; Step out of source dir so python does not import from CWD. ;; Step out of source dir so python does not import from CWD.
(with-directory-excursion "tests" (with-directory-excursion "tests"
(setenv "HOME" "/tmp") (setenv "HOME" "/tmp")
@ -2130,7 +2131,7 @@ has several key features:
;; https://github.com/pysam-developers/pysam/issues/961 ;; https://github.com/pysam-developers/pysam/issues/961
" and not TestHeaderBAM" " and not TestHeaderBAM"
" and not TestHeaderCRAM" " and not TestHeaderCRAM"
" and not test_text_processing")))))))) " and not test_text_processing")))))))))
(propagated-inputs (propagated-inputs
`(("htslib" ,htslib-1.10))) ; Included from installed header files. `(("htslib" ,htslib-1.10))) ; Included from installed header files.
(inputs (inputs