mirror of
https://git.in.rschanz.org/ryan77627/guix.git
synced 2024-12-25 05:48:07 -05:00
gnu: weechat: Run tests.
* gnu/packages/irc.scm (weechat)[native-inputs]: Add cpputest. [arguments]: Add ‘-DENABLE_TESTS=ON’ to #:configure-flags. Add ‘disable-failing-tests’ phase to do just that. Run the others.
This commit is contained in:
parent
f45e314e19
commit
00840ee004
1 changed files with 29 additions and 11 deletions
|
@ -163,8 +163,11 @@ (define-public weechat
|
||||||
"1l854dramvn9vfba7jpazkjwm4k4i5pshq58vjv6z2mxmcp5hhv9"))
|
"1l854dramvn9vfba7jpazkjwm4k4i5pshq58vjv6z2mxmcp5hhv9"))
|
||||||
(patches (search-patches "weechat-python.patch"))))
|
(patches (search-patches "weechat-python.patch"))))
|
||||||
(build-system cmake-build-system)
|
(build-system cmake-build-system)
|
||||||
(native-inputs `(("gettext" ,gettext-minimal)
|
(native-inputs
|
||||||
("pkg-config" ,pkg-config)))
|
`(("gettext" ,gettext-minimal)
|
||||||
|
("pkg-config" ,pkg-config)
|
||||||
|
;; For tests.
|
||||||
|
("cpputest" ,cpputest)))
|
||||||
(inputs `(("ncurses" ,ncurses)
|
(inputs `(("ncurses" ,ncurses)
|
||||||
("libgcrypt" ,libgcrypt "out")
|
("libgcrypt" ,libgcrypt "out")
|
||||||
("zlib" ,zlib)
|
("zlib" ,zlib)
|
||||||
|
@ -177,15 +180,30 @@ (define-public weechat
|
||||||
("perl" ,perl)
|
("perl" ,perl)
|
||||||
("tcl" ,tcl)))
|
("tcl" ,tcl)))
|
||||||
(arguments
|
(arguments
|
||||||
`(#:tests? #f ; tests require cpputime
|
`(#:configure-flags
|
||||||
#:phases (modify-phases %standard-phases
|
(list "-DENABLE_TESTS=ON") ; ‘make test’ fails otherwise
|
||||||
(add-after 'install 'wrap
|
#:phases
|
||||||
(lambda* (#:key inputs outputs #:allow-other-keys)
|
(modify-phases %standard-phases
|
||||||
(let ((out (assoc-ref outputs "out"))
|
(add-after 'unpack 'disable-failing-tests
|
||||||
(py2 (assoc-ref inputs "python")))
|
;; For reasons best left to the imagination, CppUTest cannot skip
|
||||||
(wrap-program (string-append out "/bin/weechat")
|
;; more than one single test... Resort to manual patching instead.
|
||||||
`("PATH" ":" prefix (,(string-append py2 "/bin"))))
|
;; See <https://cpputest.github.io/manual.html#command_line>.
|
||||||
#t))))))
|
(λ _
|
||||||
|
;; Don't test plugin support for languages we don't enable.
|
||||||
|
(substitute* "tests/unit/test-plugins.cpp"
|
||||||
|
((".*\\$\\{plugin.name\\} == (javascript|php|ruby)" all)
|
||||||
|
(string-append "// SKIP" all)))
|
||||||
|
(substitute* "tests/scripts/test-scripts.cpp"
|
||||||
|
((".*\\{ \"(jvascript|php|ruby)\", " all) ; sic
|
||||||
|
(string-append "// SKIP" all)))
|
||||||
|
#t))
|
||||||
|
(add-after 'install 'wrap
|
||||||
|
(lambda* (#:key inputs outputs #:allow-other-keys)
|
||||||
|
(let ((out (assoc-ref outputs "out"))
|
||||||
|
(py2 (assoc-ref inputs "python")))
|
||||||
|
(wrap-program (string-append out "/bin/weechat")
|
||||||
|
`("PATH" ":" prefix (,(string-append py2 "/bin"))))
|
||||||
|
#t))))))
|
||||||
(synopsis "Extensible chat client")
|
(synopsis "Extensible chat client")
|
||||||
(description "WeeChat (Wee Enhanced Environment for Chat) is an
|
(description "WeeChat (Wee Enhanced Environment for Chat) is an
|
||||||
@dfn{Internet Relay Chat} (IRC) client, which is designed to be light and fast.
|
@dfn{Internet Relay Chat} (IRC) client, which is designed to be light and fast.
|
||||||
|
|
Loading…
Reference in a new issue