gnu: krunner: Enable all tests.

* gnu/packages/kde-frameworks.scm (krunner): Use gexp.
[inputs]: Add kactivities.
[arguments]: Enable all tests.

Signed-off-by: Marius Bakke <marius@gnu.org>
This commit is contained in:
Petr Hodina 2022-09-27 21:30:01 +02:00 committed by Marius Bakke
parent 3340dcca5a
commit fa2969388c
No known key found for this signature in database
GPG key ID: A2A06DF2A33A54FA

View file

@ -2940,7 +2940,8 @@ (define-public krunner
;; For tests.
dbus))
(inputs
(list kauth
(list kactivities
kauth
kbookmarks
kcodecs
kcompletion
@ -2961,26 +2962,24 @@ (define-public krunner
solid
threadweaver))
(arguments
`(#:phases
(modify-phases %standard-phases
(add-after 'unpack 'fix-paths-for-test
;; This test tries to access paths like /home, /usr/bin and /bin/ls
;; which don't exist in the build-container. Change to existing paths.
(lambda* (#:key inputs #:allow-other-keys)
(substitute* "autotests/runnercontexttest.cpp"
(("/home\"") "/tmp\"") ;; single path-part
(("//usr/bin\"") (string-append (getcwd) "\"")) ;; multiple path-parts
(("/bin/ls")
(search-input-file inputs "/bin/ls")))))
(replace 'check
(lambda* (#:key tests? #:allow-other-keys)
(when tests?
(setenv "HOME" (getcwd))
(setenv "QT_QPA_PLATFORM" "offscreen")
(invoke "dbus-launch" "ctest"
"-E" ;; Some tests fail
"(runnercontexttest|dbusrunnertest|\
runnermanagersinglerunnermodetest|runnermanagertest)")))))))
(list
#:phases
#~(modify-phases %standard-phases
(add-after 'unpack 'fix-paths-for-test
;; This test tries to access paths like /home, /usr/bin and /bin/ls
;; which don't exist in the build-container. Change to existing paths.
(lambda* (#:key inputs #:allow-other-keys)
(substitute* "autotests/runnercontexttest.cpp"
(("/home\"") "/tmp\"") ;; single path-part
(("//usr/bin\"") (string-append (getcwd) "\"")) ;; multiple path-parts
(("/bin/ls")
(search-input-file inputs "/bin/ls")))))
(replace 'check
(lambda* (#:key tests? #:allow-other-keys)
(when tests?
(setenv "HOME" (getcwd))
(setenv "QT_QPA_PLATFORM" "offscreen")
(invoke "dbus-launch" "ctest")))))))
(home-page "https://community.kde.org/Frameworks")
(synopsis "Framework for Plasma runners")
(description "The Plasma workspace provides an application called KRunner