Remove testdrive bots.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@61666 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Michael Wetherell
2009-08-14 18:57:15 +00:00
parent 1441bb60df
commit d2da8c9716
5 changed files with 0 additions and 1048 deletions

View File

@@ -1,243 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
Name: include/testdrive-unix.xml
Purpose: Declarations for the testdrive unix build slave
Author: Mike Wetherell
RCS-ID: $Id$
Copyright: (c) 2007 Mike Wetherell
Licence: wxWidgets licence
-->
<bot xmlns:xi="http://www.w3.org/2001/XInclude"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xsl:version="1.0">
<xi:include href="testdrive.xml"/>
<!--
post-checkout - post checkout <command> run by <checkout>
Usage: <post-checkout/>
The command is executed inside the shared checkout dir, and normally it
is used to make a private copy.
-->
<xsl:template name="post-checkout">
<command>
mkdir -p $TOPDIR
chown $USER $TOPDIR
rm -rf $BUILDDIR
cp -pR . $BUILDDIR || { cd; rm -rf $BUILDDIR; exit 1; }
</command>
</xsl:template>
<!--
unarchive - post fetch <command> run by <fetch>
Usage: <unarchive/>
The command is executed in the $HOME directory on the remote machine,
it is used to extract the fetched archive to the build directory.
-->
<xsl:template name="unarchive">
<command>
mkdir -p $TOPDIR
chown $USER $TOPDIR
rm -rf $BUILDDIR
SOURCE=`echo $SOURCE | sed "s|^[^/]|$HOME/&amp;|"`
cd $TOPDIR
case $SOURCE in
*.tar.gz)
gunzip -c $SOURCE | tar xf -
;;
*.tar.bz2)
bunzip2 -c $SOURCE | tar xf -
;;
*.zip)
unzip $SOURCE
;;
esac
mv wx* $BUILDDIR
</command>
</xsl:template>
<!--
configure - make disable-precomp-headers a default configure option for
the testdrive, and post process the Makefiles to use ccache.
Usage: <configure options="-with-foobar"/>
-->
<xsl:template name="configure">
<xsl:param name="content"/>
<xsl:param name="options"/>
<configure>
<copy-with-defaults content="{$content}">
<command>./configure --disable-precomp-headers <xsl:value-of select="normalize-space($options)"/></command>
</copy-with-defaults>
<command>find . -name Makefile | xargs perl -pi -e 's/^(?:CC|CXX) = /$&amp;ccache /'</command>
</configure>
</xsl:template>
<!--
setup - a build step that makes sure any prerequisites are set up for
the current testdrive build.
Usage: <setup/>
<setup cppunit-options="-host=i686-apple-darwin8"/>
One of the things it sets up is cppunit. There is more than one compiler
available on some of the testdrive machines, and generally speaking
cppuint needs to be compiled by the same one that will be used for the
build.
-->
<xsl:template name="setup">
<xsl:param name="content"/>
<xsl:param name="options"/>
<xsl:param name="ccache-configure" select="'./configure INSTALL=./install-sh\ -c --prefix=$HOME --bindir=$OPTDIR/bin'"/>
<xsl:param name="ccache-options"/>
<xsl:param name="cppunit-configure" select="'./configure INSTALL=config/install-sh\ -c --prefix=$HOME --bindir=$OPTDIR/bin --libdir=$OPTDIR/lib --disable-static'"/>
<xsl:param name="cppunit-options"/>
<shellcommand>
<description>setting up</description>
<descriptionDone>set up</descriptionDone>
<haltOnFailure/>
<command>
MINSPACE=1000000
DSPACE=`df -Pk $BUILDDIR | tail -1 | awk '{ print $4 }'`
if [ $DSPACE -lt $MINSPACE ]; then
echo "Disk space low, skipping build"
exit 1
fi
if [ -z "$CCACHE_DIR" ]; then
gunzip -c $HOME/src/ccache-*.tar.gz | tar xf -
cd ccache-*
<xsl:value-of select="concat($ccache-configure, ' ', $ccache-options, ' ', $options)"/>
make
strip ccache
make install
cd $BUILDDIR
rm -r ccache-*
fi
if { cppunit-config --version || "$CPPUNIT_CONFIG" --version; } 2>/dev/null; then
HAVE_CPPUNIT=1
fi
if [ -z "$HAVE_CPPUNIT" ]; then
gunzip -c $HOME/src/cppunit-*.tar.gz | tar xf -
cd cppunit-*
<xsl:value-of select="concat($cppunit-configure, ' ', $cppunit-options, ' ', $options)"/>
make install-strip
chmod +x $OPTDIR/bin/cppunit-config
cd $BUILDDIR
rm -rf cppunit-*
fi
</command>
</shellcommand>
</xsl:template>
<!--
profile - see <steps>.
-->
<xsl:template name="profile">
<command>
set -e
uname -smnr
umask 022
LANG=C
TOPDIR=<get-builddir/>
BUILDDIR=$TOPDIR/build
OPTDIR=$HOME/opt/<basename><get name="builddir"/></basename>
</command>
</xsl:template>
<!--
prologue - see <steps>.
-->
<xsl:template name="prologue">
<command>
INSTALLDIR=$TOPDIR/install
case `uname -sm` in
Linux*86*) PATH=$HOME/linux-x86/bin:$PATH ;;
esac
PATH=$OPTDIR/bin:$PATH
LD_LIBRARY_PATH=$BUILDDIR/lib:$OPTDIR/lib:$LD_LIBRARY_PATH
export LD_LIBRARY_PATH
if { ccache -V; } >/dev/null 2>&amp;1; then
CCACHE_DIR=$TOPDIR/ccache
export CCACHE_DIR
ccache -M 120M
fi
cd $BUILDDIR
if [ -f wx-config ]; then
`./wx-config --cxx` --version
fi
<if-del-on-fail>trap 'cd; rm -rf $BUILDDIR' EXIT</if-del-on-fail>
</command>
</xsl:template>
<!--
epilogue - see <steps>.
-->
<xsl:template name="epilogue">
<xsl:if test="position() != last()">
<if-del-on-fail>
<command>trap '' EXIT</command>
</if-del-on-fail>
</xsl:if>
</xsl:template>
<!--
builddir - override <builddir> to accept a full path
Usage: <builddir>/tmp/wx/foobar</builddir>
Normally builddir is a single directory name not a full path. Override
to allow a working directory to be selected on the remote testdrive
machine.
The actual builddir (i.e. last part 'foobar') as usual must be unique
across all the builds of all the slaves.
-->
<xsl:template name="builddir">
<xsl:param name="content"/>
<builddir>
<basename><xsl:copy-of select="$content"/></basename>
</builddir>
</xsl:template>
<!--
Put builds under /tmp/wx on the remote machines by default.
If the <builddir> element specifies a full path then returns that
as-is, otherwise prepends '/tmp/wx/'.
-->
<xsl:template name="get-builddir">
<xsl:variable name="builddir"><get name="builddir"/></xsl:variable>
<xsl:if test="substring($builddir, 1, 1) != '/'">
<xsl:text>/tmp/wx/</xsl:text>
</xsl:if>
<xsl:value-of select="$builddir"/>
</xsl:template>
<!--
basename - returns the final component of a path
Usage: <basename>/foo/bar</basename>
Evaluates to 'bar'.
-->
<xsl:template name="basename">
<xsl:param name="path"/>
<xsl:choose>
<xsl:when test="contains($path, '/')">
<xsl:call-template name="basename">
<xsl:with-param name="path" select="substring-after($path, '/')"/>
</xsl:call-template>
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="$path"/>
</xsl:otherwise>
</xsl:choose>
</xsl:template>
</bot>

