Subject: bug#44197: closed (Disable khal test suite? (was Re: [bug#44197] [PATCH] gnu: khal: Update to 0.10.2.))

From: [email-masked] (GNU bug Tracking System)
Date: Mon, 26 Oct 2020 17:40:02 +0000

Your bug report

#44197: [PATCH] gnu: khal: Update to 0.10.2.

which was filed against the guix-patches package, has been closed.

The explanation is attached below, along with your original report.
If you require more details, please reply to [email-masked].

-- 
44197: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=44197
GNU Bug Tracking System
Contact [email-masked] with problems

Subject: Disable khal test suite? (was Re: [bug#44197] [PATCH] gnu: khal: Update to 0.10.2.)
From: Leo Famulari <[email-masked]>
To: Lars-Dominik Braun <[email-masked]>
Cc: [email-masked], [email-masked]
Date: Mon, 26 Oct 2020 13:39:00 -0400
List-Id: <debbugs-submit.debbugs.gnu.org>

On Mon, Oct 26, 2020 at 08:37:24AM +0100, Lars-Dominik Braun wrote:
> Thanks for taking care of this,

Thanks for taking care of this package I use every day! :)

> commit 503169b39de09e3c3969bb2dc92464f054d79560
> Author: Lars-Dominik Braun <[email-masked]>
> Date:   Sat Oct 24 20:17:48 2020 +0200
> 
>     gnu: khal: Update to 0.10.2.
>     
>     * gnu/packages/calendar.scm (khal): Update to 0.10.2.
>     [source]: Drop upstream patches.
>     [arguments]: Drop substitute* for bug fixed upstream and ignore failing
>     test in 'check.
>     [inputs]: Add missing inputs.

Pushed as 21955a54da2bc171f2745486f62aceeacea7993a.

I wonder, should we disable the test suite entirely? In my experience,
it's not reliable — different parts of it will succeed or fail on
subsequent runs, or on different computers, or when verbose output is
enable, etc. The upstream bug tracker is full of reports like that.

For example:

https://github.com/pimutils/khal/issues/860

Subject: [PATCH] gnu: khal: Update to 0.10.2.
From: Lars-Dominik Braun <[email-masked]>
To: [email-masked]
Date: Sat, 24 Oct 2020 20:23:33 +0200
List-Id: <debbugs-submit.debbugs.gnu.org>

* gnu/packages/calendar.scm (khal): Update to 0.10.2.
[source]: Drop upstream patches.
[arguments]: Drop substitute* for bug fixed upstream and ignore failing
test in 'check.
[inputs]: Add missing inputs.
---
 gnu/packages/calendar.scm | 46 +++++++++++++++------------------------
 1 file changed, 18 insertions(+), 28 deletions(-)

diff --git a/gnu/packages/calendar.scm b/gnu/packages/calendar.scm
index 1dde978d72..dabf8bfb15 100644
--- a/gnu/packages/calendar.scm
+++ b/gnu/packages/calendar.scm
@@ -168,23 +168,13 @@ data units.")
 (define-public khal
   (package
     (name "khal")
-    (version "0.10.1")
+    (version "0.10.2")
     (source (origin
-             (method url-fetch)
-             (uri (pypi-uri "khal" version))
-             (sha256
-              (base32
-               "1r8bkgjwkh7i8ygvsv51h1cnax50sb183vafg66x5snxf3dgjl6l"))
-             (patches
-               (list
-                 (origin
-                   (method url-fetch)
-                   ;; This patch fixes an issue with python-urwid-2.1.0
-                   (uri "https://github.com/pimutils/khal/commit/2c5990c2de2015b251ba23617faa40ee11b8c22a.patch")
-                   (file-name "khal-compat-urwid-2.1.0.patch")
-                   (sha256
-                    (base32
-                     "11nd8hkjz68imwqqn0p54zmb53z2pfxmzchaviy7jc1ky5s9l663")))))))
+              (method url-fetch)
+              (uri (pypi-uri "khal" version))
+              (sha256
+               (base32
+                "11qhrga44knlnp88py9p547d4nr5kn041d2nszwa3dqw7mf22ks9"))))
     (build-system python-build-system)
     (arguments
      `(#:phases (modify-phases %standard-phases
@@ -198,19 +188,14 @@ data units.")
              "doc/build/man/khal.1"
              (string-append (assoc-ref outputs "out") "/share/man/man1"))
             #t))
-        (add-before 'check 'fix-tests
-          (lambda _
-            ;; Reported upstream: <https://github.com/pimutils/khal/issues/947>.
-            (substitute* "tests/cli_test.py"
-             (("Invalid value for \"\\[ICS\\]\"") "Invalid value for \\'[ICS]\\'"))
-            #t))
         (replace 'check
-          (lambda* (#:key inputs #:allow-other-keys)
-            ;; The tests require us to choose a timezone.
-            (setenv "TZ"
-                    (string-append (assoc-ref inputs "tzdata")
-                                   "/share/zoneinfo/Zulu"))
-            (invoke "py.test" "tests"))))))
+          (lambda* (#:key inputs tests? #:allow-other-keys)
+            (if tests?
+                (begin
+                  ;; The tests require us to choose a timezone.
+                  (setenv "TZ" "UTC")
+                  ;; The disabled test expects /dev/tty.
+                  (invoke "pytest" "tests" "-k" "not test_import_from_stdin"))))))))
     (native-inputs
      `(("python-pytest" ,python-pytest)
        ("python-pytest-cov" ,python-pytest-cov)
@@ -229,6 +214,11 @@ data units.")
        ("python-icalendar" ,python-icalendar)
        ("python-tzlocal" ,python-tzlocal)
        ("python-urwid" ,python-urwid)
+       ("python-pytz" ,python-pytz)
+       ("python-setproctitle" ,python-setproctitle)
+       ("python-atomicwrites" ,python-atomicwrites)
+       ("python-click" ,python-click)
+       ("python-click-log" ,python-click-log)
        ("python-pyxdg" ,python-pyxdg)))
     (synopsis "Console calendar program")
     (description "Khal is a standards based console calendar program,
-- 
2.26.2