gnu: python2-larch: Enable tests.

* gnu/packages/patches/python2-larch-coverage-4.0a6-compatibility.patch: New
file.
* gnu/local.mk (dist_patch_DATA): Add it.
* gnu/packages/python.scm (python2-larch)[source]: Use it.
[arguments]: Move 'check' phase to before 'build' phase.
This commit is contained in:
Arun Isaac 2017-08-29 16:02:50 +05:30
parent f618086220
commit a0596a2f27
No known key found for this signature in database
GPG key ID: 2E25EE8B61802BB3
3 changed files with 46 additions and 1 deletions

View file

@ -962,6 +962,7 @@ dist_patch_DATA = \
%D%/packages/patches/python-genshi-fix-tests-on-python-3.5.patch \ %D%/packages/patches/python-genshi-fix-tests-on-python-3.5.patch \
%D%/packages/patches/python-genshi-isstring-helper.patch \ %D%/packages/patches/python-genshi-isstring-helper.patch \
%D%/packages/patches/python-genshi-stripping-of-unsafe-script-tags.patch \ %D%/packages/patches/python-genshi-stripping-of-unsafe-script-tags.patch \
%D%/packages/patches/python2-larch-coverage-4.0a6-compatibility.patch \
%D%/packages/patches/python-parse-too-many-fields.patch \ %D%/packages/patches/python-parse-too-many-fields.patch \
%D%/packages/patches/python2-rdflib-drop-sparqlwrapper.patch \ %D%/packages/patches/python2-rdflib-drop-sparqlwrapper.patch \
%D%/packages/patches/python-statsmodels-fix-tests.patch \ %D%/packages/patches/python-statsmodels-fix-tests.patch \

View file

@ -0,0 +1,29 @@
From ca548da9ba78ddee90779051210e3e89185e4f7d Mon Sep 17 00:00:00 2001
From: Michel Alexandre Salim <michel@michel-slm.name>
Date: Mon, 15 Feb 2016 23:03:42 +0700
Subject: coverage-4.0a6 compatibility
coverage 4.0a6 no longer generates .coverage file, so use -f when
deleting .coverage to ensure deletion does not fail.
---
Makefile | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
(limited to 'Makefile')
diff --git a/Makefile b/Makefile
index 7818f57..362c07f 100644
--- a/Makefile
+++ b/Makefile
@@ -23,7 +23,7 @@ fsck-larch.1: fsck-larch.1.in fsck-larch
check:
python -m CoverageTestRunner --ignore-missing-from=without-tests
- rm .coverage
+ rm -f .coverage
./insert-remove-test tempdir 100
rm -r tempdir larch.log
cmdtest tests
--
cgit v1.1

View file

@ -68,6 +68,7 @@ (define-module (gnu packages python)
#:use-module (gnu packages attr) #:use-module (gnu packages attr)
#:use-module (gnu packages backup) #:use-module (gnu packages backup)
#:use-module (gnu packages bash) #:use-module (gnu packages bash)
#:use-module (gnu packages check)
#:use-module (gnu packages compression) #:use-module (gnu packages compression)
#:use-module (gnu packages crypto) #:use-module (gnu packages crypto)
#:use-module (gnu packages databases) #:use-module (gnu packages databases)
@ -14193,12 +14194,26 @@ (define-public python2-larch
(uri (string-append (uri (string-append
"http://git.liw.fi/cgi-bin/cgit/cgit.cgi/larch/snapshot/larch-" "http://git.liw.fi/cgi-bin/cgit/cgit.cgi/larch/snapshot/larch-"
version ".tar.gz")) version ".tar.gz"))
(patches (search-patches
"python2-larch-coverage-4.0a6-compatibility.patch"))
(sha256 (sha256
(base32 (base32
"1p4knkkavlqymgciz2wbcnfrdgdbafhg14maplnk4vbw0q8xs663")))) "1p4knkkavlqymgciz2wbcnfrdgdbafhg14maplnk4vbw0q8xs663"))))
(build-system python-build-system) (build-system python-build-system)
(arguments (arguments
`(#:python ,python-2)) `(#:python ,python-2
#:phases
(modify-phases %standard-phases
;; check phase needs to be run before the build phase. If not,
;; coverage-test-runner looks for tests for the built source files,
;; and fails.
(delete 'check)
(add-before 'build 'check
(lambda _
(zero? (system* "make" "check")))))))
(native-inputs
`(("cmdtest" ,cmdtest)
("python2-coverage-test-runner" ,python2-coverage-test-runner)))
(propagated-inputs (propagated-inputs
`(("python2-tracing" ,python2-tracing))) `(("python2-tracing" ,python2-tracing)))
(home-page "https://liw.fi/larch/") (home-page "https://liw.fi/larch/")