]> git.saurik.com Git - wxWidgets.git/blobdiff - build/buildbot/config/include/defs.xml
Fall back to the valid normal bitmap if no state-specific bitmap is set.
[wxWidgets.git] / build / buildbot / config / include / defs.xml
index c0fab9951c17f5af1c581c2b7cb280595794c13d..d589ed387d03723d197906e5bc6a63fbb3bdb94a 100644 (file)
@@ -6,7 +6,7 @@
     Author:     Mike Wetherell
     RCS-ID:     $Id$
     Copyright:  (c) 2007 Mike Wetherell
-    Licence:    wxWidgets licence
+    Licence:    wxWindows licence
 -->
 
 <bot xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
 -->
 <xsl:template name="run-tests">
     <xsl:param name="content"/>
-    <xsl:param name="options"/>
+    <xsl:param name="options" select="'-t'"/>
+    <xsl:param name="guioptions" select="$options"/>
     <xsl:param name="msw"><is-msw/></xsl:param>
     <test>
         <defaults content="{$content}">
             <command>
                 <xsl:choose>
                     <xsl:when test="$msw = 'true'">
-                        <run-tests-win options="{$options}"/>
+                        <run-tests-win options="{$options}" guioptions="{$guioptions}"/>
                     </xsl:when>
                     <xsl:otherwise>
-                        <run-tests-unix options="{$options}"/>
+                        <run-tests-unix options="{$options}" guioptions="{$guioptions}"/>
                     </xsl:otherwise>
                 </xsl:choose>
             </command>
 
 <xsl:template name="run-tests-win">
     <xsl:param name="options"/>
+    <xsl:param name="guioptions"/>
 <normalize-space>
 cd tests &amp;&amp; runtests.bat
 </normalize-space>
@@ -367,10 +369,47 @@ cd tests &amp;&amp; runtests.bat
 
 <xsl:template name="run-tests-unix">
     <xsl:param name="options"/>
+    <xsl:param name="guioptions"/>
 ERR=0
-cd tests
-./test <xsl:value-of select="normalize-space($options)"/> || ERR=$?
-if [ -n "$DISPLAY" -a -x test_gui ]; then ./test_gui || ERR=$?; fi
+cd tests || exit 0
+ulimit -c unlimited
+
+try()
+{
+    rm -f core
+    echo Running: "$@"
+    "$@" || ERR=$?
+
+    if [ -f core -a -x "`which gdb`" ]; then
+        echo Crashed, attempting to display backtrace:
+        gdb -batch -c core -ex 'set pagination off' -ex bt "$1"
+    fi
+
+    echo
+}
+
+try ./test <xsl:value-of select="normalize-space($options)"/>
+
+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>