commit:     1b94a7b1a5444a83a291ced1ca65a70380f656cd
Author:     Anna (cybertailor) Vyalkova <cyber+gentoo <AT> sysrq <DOT> in>
AuthorDate: Thu Oct 24 20:00:37 2024 +0000
Commit:     Anna Vyalkova <cyber+gentoo <AT> sysrq <DOT> in>
CommitDate: Thu Oct 24 20:07:03 2024 +0000
URL:        https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=1b94a7b1

phosh-base/phosh-shell: disable xwayland for tests

Xwayland makes one of tests flaky and also pollutes /tmp/.X11-unix
without proper cleanup.  We're bettter off without it.

Signed-off-by: Anna (cybertailor) Vyalkova <cyber+gentoo <AT> sysrq.in>

 phosh-base/phosh-shell/phosh-shell-0.42.0.ebuild | 26 ++++++++++++++++--------
 1 file changed, 18 insertions(+), 8 deletions(-)

diff --git a/phosh-base/phosh-shell/phosh-shell-0.42.0.ebuild 
b/phosh-base/phosh-shell/phosh-shell-0.42.0.ebuild
index 806533951..257395f00 100644
--- a/phosh-base/phosh-shell/phosh-shell-0.42.0.ebuild
+++ b/phosh-base/phosh-shell/phosh-shell-0.42.0.ebuild
@@ -106,14 +106,24 @@ src_configure() {
 }
 
 src_test() {
-       local -x LC_ALL="C.UTF-8"
-       local -x WLR_RENDERER="pixman"
-
-       virtx meson_src_test --suite unit
-       if use test-full; then
-               # Passing "-j 1" because "phosh:integration / shell" test is 
flaky
-               virtx meson_src_test --suite integration -j 1
-       fi
+       my_src_test() {
+               local -x LC_ALL="C.UTF-8"
+               local -x WLR_RENDERER="pixman"
+               local -x PHOSH_TEST_PHOC_INI="${T}/phoc.ini"
+
+               meson_src_test --suite unit || return 1
+               if use test-full; then
+                       meson_src_test --suite integration || return 1
+               fi
+       }
+
+       # Xwayland breaks "phosh:integration / shell", pollutes /tmp
+       cat data/phoc.ini - > "${T}"/phoc.ini <<- EOF || die
+               [core]
+               xwayland=false
+       EOF
+
+       virtx my_src_test
 }
 
 src_install() {

Reply via email to