1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72
|
# get standard environment, filters and checks
. ./common.product
. ./common.filter
. ./common.check
. ./common.config
PCP_STDERR=""; export PCP_STDERR
_check_display
if [ "$PCPQA_DESKTOP_HACK" = true ]
then
#
# hackery for dbus-based environments
#
unset DBUS_SESSION_BUS_PID DBUS_SESSION_BUS_ADDRESS
if which dbus-daemon >/dev/null 2>&1
then
# recipe based on
# https://github.com/flatpak/flatpak/commit/6cc8062cfb3f9410d54a27e7ccca77c103e441e8
# to address https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=836285
#
dbus-daemon --fork --session --print-address=3 --print-pid=4 3>$tmp.dbus.address 4>$tmp.dbus.pid
DBUS_SESSION_BUS_ADDRESS="`cat $tmp.dbus.address`"; export DBUS_SESSION_BUS_ADDRESS
DBUS_SESSION_BUS_PID="`cat $tmp.dbus.pid`"
if kill -0 "$DBUS_SESSION_BUS_PID" >/dev/null 2>&1
then
:
else
echo "common.qt: Failed to start dbus-daemon"
fi
fi
fi
# general trap handler cleanup routine for qt checkers
_cleanup_qt()
{
if [ "$PCPQA_DESKTOP_HACK" = true ]
then
# if we started a dbus-daemon above, we should clean it up
[ -z "$DBUS_SESSION_BUS_PID" ] || kill $DBUS_SESSION_BUS_PID
unset DBUS_SESSION_BUS_PID DBUS_SESSION_BUS_ADDRESS
unset XDG_RUNTIME_DIR
fi
_clean_display
cd $here
$sudo rm -rf $tmp $tmp.*
}
# Qt related (include libGL, MESA, X11) warnings that sometimes appear ...
#
_filter_qt()
{
sed \
-e '/^QStandardPaths: XDG_RUNTIME_DIR not set.*/d' \
-e '/Qt: Session management error: Authentication Rejected/d' \
-e '/QObject::connect: No such slot SoQtGLWidgetP::gl_changed()/d' \
-e "/QObject::connect: (sender name: 'QtGLAreaWindow')/d" \
-e '/libGL error: No matching fbConfigs/d' \
-e '/libGL error: failed to load driver: swrast/d' \
-e '/^MESA: error: ZINK: vkCreateInstance failed /d' \
-e '/^MESA: error: ZINK: failed to choose pdev/d' \
-e '/^MESA-LOADER: failed to open zink: Cannot open /d' \
-e '/^MESA-LOADER: failed to open swrast: Cannot open /d' \
-e '/^glx: failed to create drisw screen/d' \
-e '/^failed to load driver: zink/d' \
-e '/^qt.glx: qglx_findConfig: Failed to finding matching FBConfig for QSurfaceFormat/d' \
-e '/^No XVisualInfo for format QSurfaceFormat/d' \
-e '/^Falling back to using screens root_visual/d' \
# end
}
|