GNU bug report logs - #28282
Add tests for a python2-cliapp, python2-ttystatus and python2-larch

Previous Next

Package: guix-patches;

Reported by: Arun Isaac <arunisaac <at> systemreboot.net>

Date: Tue, 29 Aug 2017 19:59:01 UTC

Severity: normal

Done: Arun Isaac <arunisaac <at> systemreboot.net>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 28282 in the body.
You can then email your comments to 28282 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to guix-patches <at> gnu.org:
bug#28282; Package guix-patches. (Tue, 29 Aug 2017 19:59:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Arun Isaac <arunisaac <at> systemreboot.net>:
New bug report received and forwarded. Copy sent to guix-patches <at> gnu.org. (Tue, 29 Aug 2017 19:59:03 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Arun Isaac <arunisaac <at> systemreboot.net>
To: guix-patches <at> gnu.org
Subject: Add tests for a python2-cliapp, python2-ttystatus and python2-larch
Date: Wed, 30 Aug 2017 01:27:47 +0530
Patches follow...




Information forwarded to guix-patches <at> gnu.org:
bug#28282; Package guix-patches. (Tue, 29 Aug 2017 20:10:02 GMT) Full text and rfc822 format available.

Message #8 received at 28282 <at> debbugs.gnu.org (full text, mbox):

From: Arun Isaac <arunisaac <at> systemreboot.net>
To: 28282 <at> debbugs.gnu.org
Cc: Arun Isaac <arunisaac <at> systemreboot.net>
Subject: [PATCH 2/3] gnu: python2-ttystatus: Enable tests.
Date: Wed, 30 Aug 2017 01:39:04 +0530
* gnu/packages/python.scm (python2-ttystatus)[arguments]: Replace 'check'
phase with custom function.
---
 gnu/packages/python.scm | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/gnu/packages/python.scm b/gnu/packages/python.scm
index b81e6e47c..675742696 100644
--- a/gnu/packages/python.scm
+++ b/gnu/packages/python.scm
@@ -14031,8 +14031,20 @@ iterating over input files.")
         (base32
          "0vivqbw7ddhsq1zj3g9cvvv4f0phl0pis2smsnwcr2szz2fk3hl6"))))
     (build-system python-build-system)
+    (native-inputs
+     `(("python2-coverage-test-runner" ,python2-coverage-test-runner)
+       ("python2-pep8" ,python2-pep8)))
     (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")))))))
     (home-page "https://liw.fi/ttystatus/")
     (synopsis "Python library for showing progress reporting and
 status updates on terminals")
-- 
2.13.4





Information forwarded to guix-patches <at> gnu.org:
bug#28282; Package guix-patches. (Tue, 29 Aug 2017 20:10:02 GMT) Full text and rfc822 format available.

Message #11 received at 28282 <at> debbugs.gnu.org (full text, mbox):

From: Arun Isaac <arunisaac <at> systemreboot.net>
To: 28282 <at> debbugs.gnu.org
Cc: Arun Isaac <arunisaac <at> systemreboot.net>
Subject: [PATCH 1/3] gnu: python2-cliapp: Enable tests.
Date: Wed, 30 Aug 2017 01:39:03 +0530
* gnu/packages/python.scm (python2-cliapp)[arguments]: Replace 'check' phase
with custom function.
---
 gnu/packages/python.scm | 17 ++++++++++++++++-
 1 file changed, 16 insertions(+), 1 deletion(-)

diff --git a/gnu/packages/python.scm b/gnu/packages/python.scm
index 3609ff055..b81e6e47c 100644
--- a/gnu/packages/python.scm
+++ b/gnu/packages/python.scm
@@ -13991,7 +13991,22 @@ parse many formal languages.")
          "1i9gik0xrj6jmi95s5w988jl1y265baz5xm5pbqdyvsh8h9ln6yq"))))
     (build-system python-build-system)
     (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 _
+             ;; Disable python3 tests
+             (substitute* "check"
+               (("python3") "# python3"))
+             (zero? (system* "./check")))))))
+    (native-inputs
+     `(("python2-coverage-test-runner" ,python2-coverage-test-runner)
+       ("python2-pep8" ,python2-pep8)))
     (propagated-inputs
      `(("python2-pyaml" ,python2-pyaml)))
     (home-page "https://liw.fi/cliapp/")
-- 
2.13.4





Information forwarded to guix-patches <at> gnu.org:
bug#28282; Package guix-patches. (Tue, 29 Aug 2017 20:10:03 GMT) Full text and rfc822 format available.

Message #14 received at 28282 <at> debbugs.gnu.org (full text, mbox):

From: Arun Isaac <arunisaac <at> systemreboot.net>
To: 28282 <at> debbugs.gnu.org
Cc: Arun Isaac <arunisaac <at> systemreboot.net>
Subject: [PATCH 3/3] gnu: python2-larch: Enable tests.
Date: Wed, 30 Aug 2017 01:39:05 +0530
* 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.
---
 gnu/local.mk                                       |  1 +
 ...ython2-larch-coverage-4.0a6-compatibility.patch | 29 ++++++++++++++++++++++
 gnu/packages/python.scm                            | 17 ++++++++++++-
 3 files changed, 46 insertions(+), 1 deletion(-)
 create mode 100644 gnu/packages/patches/python2-larch-coverage-4.0a6-compatibility.patch

diff --git a/gnu/local.mk b/gnu/local.mk
index 2ff87dfa5..e8297272f 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -958,6 +958,7 @@ dist_patch_DATA =						\
   %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-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/python2-rdflib-drop-sparqlwrapper.patch	\
   %D%/packages/patches/python-statsmodels-fix-tests.patch	\
diff --git a/gnu/packages/patches/python2-larch-coverage-4.0a6-compatibility.patch b/gnu/packages/patches/python2-larch-coverage-4.0a6-compatibility.patch
new file mode 100644
index 000000000..f1db5d7c3
--- /dev/null
+++ b/gnu/packages/patches/python2-larch-coverage-4.0a6-compatibility.patch
@@ -0,0 +1,29 @@
+From ca548da9ba78ddee90779051210e3e89185e4f7d Mon Sep 17 00:00:00 2001
+From: Michel Alexandre Salim <michel <at> 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
+
diff --git a/gnu/packages/python.scm b/gnu/packages/python.scm
index 675742696..77d7f6e29 100644
--- a/gnu/packages/python.scm
+++ b/gnu/packages/python.scm
@@ -68,6 +68,7 @@
   #:use-module (gnu packages attr)
   #:use-module (gnu packages backup)
   #:use-module (gnu packages bash)
+  #:use-module (gnu packages check)
   #:use-module (gnu packages compression)
   #:use-module (gnu packages crypto)
   #:use-module (gnu packages databases)
@@ -14091,12 +14092,26 @@ happens using the @code{logging} library.")
        (uri (string-append
              "http://git.liw.fi/cgi-bin/cgit/cgit.cgi/larch/snapshot/larch-"
              version ".tar.gz"))
+       (patches (search-patches
+                 "python2-larch-coverage-4.0a6-compatibility.patch"))
        (sha256
         (base32
          "1p4knkkavlqymgciz2wbcnfrdgdbafhg14maplnk4vbw0q8xs663"))))
     (build-system python-build-system)
     (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
      `(("python2-tracing" ,python2-tracing)))
     (home-page "https://liw.fi/larch/")
