aboutsummaryrefslogtreecommitdiff
path: root/eclass
diff options
context:
space:
mode:
authorAndreas Sturmlechner <asturm@gentoo.org>2023-05-25 22:04:48 +0200
committerAndreas Sturmlechner <asturm@gentoo.org>2023-05-27 08:52:08 +0200
commitaf9f38d884d0a009f06774f68c7cf9b3498c12d3 (patch)
treedc632018af11b2d726dfbf6d8af8ac049b441736 /eclass
parentkde-misc/krename: Fix USE=exif cmake arg (diff)
downloadkde-af9f38d884d0a009f06774f68c7cf9b3498c12d3.tar.gz
kde-af9f38d884d0a009f06774f68c7cf9b3498c12d3.tar.bz2
kde-af9f38d884d0a009f06774f68c7cf9b3498c12d3.zip
ecm.eclass: Use QT_QPA_PLATFORM=offscreen instead of virtualx.eclass
Keep inheriting virtualx.eclass since it is expected from ecm.eclass for now. Signed-off-by: Andreas Sturmlechner <asturm@gentoo.org>
Diffstat (limited to 'eclass')
-rw-r--r--eclass/ecm.eclass10
1 files changed, 8 insertions, 2 deletions
diff --git a/eclass/ecm.eclass b/eclass/ecm.eclass
index 542993b6ec..59c6fac220 100644
--- a/eclass/ecm.eclass
+++ b/eclass/ecm.eclass
@@ -29,6 +29,9 @@ esac
if [[ -z ${_ECM_ECLASS} ]]; then
_ECM_ECLASS=1
+inherit cmake flag-o-matic toolchain-funcs
+
+if [[ ${EAPI} == 8 ]]; then
# @ECLASS_VARIABLE: VIRTUALX_REQUIRED
# @DESCRIPTION:
# For proper description see virtualx.eclass manpage.
@@ -36,7 +39,8 @@ _ECM_ECLASS=1
# for tests you should proceed with setting VIRTUALX_REQUIRED=test.
: "${VIRTUALX_REQUIRED:=manual}"
-inherit cmake flag-o-matic toolchain-funcs virtualx
+inherit virtualx
+fi
# @ECLASS_VARIABLE: ECM_NONGUI
# @DEFAULT_UNSET
@@ -610,13 +614,15 @@ ecm_src_test() {
KDE_DEBUG=1 cmake_src_test
}
+ local -x QT_QPA_PLATFORM=offscreen
+
# When run as normal user during ebuild development with the ebuild command,
# tests tend to access the session DBUS. This however is not possible in a
# real emerge or on the tinderbox.
# make sure it does not happen, so bad tests can be recognized and disabled
unset DBUS_SESSION_BUS_ADDRESS DBUS_SESSION_BUS_PID
- if [[ ${VIRTUALX_REQUIRED} = always || ${VIRTUALX_REQUIRED} = test ]]; then
+ if [[ ${EAPI} == 8 ]] && [[ ${VIRTUALX_REQUIRED} = always || ${VIRTUALX_REQUIRED} = test ]]; then
virtx _test_runner
else
_test_runner