Check for window manager before running GUI tests on unix.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65851 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Michael Wetherell 2010-10-20 13:08:32 +00:00
parent 02a4d0b7a0
commit ab3332517f

View File

@ -390,10 +390,26 @@ try()
try ./test <xsl:value-of select="normalize-space($options)"/>
if [ -n "$DISPLAY" -a -x test_gui ]; then
try ./test_gui <xsl:value-of select="normalize-space($guioptions)"/>
test -x test_gui || exit $ERR
if [ -z "$DISPLAY" ]; then
echo '$DISPLAY is not set, skipping GUI tests.'
exit $ERR
fi
echo 'Checking window manager:'
WINDOW_MANAGER=$(xprop -root 32x '\n$0\n' _NET_SUPPORTING_WM_CHECK | grep ^0x)
if [ -z "$WINDOW_MANAGER" ]; then
echo 'Window manager not present, skipping GUI tests.'
exit $ERR
fi
xprop -id $WINDOW_MANAGER 8s _NET_WM_NAME
echo
try ./test_gui <xsl:value-of select="normalize-space($guioptions)"/>
exit $ERR
</xsl:template>