-- 
2.13.4





Information forwarded to guix-patches <at> gnu.org:
bug#28282; Package guix-patches. (Thu, 31 Aug 2017 13:27:03 GMT) Full text and rfc822 format available.

Message #17 received at 28282 <at> debbugs.gnu.org (full text, mbox):

From: ludo <at> gnu.org (Ludovic Courtès)
To: Arun Isaac <arunisaac <at> systemreboot.net>
Cc: 28282 <at> debbugs.gnu.org
Subject: Re: [bug#28282] [PATCH 2/3] gnu: python2-ttystatus: Enable tests.
Date: Thu, 31 Aug 2017 15:26:37 +0200
Arun Isaac <arunisaac <at> systemreboot.net> skribis:

> * gnu/packages/python.scm (python2-ttystatus)[arguments]: Replace 'check'
> phase with custom function.

LGTM, thanks!




Information forwarded to guix-patches <at> gnu.org:
bug#28282; Package guix-patches. (Thu, 31 Aug 2017 13:28:01 GMT) Full text and rfc822 format available.

Message #20 received at 28282 <at> debbugs.gnu.org (full text, mbox):

From: ludo <at> gnu.org (Ludovic Courtès)
To: Arun Isaac <arunisaac <at> systemreboot.net>
Cc: 28282 <at> debbugs.gnu.org
Subject: Re: [bug#28282] [PATCH 3/3] gnu: python2-larch: Enable tests.
Date: Thu, 31 Aug 2017 15:27:11 +0200
Arun Isaac <arunisaac <at> systemreboot.net> skribis:

> * 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.

LGTM, thanks!




Reply sent to Arun Isaac <arunisaac <at> systemreboot.net>:
You have taken responsibility. (Fri, 01 Sep 2017 06:10:02 GMT) Full text and rfc822 format available.

Notification sent to Arun Isaac <arunisaac <at> systemreboot.net>:
bug acknowledged by developer. (Fri, 01 Sep 2017 06:10:02 GMT) Full text and rfc822 format available.

Message #25 received at 28282-done <at> debbugs.gnu.org (full text, mbox):

From: Arun Isaac <arunisaac <at> systemreboot.net>
To: Ludovic Courtès <ludo <at> gnu.org>
Cc: 28282-done <at> debbugs.gnu.org
Subject: Re: [bug#28282] [PATCH 3/3] gnu: python2-larch: Enable tests.
Date: Fri, 01 Sep 2017 11:36:58 +0530
Pushed all, thanks!




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Fri, 29 Sep 2017 11:24:06 GMT) Full text and rfc822 format available.

This bug report was last modified 7 years and 324 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.