]> git.saurik.com Git - wxWidgets.git/commitdiff
Add <fetch> class to allow building tarballs from the York site.
authorMichael Wetherell <mike.wetherell@ntlworld.com>
Sat, 16 Feb 2008 15:49:07 +0000 (15:49 +0000)
committerMichael Wetherell <mike.wetherell@ntlworld.com>
Sat, 16 Feb 2008 15:49:07 +0000 (15:49 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@51845 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

build/buildbot/config/include/defs.xml
build/buildbot/config/include/testdrive-unix.xml
build/buildbot/config/include/testdrive.xml
build/buildbot/config/testdrive-unix.xml

index be0f7067f3f2007a3e0a59618330a5fa30bf1380..94c0d7909d9e0193c2af361c8263a731be4e4866 100644 (file)
@@ -22,6 +22,7 @@
 <xsl:template name="SVN_URL">http://svn.wxwidgets.org/svn/wx/wxWidgets/</xsl:template>
 <xsl:template name="STABLE_BRANCH">branches/WX_2_8_BRANCH</xsl:template>
 <xsl:variable name="STABLE_BRANCH"><STABLE_BRANCH/></xsl:variable>
 <xsl:template name="SVN_URL">http://svn.wxwidgets.org/svn/wx/wxWidgets/</xsl:template>
 <xsl:template name="STABLE_BRANCH">branches/WX_2_8_BRANCH</xsl:template>
 <xsl:variable name="STABLE_BRANCH"><STABLE_BRANCH/></xsl:variable>
+<xsl:template name="SNAPSHOT_URL">http://biolpc22.york.ac.uk/pub</xsl:template>
 
 <!--
     checkout - build step for source checkout.
 
 <!--
     checkout - build step for source checkout.
index 7ad24c88674b51358377ea40da65148fb251acf2..38fc0592363db0de8e048157c1d68b080dc5d46a 100644 (file)
@@ -32,6 +32,36 @@ cp -pR . $BUILDDIR || { cd; rm -rf $BUILDDIR; exit 1; }
 </command>
 </xsl:template>
 
 </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.
 <!--
     configure - make disable-precomp-headers a default configure option for
                 the testdrive, and post process the Makefiles to use ccache.
index e9f7c9f3c924e2a5f81def484ff7385c3d731d8b..9bcbfc15eae9d145c86c32855be3723e031b859c 100644 (file)
@@ -47,6 +47,7 @@
     <xsl:param name="branch" select="'trunk'"/>
     <xsl:variable name="nodes" select="exsl:node-set($content)"/>
     <testdrive-svn>
     <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 test="not($nodes/svnurl)">
             <xsl:if test="not($nodes/baseURL)">
                 <baseURL><SVN_URL/></baseURL>
             </xsl:if>
         </xsl:if>
         <xsl:if test="not($nodes/command)">
             </xsl:if>
         </xsl:if>
         <xsl:if test="not($nodes/command)">
-            <profile/>
             <post-checkout/>
         </xsl:if>
         <xsl:copy-of select="$content"/>
     </testdrive-svn>
 </xsl:template>
 
             <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.
 <!--
     steps - overrides <steps> to prepend <profile/> and <prologue/> and
             append <epilogue/> to the <command/> of each build step.
     <steps>
         <xsl:for-each select="exsl:node-set($content)/*">
             <xsl:choose>
     <steps>
         <xsl:for-each select="exsl:node-set($content)/*">
             <xsl:choose>
-                <xsl:when test="contains(name(), 'svn')">
+                <xsl:when test="contains(name(), 'svn') or
+                                contains(name(), 'get')">
                     <xsl:copy-of select="."/>
                 </xsl:when>
                 <xsl:otherwise>
                     <xsl:copy-of select="."/>
                 </xsl:when>
                 <xsl:otherwise>
index 69b42587e630b1aafc4211216ec0526c869785b4..b527f8aedd55554e0910bdfb6422c93ce9ed0968 100644 (file)
     </steps>
 </build>
 
     </steps>
 </build>
 
+<build>
+    <name>HP-UX 11i PA-RISC gcc wxMotif Head Tarball</name>
+    <sandbox>td192.testdrive.hp.com</sandbox>
+    <builddir>td_hpux_pa</builddir>
+    <scheduler>daily_0800</scheduler>
+
+    <steps>
+        <fetch branch="Daily_HEAD/wxMotif.tar.gz"/>
+        <setup/>
+        <configure/>
+        <compile-all/>
+        <run-tests/>
+    </steps>
+</build>
+
 <build>
     <name>HP-UX 11i PA-RISC gcc wxMotif Stable</name>
     <sandbox>td192.testdrive.hp.com</sandbox>
     <builddir>td_hpux_pa_stable</builddir>
     <scheduler>daily_0600</scheduler>
 
 <build>
     <name>HP-UX 11i PA-RISC gcc wxMotif Stable</name>
     <sandbox>td192.testdrive.hp.com</sandbox>
     <builddir>td_hpux_pa_stable</builddir>
     <scheduler>daily_0600</scheduler>
 
-    <schedule></schedule>
-
     <steps>
         <checkout branch="{$STABLE_BRANCH}"/>
         <setup/>
     <steps>
         <checkout branch="{$STABLE_BRANCH}"/>
         <setup/>