View File

@@ -1,109 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
Name: include/testdrive-win.xml
Purpose: Declarations for the testdrive Windows build slave
Author: Mike Wetherell
RCS-ID: $Id$
Copyright: (c) 2007 Mike Wetherell
Licence: wxWidgets licence
-->
<bot xmlns:xi="http://www.w3.org/2001/XInclude"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xsl:version="1.0">
<xi:include href="testdrive.xml"/>
<!--
post-checkout - post checkout <command> run by <checkout>
Usage: <post-checkout/>
The command is executed inside the shared checkout dir, and normally it
is used to make a private copy.
-->
<xsl:template name="post-checkout">
<command>
if exist "%BUILDDIR%" (rmdir /s/q "%BUILDDIR%" || exit 1)
xcopy /s/q/i . "%BUILDDIR%" || (rmdir /s/q "%BUILDDIR%" &amp; exit 1)
</command>
</xsl:template>
<!--
profile - see <steps>.
-->
<xsl:template name="profile">
<command>
for %I in ("%USERPROFILE%") do set BUILDDIR=%~sI\build
</command>
</xsl:template>
<!--
prologue - see <steps>.
-->
<xsl:template name="prologue">
<xsl:param name="content"/>
<xsl:param name="build"/>
<xsl:variable name="name">
<lower-case>
<get name="name" build="{$build}"/>
</lower-case>
</xsl:variable>
<command>
<xsl:choose>
<xsl:when test="contains($name, 'vc++') or contains($name, 'msvc')">
<prologue-msvc/>
</xsl:when>
<xsl:when test="contains($name, 'cygwin')">
<prologue-cygwin/>
</xsl:when>
<xsl:otherwise>
<prologue-default/>
</xsl:otherwise>
</xsl:choose>
</command>
</xsl:template>
<xsl:template name="prologue-msvc">
call "C:\Program Files\Microsoft Platform SDK for Windows Server 2003 R2\SetEnv.Cmd" /SRV64
set LINK=bufferoverflowu.lib
cd /d "%BUILDDIR%"
</xsl:template>
<xsl:template name="prologue-cygwin">
call h:\cygwin\cyg-vars.bat
PATH=%PATH%;%BUILDDIR%\lib
cd /d "%BUILDDIR%"
sh -c \
</xsl:template>
<xsl:template name="prologue-default">
cd /d "%BUILDDIR%"
</xsl:template>
<!--
epilogue - see <steps>.
-->
<xsl:template name="epilogue">
<xsl:choose>
<xsl:when test="position() = last()">
<command>
<cleanup/>
</command>
</xsl:when>
<xsl:otherwise>
<if-del-on-fail>
<command>
if ERRORLEVEL 1 (<cleanup/>)
</command>
</if-del-on-fail>
</xsl:otherwise>
</xsl:choose>
</xsl:template>
<xsl:template name="cleanup">
cd /d "%USERPROFILE%" &amp; rmdir /s/q "%BUILDDIR%" &amp; exit %ERRORLEVEL%
</xsl:template>
</bot>

