gnu: gpodder: Run tests.
authorPierre Langlois <pierre.langlois@gmx.com>
Wed, 15 Apr 2020 16:41:02 +0000 (18:41 +0200)
committerLudovic Courtès <ludo@gnu.org>
Fri, 17 Apr 2020 11:03:02 +0000 (13:03 +0200)
* gnu/packages/gpodder.scm (gpodder)[native-inputs]: Add python-coverage and
python-minimock.
[arguments]: Replace the 'check phase and invoke "make unittest".

Signed-off-by: Ludovic Courtès <ludo@gnu.org>
gnu/packages/gpodder.scm

index 84c63ce..98d7a84 100644 (file)
@@ -51,7 +51,9 @@
        (file-name (git-file-name name version))))
     (build-system python-build-system)
     (native-inputs
-     `(("intltool" ,intltool)))
+     `(("intltool" ,intltool)
+       ("python-coverage" ,python-coverage)
+       ("python-minimock" ,python-minimock)))
     (inputs
      `(("gtk+" ,gtk+)
        ("python-pygobject" ,python-pygobject)
                (substitute* "src/gpodder/util.py"
                  (("xdg-open") (string-append xdg-utils "/bin/xdg-open")))
                #t)))
+         (replace 'check
+           (lambda _
+             ; The `unittest' target overrides the PYTHONPATH variable.
+             (substitute* "makefile"
+               (("PYTHONPATH=src/") "PYTHONPATH=${PYTHONPATH}:src/"))
+             (invoke "make" "unittest")))
          ;; 'msgmerge' introduces non-determinism by resetting the
          ;; POT-Creation-Date in .po files.
          (add-before 'install 'do-not-run-msgmerge