]>
git.saurik.com Git - wxWidgets.git/blob - build/buildbot/config/include/testdrive.xml
1 <?xml version=
"1.0" encoding=
"utf-8"?>
4 Name: include/testdrive.xml
5 Purpose: Declarations for the testdrive build slaves
8 Copyright: (c) 2007 Mike Wetherell
9 Licence: wxWidgets licence
12 <bot xmlns:
xi=
"http://www.w3.org/2001/XInclude"
13 xmlns:
xsl=
"http://www.w3.org/1999/XSL/Transform"
14 xmlns:
exsl=
"http://exslt.org/common"
18 <xi:include href=
"defs.xml"/>
21 build - add a default <sandbox> element, the same as the previous build.
23 <xsl:template name=
"build">
24 <xsl:param name=
"content"/>
26 <defaults content=
"{$content}">
27 <xsl:apply-templates select=
"get:property('sandbox', get:preceding-builds())[last()]"/>
29 <xsl:copy-of select=
"$content"/>
34 checkout - build step for source checkout.
36 Usage: as <svn> with additional <command> element and defaults for
37 <baseURL> and <defaultBranch>
42 <checkout branch="branches/WX_2_8_BRANCH"/>
45 <xsl:template name=
"checkout">
46 <xsl:param name=
"content"/>
47 <xsl:param name=
"branch" select=
"'trunk'"/>
48 <xsl:variable name=
"nodes" select=
"exsl:node-set($content)"/>
50 <xsl:if test=
"not($nodes/svnurl)">
51 <xsl:if test=
"not($nodes/baseURL)">
52 <baseURL><SVN_URL/></baseURL>
54 <xsl:if test=
"not($nodes/defaultBranch)">
55 <defaultBranch><xsl:value-of select=
"$branch"/></defaultBranch>
58 <xsl:if test=
"not($nodes/command)">
62 <xsl:copy-of select=
"$content"/>
67 steps - overrides <steps> to prepend <profile/> and <prologue/> and
68 append <epilogue/> to the <command/> of each build step.
72 The differences between <profile/> and <prologue/> are:
73 1. <profile/> is also used by <checkout> for its post checkout command.
74 2. In <profile> the current node is the <steps> element.
75 3. In <prologue> the current node is the build step inside a generated
76 nodeset. The current build is passes as a parameter.
78 <xsl:template name=
"steps">
79 <xsl:param name=
"content"/>
80 <xsl:variable name=
"profile"><profile/></xsl:variable>
81 <xsl:variable name=
"build" select=
"get:build()"/>
83 <xsl:for-each select=
"exsl:node-set($content)/*">
85 <xsl:when test=
"contains(name(), 'svn')">
86 <xsl:copy-of select=
"."/>
90 <xsl:copy-of select=
"@*"/>
91 <xsl:copy-of select=
"$profile"/>
92 <prologue build=
"{$build}"/>
93 <xsl:copy-of select=
"node()"/>
94 <xsl:if test=
"not(command)">
97 <epilogue build=
"{$build}"/>
106 if-del-on-fail - used in the context of a build step, copies its content
107 if the build step should cleanup on failure.
109 Usage: <if-del-on-fail>foobar</if-del-on-fail>
111 On the testdrive the working directory is deleted after a build to save
112 space. If the step has <haltOnFailure/> (which is the default or
113 <configure> and <compile> steps) then this cleanup needs to happen
114 whenever the step fails.
116 <xsl:template name=
"if-del-on-fail">
117 <xsl:param name=
"content"/>
118 <xsl:if test =
"position() = last() or
119 haltOnFailure = '' or
120 haltOnFailure = 'true' or
121 (not(haltOnFailure) and
122 (name() = 'configure' or name() = 'compile'))">
123 <xsl:copy-of select=
"$content"/>
128 Add slave locks so that each testdrive machine only runs one bulid at a
133 <xsl:template name=
"create-locks">
134 <xsl:variable name=
"rtf">
135 <xsl:apply-templates select=
"get:property('sandbox', get:all-builds())"/>
137 <xsl:variable name=
"sandboxes" select=
"exsl:node-set($rtf)/sandbox"/>
138 <xsl:for-each select=
"$sandboxes">
139 <xsl:variable name=
"text" select=
"text()"/>
140 <xsl:variable name=
"position" select=
"position()"/>
141 <xsl:if test=
"not($sandboxes[text() = $text and position() < $position])">
143 <name><xsl:value-of select=
"node()"/></name>
149 <xsl:template name=
"sandbox">
150 <xsl:param name=
"content"/>
151 <sandbox><xsl:copy-of select=
"$content"/></sandbox>
152 <lock><xsl:copy-of select=
"$content"/></lock>