View File

@@ -1,182 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
Name: include/testdrive.xml
Purpose: Declarations for the testdrive build slaves
Author: Mike Wetherell
RCS-ID: $Id$
Copyright: (c) 2007 Mike Wetherell
Licence: wxWidgets licence
-->
<bot xmlns:xi="http://www.w3.org/2001/XInclude"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:exsl="http://exslt.org/common"
xmlns:get="local"
xsl:version="1.0">
<xi:include href="defs.xml"/>
<!--
build - add a default <sandbox> element, the same as the previous build.
-->
<xsl:template name="build">
<xsl:param name="content"/>
<build>
<defaults content="{$content}">
<xsl:apply-templates select="get:property('sandbox', get:preceding-builds())[last()]"/>
</defaults>
<xsl:copy-of select="$content"/>
</build>
</xsl:template>
<!--
checkout - build step for source checkout.
Usage: as <svn> with additional <command> element and defaults for
<baseURL> and <defaultBranch>
Typically just:
<checkout/>
for the trunk, or:
<checkout branch="branches/WX_2_8_BRANCH"/>
to checkout a branch.
-->
<xsl:template name="checkout">
<xsl:param name="content"/>
<xsl:param name="branch" select="'trunk'"/>
<xsl:variable name="nodes" select="exsl:node-set($content)"/>
<testdrive-svn>
<profile/>
<xsl:if test="not($nodes/svnurl)">
<xsl:if test="not($nodes/baseURL)">
<baseURL><SVN_URL/></baseURL>
</xsl:if>
<xsl:if test="not($nodes/defaultBranch)">
<defaultBranch><xsl:value-of select="$branch"/></defaultBranch>
</xsl:if>
</xsl:if>
<xsl:if test="not($nodes/command)">
<post-checkout/>
</xsl:if>
<xsl:copy-of select="$content"/>
</testdrive-svn>
</xsl:template>
<!--
fatch - fetch an source tarball/zip over http or ftp.
Usage:
<fetch branch="Daily_HEAD/wxX11.tar.gz"/>
Fetches the URL given by <baseURL>/$branch, where the current default
for <baseURL> is "http://biolpc22.york.ac.uk/pub".
The archive is then extracted by executing <profile/> then <unarchive/>
on the remote machine.
-->
<xsl:template name="fetch">
<xsl:param name="content"/>
<xsl:param name="branch">Daily_HEAD/wxWidgets.tar.gz</xsl:param>
<wget>
<profile/>
<defaults content="{$content}">
<baseURL><SNAPSHOT_URL/></baseURL>
<defaultBranch><xsl:value-of select="$branch"/></defaultBranch>
<unarchive/>
</defaults>
<xsl:copy-of select="$content"/>
</wget>
</xsl:template>
<!--
steps - overrides <steps> to prepend <profile/> and <prologue/> and
append <epilogue/> to the <command/> of each build step.
Usage: as <steps>
The differences between <profile/> and <prologue/> are:
1. <profile/> is also used by <checkout> for its post checkout command.
2. In <profile> the current node is the <steps> element.
3. In <prologue> the current node is the build step inside a generated
nodeset. The current build is passes as a parameter.
-->
<xsl:template name="steps">
<xsl:param name="content"/>
<xsl:variable name="profile"><profile/></xsl:variable>
<xsl:variable name="build" select="get:build()"/>
<steps>
<xsl:for-each select="exsl:node-set($content)/*">
<xsl:choose>
<xsl:when test="contains(name(), 'svn') or
contains(name(), 'get')">
<xsl:copy-of select="."/>
</xsl:when>
<xsl:otherwise>
<xsl:copy>
<xsl:copy-of select="@*"/>
<xsl:copy-of select="$profile"/>
<prologue build="{$build}"/>
<xsl:copy-of select="node()"/>
<xsl:if test="not(command)">
<command/>
</xsl:if>
<epilogue build="{$build}"/>
</xsl:copy>
</xsl:otherwise>
</xsl:choose>
</xsl:for-each>
</steps>
</xsl:template>
<!--
if-del-on-fail - used in the context of a build step, copies its content
if the build step should cleanup on failure.
Usage: <if-del-on-fail>foobar</if-del-on-fail>
On the testdrive the working directory is deleted after a build to save
space. If the step has <haltOnFailure/> (which is the default or
<configure> and <compile> steps) then this cleanup needs to happen
whenever the step fails.
-->
<xsl:template name="if-del-on-fail">
<xsl:param name="content"/>
<xsl:if test = "position() = last() or
haltOnFailure = '' or
haltOnFailure = 'true' or
(not(haltOnFailure) and
(name() = 'configure' or name() = 'compile'))">
<xsl:copy-of select="$content"/>
</xsl:if>
</xsl:template>
<!--
Add slave locks so that each testdrive machine only runs one bulid at a
time.
-->
<create-locks/>
<xsl:template name="create-locks">
<xsl:variable name="rtf">
<xsl:apply-templates select="get:property('sandbox', get:all-builds())"/>
</xsl:variable>
<xsl:variable name="sandboxes" select="exsl:node-set($rtf)/sandbox"/>
<xsl:for-each select="$sandboxes">
<xsl:variable name="text" select="text()"/>
<xsl:variable name="position" select="position()"/>
<xsl:if test="not($sandboxes[text() = $text and position() &lt; $position])">
<slavelock>
<name><xsl:value-of select="node()"/></name>
</slavelock>
</xsl:if>
</xsl:for-each>
</xsl:template>
<xsl:template name="sandbox">
<xsl:param name="content"/>
<sandbox><xsl:copy-of select="$content"/></sandbox>
<lock><xsl:copy-of select="$content"/></lock>
</xsl:template>
</bot>