mirror of
https://codeberg.org/guix/guix.git
synced 2025-10-02 02:15:12 +00:00
gnu: quicktile: Simplify tests.
* gnu/packages/wm.scm (quicktile)[arguments] <test-flags>: Provide option for "tests" directory. <phases>: Use default 'check; add 'pre-check. [native-inputs]: Remove xvfb-run; add xorg-server-for-tests. Change-Id: Ia6d5dea156fd8fb8949bbe26720a027a5591cf9d
This commit is contained in:
parent
f3761b6545
commit
5ea8115afe
1 changed files with 9 additions and 14 deletions
|
@ -1091,33 +1091,28 @@ prompt.")
|
||||||
(build-system pyproject-build-system)
|
(build-system pyproject-build-system)
|
||||||
(arguments
|
(arguments
|
||||||
(list
|
(list
|
||||||
|
#:test-flags
|
||||||
|
#~(list "tests")
|
||||||
#:phases
|
#:phases
|
||||||
#~(modify-phases %standard-phases
|
#~(modify-phases %standard-phases
|
||||||
(replace 'check
|
(add-before 'check 'pre-check
|
||||||
|
;; tests/test_functional.py moves windows around and thus needs
|
||||||
|
;; access to an X server.
|
||||||
(lambda* (#:key tests? #:allow-other-keys)
|
(lambda* (#:key tests? #:allow-other-keys)
|
||||||
(when tests?
|
(when tests?
|
||||||
(setenv "HOME" "/tmp")
|
(setenv "HOME" "/tmp")
|
||||||
(mkdir-p "/tmp/.config")
|
(mkdir-p "/tmp/.config")
|
||||||
|
(system "Xvfb :1 &")
|
||||||
|
(setenv "DISPLAY" ":1")
|
||||||
;; First run creates /tmp/.config/quicktile.cfg.
|
;; First run creates /tmp/.config/quicktile.cfg.
|
||||||
(invoke "xvfb-run"
|
(invoke "./quicktile.sh")))))))
|
||||||
"-a"
|
|
||||||
"./quicktile.sh")
|
|
||||||
;; test_functional.py moves windows around and thus needs
|
|
||||||
;; access to an X server.
|
|
||||||
(invoke "xvfb-run"
|
|
||||||
"-a"
|
|
||||||
"python3"
|
|
||||||
"-m"
|
|
||||||
"pytest"
|
|
||||||
"-vv"
|
|
||||||
"tests")))))))
|
|
||||||
(native-inputs
|
(native-inputs
|
||||||
(list openbox ;necessary for test_functional.py
|
(list openbox ;necessary for test_functional.py
|
||||||
python-pluggy
|
python-pluggy
|
||||||
python-pytest
|
python-pytest
|
||||||
python-pytest-cov
|
python-pytest-cov
|
||||||
python-setuptools
|
python-setuptools
|
||||||
xvfb-run))
|
xorg-server-for-tests))
|
||||||
(inputs
|
(inputs
|
||||||
(list gtk+
|
(list gtk+
|
||||||
libwnck
|
libwnck
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue