gnu: zathura: Enable tests.
* gnu/packages/pdf.scm (zathura)[native-inputs]: Add CHECK and XORG-SERVER. [arguments]: Remove #:tests?. Add phase START-XSERVER.
This commit is contained in:
parent
d81581a2b7
commit
ac84754369
|
@ -44,6 +44,7 @@
|
||||||
#:use-module (gnu packages backup)
|
#:use-module (gnu packages backup)
|
||||||
#:use-module (gnu packages base)
|
#:use-module (gnu packages base)
|
||||||
#: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 curl)
|
#:use-module (gnu packages curl)
|
||||||
#:use-module (gnu packages databases)
|
#:use-module (gnu packages databases)
|
||||||
|
@ -499,7 +500,11 @@ by using the poppler rendering engine.")
|
||||||
"zathura-plugindir-environment-variable.patch"))))
|
"zathura-plugindir-environment-variable.patch"))))
|
||||||
(native-inputs `(("pkg-config" ,pkg-config)
|
(native-inputs `(("pkg-config" ,pkg-config)
|
||||||
("gettext" ,gettext-minimal)
|
("gettext" ,gettext-minimal)
|
||||||
("glib:bin" ,glib "bin")))
|
("glib:bin" ,glib "bin")
|
||||||
|
|
||||||
|
;; For tests.
|
||||||
|
("check" ,check)
|
||||||
|
("xorg-server" ,xorg-server)))
|
||||||
(inputs `(("girara" ,girara)
|
(inputs `(("girara" ,girara)
|
||||||
("sqlite" ,sqlite)
|
("sqlite" ,sqlite)
|
||||||
("gtk+" ,gtk+)))
|
("gtk+" ,gtk+)))
|
||||||
|
@ -512,10 +517,19 @@ by using the poppler rendering engine.")
|
||||||
`(#:make-flags
|
`(#:make-flags
|
||||||
`(,(string-append "PREFIX=" (assoc-ref %outputs "out"))
|
`(,(string-append "PREFIX=" (assoc-ref %outputs "out"))
|
||||||
"CC=gcc" "COLOR=0")
|
"CC=gcc" "COLOR=0")
|
||||||
#:tests? #f ; Tests fail: "Gtk cannot open display".
|
|
||||||
#:test-target "test"
|
#:test-target "test"
|
||||||
#:phases
|
#:phases (modify-phases %standard-phases
|
||||||
(modify-phases %standard-phases (delete 'configure))))
|
(delete 'configure)
|
||||||
|
(add-before 'check 'start-xserver
|
||||||
|
;; Tests require a running X server.
|
||||||
|
(lambda* (#:key inputs #:allow-other-keys)
|
||||||
|
(let ((xorg-server (assoc-ref inputs "xorg-server"))
|
||||||
|
(display ":1"))
|
||||||
|
(setenv "DISPLAY" display)
|
||||||
|
;; Don't fail due to missing '/etc/machine-id'.
|
||||||
|
(setenv "DBUS_FATAL_WARNINGS" "0")
|
||||||
|
(zero? (system (string-append xorg-server "/bin/Xvfb "
|
||||||
|
display " &")))))))))
|
||||||
(home-page "https://pwmt.org/projects/zathura/")
|
(home-page "https://pwmt.org/projects/zathura/")
|
||||||
(synopsis "Lightweight keyboard-driven PDF viewer")
|
(synopsis "Lightweight keyboard-driven PDF viewer")
|
||||||
(description "Zathura is a customizable document viewer. It provides a
|
(description "Zathura is a customizable document viewer. It provides a
|
||||||
|
|
Loading…
Reference in New Issue