summaryrefslogtreecommitdiff
path: root/gnu
diff options
context:
space:
mode:
authorSharlatan Hellseher <sharlatanus@gmail.com>2025-09-28 22:44:16 +0100
committerSharlatan Hellseher <sharlatanus@gmail.com>2025-09-28 22:47:24 +0100
commit5ea8115afe1bdff7a87925ab228da1aef498f430 (patch)
treef4be80e19b7415c15be1f58c3b041169f48e4103 /gnu
parentf3761b6545eed7e2604b2f484fbbfece8988a8ac (diff)
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
Diffstat (limited to 'gnu')
-rw-r--r--gnu/packages/wm.scm23
1 files changed, 9 insertions, 14 deletions
diff --git a/gnu/packages/wm.scm b/gnu/packages/wm.scm
index 05cd3a1410c..e4853c589b6 100644
--- a/gnu/packages/wm.scm
+++ b/gnu/packages/wm.scm
@@ -1091,33 +1091,28 @@ prompt.")
(build-system pyproject-build-system)
(arguments
(list
+ #:test-flags
+ #~(list "tests")
#: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)
(when tests?
(setenv "HOME" "/tmp")
(mkdir-p "/tmp/.config")
+ (system "Xvfb :1 &")
+ (setenv "DISPLAY" ":1")
;; First run creates /tmp/.config/quicktile.cfg.
- (invoke "xvfb-run"
- "-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")))))))
+ (invoke "./quicktile.sh")))))))
(native-inputs
(list openbox ;necessary for test_functional.py
python-pluggy
python-pytest
python-pytest-cov
python-setuptools
- xvfb-run))
+ xorg-server-for-tests))
(inputs
(list gtk+
libwnck