Try to provide backtraces on unix buildbots if the test program crashes.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@64034 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -335,7 +335,8 @@
|
|||||||
-->
|
-->
|
||||||
<xsl:template name="run-tests">
|
<xsl:template name="run-tests">
|
||||||
<xsl:param name="content"/>
|
<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>
|
<xsl:param name="msw"><is-msw/></xsl:param>
|
||||||
<test>
|
<test>
|
||||||
<defaults content="{$content}">
|
<defaults content="{$content}">
|
||||||
@@ -347,10 +348,10 @@
|
|||||||
<command>
|
<command>
|
||||||
<xsl:choose>
|
<xsl:choose>
|
||||||
<xsl:when test="$msw = 'true'">
|
<xsl:when test="$msw = 'true'">
|
||||||
<run-tests-win options="{$options}"/>
|
<run-tests-win options="{$options}" guioptions="{$guioptions}"/>
|
||||||
</xsl:when>
|
</xsl:when>
|
||||||
<xsl:otherwise>
|
<xsl:otherwise>
|
||||||
<run-tests-unix options="{$options}"/>
|
<run-tests-unix options="{$options}" guioptions="{$guioptions}"/>
|
||||||
</xsl:otherwise>
|
</xsl:otherwise>
|
||||||
</xsl:choose>
|
</xsl:choose>
|
||||||
</command>
|
</command>
|
||||||
@@ -360,6 +361,7 @@
|
|||||||
|
|
||||||
<xsl:template name="run-tests-win">
|
<xsl:template name="run-tests-win">
|
||||||
<xsl:param name="options"/>
|
<xsl:param name="options"/>
|
||||||
|
<xsl:param name="guioptions"/>
|
||||||
<normalize-space>
|
<normalize-space>
|
||||||
cd tests && runtests.bat
|
cd tests && runtests.bat
|
||||||
</normalize-space>
|
</normalize-space>
|
||||||
@@ -367,10 +369,31 @@ cd tests && runtests.bat
|
|||||||
|
|
||||||
<xsl:template name="run-tests-unix">
|
<xsl:template name="run-tests-unix">
|
||||||
<xsl:param name="options"/>
|
<xsl:param name="options"/>
|
||||||
|
<xsl:param name="guioptions"/>
|
||||||
ERR=0
|
ERR=0
|
||||||
cd tests || exit 0
|
cd tests || exit 0
|
||||||
./test <xsl:value-of select="normalize-space($options)"/> || ERR=$?
|
ulimit -c unlimited
|
||||||
if [ -n "$DISPLAY" -a -x test_gui ]; then ./test_gui || ERR=$?; fi
|
|
||||||
|
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)"/>
|
||||||
|
|
||||||
|
if [ -n "$DISPLAY" -a -x test_gui ]; then
|
||||||
|
try ./test_gui <xsl:value-of select="normalize-space($guioptions)"/>
|
||||||
|
fi
|
||||||
|
|
||||||
exit $ERR
|
exit $ERR
|
||||||
</xsl:template>
|
</xsl:template>
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user