diff options
author | Lorry Tar Creator <lorry-tar-importer@lorry> | 2017-08-05 16:22:51 +0000 |
---|---|---|
committer | Lorry Tar Creator <lorry-tar-importer@lorry> | 2017-08-05 16:22:51 +0000 |
commit | cf46733632c7279a9fd0fe6ce26f9185a4ae82a9 (patch) | |
tree | da27775a2161723ef342e91af41a8b51fedef405 /tools/buildbot | |
parent | bb0ef45f7c46b0ae221b26265ef98a768c33f820 (diff) | |
download | subversion-tarball-master.tar.gz |
subversion-1.9.7HEADsubversion-1.9.7master
Diffstat (limited to 'tools/buildbot')
39 files changed, 926 insertions, 1104 deletions
diff --git a/tools/buildbot/master/Feeder.py b/tools/buildbot/master/Feeder.py deleted file mode 100644 index 59e79b9..0000000 --- a/tools/buildbot/master/Feeder.py +++ /dev/null @@ -1,391 +0,0 @@ -# -# -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. -# -# -# This file is part of the Buildbot configuration for the Subversion project. -# The original file was created by Lieven Govaerts -# -# Minor changes made by API (apinheiro@igalia.com) in order to fit with our -# configuration and last buildbot changes -# -# Minor whitespace clean up, clean up imports, adapted to buildbot 0.7.7, -# and finally attempt to create valid atom and RSS feeds. -# Changes by Chandan-Dutta Chowdhury <chandan-dutta chowdhury @ hp com> and -# Gareth Armstrong <gareth armstrong @ hp com> -# Also integrate changes from -# http://code.google.com/p/pybots/source/browse/trunk/master/Feeder.py -# which adds ability to filter RSS feeds to specific builders. -# e.g. http://localhost:8012/rss?builder=builder-log4c-rhel-4-i386 - -import time -import os -import re -import sys - -from twisted.web.resource import Resource - -from buildbot.status.web import baseweb -from buildbot.status.builder import FAILURE, SUCCESS, WARNINGS - -class XmlResource(Resource): - contentType = "text/xml; charset=UTF-8" - def render(self, request): - data = self.content(request) - request.setHeader("content-type", self.contentType) - if request.method == "HEAD": - request.setHeader("content-length", len(data)) - return '' - return data - docType = '' - def header (self, request): - data = ('<?xml version="1.0"?>\n') - return data - def footer(self, request): - data = '' - return data - def content(self, request): - data = self.docType - data += self.header(request) - data += self.body(request) - data += self.footer(request) - return data - def body(self, request): - return '' - -class FeedResource(XmlResource): - title = 'Dummy' - link = 'http://dummylink' - language = 'en-us' - description = 'Dummy rss' - status = None - - def __init__(self, status, categories=None): - self.status = status - self.categories = categories - self.link = self.status.getBuildbotURL() - self.title = 'Build status of ' + status.getProjectName() - self.description = 'List of FAILED builds' - self.pubdate = time.gmtime(int(time.time())) - - def getBuilds(self, request): - builds = [] - # THIS is lifted straight from the WaterfallStatusResource Class in - # status/web/waterfall.py - # - # we start with all Builders available to this Waterfall: this is - # limited by the config-file -time categories= argument, and defaults - # to all defined Builders. - allBuilderNames = self.status.getBuilderNames(categories=self.categories) - builders = [self.status.getBuilder(name) for name in allBuilderNames] - - # but if the URL has one or more builder= arguments (or the old show= - # argument, which is still accepted for backwards compatibility), we - # use that set of builders instead. We still don't show anything - # outside the config-file time set limited by categories=. - showBuilders = request.args.get("show", []) - showBuilders.extend(request.args.get("builder", [])) - if showBuilders: - builders = [b for b in builders if b.name in showBuilders] - - # now, if the URL has one or category= arguments, use them as a - # filter: only show those builders which belong to one of the given - # categories. - showCategories = request.args.get("category", []) - if showCategories: - builders = [b for b in builders if b.category in showCategories] - - maxFeeds = 25 - - # Copy all failed builds in a new list. - # This could clearly be implemented much better if we had - # access to a global list of builds. - for b in builders: - lastbuild = b.getLastFinishedBuild() - if lastbuild is None: - continue - - lastnr = lastbuild.getNumber() - - totalbuilds = 0 - i = lastnr - while i >= 0: - build = b.getBuild(i) - i -= 1 - if not build: - continue - - results = build.getResults() - - # only add entries for failed builds! - if results == FAILURE: - totalbuilds += 1 - builds.append(build) - - # stop for this builder when our total nr. of feeds is reached - if totalbuilds >= maxFeeds: - break - - # Sort build list by date, youngest first. - if sys.version_info[:3] >= (2,4,0): - builds.sort(key=lambda build: build.getTimes(), reverse=True) - else: - # If you need compatibility with python < 2.4, use this for - # sorting instead: - # We apply Decorate-Sort-Undecorate - deco = [(build.getTimes(), build) for build in builds] - deco.sort() - deco.reverse() - builds = [build for (b1, build) in deco] - - if builds: - builds = builds[:min(len(builds), maxFeeds)] - return builds - - def body (self, request): - data = '' - builds = self.getBuilds(request) - - for build in builds: - start, finished = build.getTimes() - finishedTime = time.gmtime(int(finished)) - projectName = self.status.getProjectName() - link = re.sub(r'index.html', "", self.status.getURLForThing(build)) - - # title: trunk r862265 (plus patch) failed on 'i686-debian-sarge1 shared gcc-3.3.5' - ss = build.getSourceStamp() - source = "" - if ss.branch: - source += "Branch %s " % ss.branch - if ss.revision: - source += "Revision %s " % str(ss.revision) - if ss.patch: - source += " (plus patch)" - if ss.changes: - pass - if (ss.branch is None and ss.revision is None and ss.patch is None - and not ss.changes): - source += "Latest revision " - got_revision = None - try: - got_revision = build.getProperty("got_revision") - except KeyError: - pass - if got_revision: - got_revision = str(got_revision) - if len(got_revision) > 40: - got_revision = "[revision string too long]" - source += "(Got Revision: %s)" % got_revision - title = ('%s failed on "%s"' % - (source, build.getBuilder().getName())) - - # get name of the failed step and the last 30 lines of its log. - if build.getLogs(): - log = build.getLogs()[-1] - laststep = log.getStep().getName() - try: - lastlog = log.getText() - except IOError: - # Probably the log file has been removed - lastlog='<b>log file not available</b>' - - lines = re.split('\n', lastlog) - lastlog = '' - for logline in lines[max(0, len(lines)-30):]: - lastlog = lastlog + logline + '<br/>' - lastlog = lastlog.replace('\n', '<br/>') - - description = '' - description += ('Date: %s<br/><br/>' % - time.strftime("%a, %d %b %Y %H:%M:%S GMT", - finishedTime)) - description += ('Full details available here: <a href="%s">%s</a><br/>' % (self.link, projectName)) - builder_summary_link = ('%s/builders/%s' % - (re.sub(r'/index.html', '', self.link), - build.getBuilder().getName())) - description += ('Build summary: <a href="%s">%s</a><br/><br/>' % - (builder_summary_link, - build.getBuilder().getName())) - description += ('Build details: <a href="%s">%s</a><br/><br/>' % - (link, self.link + link[1:])) - description += ('Author list: <b>%s</b><br/><br/>' % - ",".join(build.getResponsibleUsers())) - description += ('Failed step: <b>%s</b><br/><br/>' % laststep) - description += 'Last lines of the build log:<br/>' - - data += self.item(title, description=description, lastlog=lastlog, - link=link, pubDate=finishedTime) - - return data - - def item(self, title='', link='', description='', pubDate=''): - """Generates xml for one item in the feed.""" - -class Rss20StatusResource(FeedResource): - def __init__(self, status, categories=None): - FeedResource.__init__(self, status, categories) - contentType = 'application/rss+xml' - - def header(self, request): - data = FeedResource.header(self, request) - data += ('<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">\n') - data += (' <channel>\n') - if self.title is not None: - data += (' <title>%s</title>\n' % self.title) - if self.link is not None: - data += (' <link>%s</link>\n' % self.link) - link = re.sub(r'/index.html', '', self.link) - data += (' <atom:link href="%s/rss" rel="self" type="application/rss+xml"/>\n' % link) - if self.language is not None: - data += (' <language>%s</language>\n' % self.language) - if self.description is not None: - data += (' <description>%s</description>\n' % self.description) - if self.pubdate is not None: - rfc822_pubdate = time.strftime("%a, %d %b %Y %H:%M:%S GMT", - self.pubdate) - data += (' <pubDate>%s</pubDate>\n' % rfc822_pubdate) - return data - - def item(self, title='', link='', description='', lastlog='', pubDate=''): - data = (' <item>\n') - data += (' <title>%s</title>\n' % title) - if link is not None: - data += (' <link>%s</link>\n' % link) - if (description is not None and lastlog is not None): - lastlog = re.sub(r'<br/>', "\n", lastlog) - lastlog = re.sub(r'&', "&", lastlog) - lastlog = re.sub(r"'", "'", lastlog) - lastlog = re.sub(r'"', """, lastlog) - lastlog = re.sub(r'<', '<', lastlog) - lastlog = re.sub(r'>', '>', lastlog) - lastlog = lastlog.replace('\n', '<br/>') - content = '<![CDATA[' - content += description - content += lastlog - content += ']]>' - data += (' <description>%s</description>\n' % content) - if pubDate is not None: - rfc822pubDate = time.strftime("%a, %d %b %Y %H:%M:%S GMT", - pubDate) - data += (' <pubDate>%s</pubDate>\n' % rfc822pubDate) - # Every RSS item must have a globally unique ID - guid = ('tag:%s@%s,%s:%s' % (os.environ['USER'], - os.environ['HOSTNAME'], - time.strftime("%Y-%m-%d", pubDate), - time.strftime("%Y%m%d%H%M%S", - pubDate))) - data += (' <guid isPermaLink="false">%s</guid>\n' % guid) - data += (' </item>\n') - return data - - def footer(self, request): - data = (' </channel>\n' - '</rss>') - return data - -class Atom10StatusResource(FeedResource): - def __init__(self, status, categories=None): - FeedResource.__init__(self, status, categories) - contentType = 'application/atom+xml' - - def header(self, request): - data = FeedResource.header(self, request) - data += '<feed xmlns="http://www.w3.org/2005/Atom">\n' - data += (' <id>%s</id>\n' % self.status.getBuildbotURL()) - if self.title is not None: - data += (' <title>%s</title>\n' % self.title) - if self.link is not None: - link = re.sub(r'/index.html', '', self.link) - data += (' <link rel="self" href="%s/atom"/>\n' % link) - data += (' <link rel="alternate" href="%s/"/>\n' % link) - if self.description is not None: - data += (' <subtitle>%s</subtitle>\n' % self.description) - if self.pubdate is not None: - rfc3339_pubdate = time.strftime("%Y-%m-%dT%H:%M:%SZ", - self.pubdate) - data += (' <updated>%s</updated>\n' % rfc3339_pubdate) - data += (' <author>\n') - data += (' <name>Build Bot</name>\n') - data += (' </author>\n') - return data - - def item(self, title='', link='', description='', lastlog='', pubDate=''): - data = (' <entry>\n') - data += (' <title>%s</title>\n' % title) - if link is not None: - data += (' <link href="%s"/>\n' % link) - if (description is not None and lastlog is not None): - lastlog = re.sub(r'<br/>', "\n", lastlog) - lastlog = re.sub(r'&', "&", lastlog) - lastlog = re.sub(r"'", "'", lastlog) - lastlog = re.sub(r'"', """, lastlog) - lastlog = re.sub(r'<', '<', lastlog) - lastlog = re.sub(r'>', '>', lastlog) - data += (' <content type="xhtml">\n') - data += (' <div xmlns="http://www.w3.org/1999/xhtml">\n') - data += (' %s\n' % description) - data += (' <pre xml:space="preserve">%s</pre>\n' % lastlog) - data += (' </div>\n') - data += (' </content>\n') - if pubDate is not None: - rfc3339pubDate = time.strftime("%Y-%m-%dT%H:%M:%SZ", - pubDate) - data += (' <updated>%s</updated>\n' % rfc3339pubDate) - # Every Atom entry must have a globally unique ID - # http://diveintomark.org/archives/2004/05/28/howto-atom-id - guid = ('tag:%s@%s,%s:%s' % (os.environ['USER'], - os.environ['HOSTNAME'], - time.strftime("%Y-%m-%d", pubDate), - time.strftime("%Y%m%d%H%M%S", - pubDate))) - data += (' <id>%s</id>\n' % guid) - data += (' <author>\n') - data += (' <name>Build Bot</name>\n') - data += (' </author>\n') - data += (' </entry>\n') - return data - - def footer(self, request): - data = ('</feed>') - return data - -class WebStatusWithFeeds(baseweb.WebStatus): - """Override the standard WebStatus class to add RSS and Atom feeds. - - This adds the following web resources in addition to /waterfall: - /rss - /atom - - The same "branch" and "category" query arguments can be passed - as with /waterfall - e.g. http://mybot.buildbot.com:8012/rss?branch=&builder=builder-log4c-rhel-4-i386 - or - http://mybot.buildbot.com:8012/rss?branch=&category=log4c - """ - - def setupSite(self): - baseweb.WebStatus.setupSite(self) - - status = self.parent.getStatus() - sr = self.site.resource - - rss = Rss20StatusResource(status, categories=None) - sr.putChild("rss", rss) - atom = Atom10StatusResource(status, categories=None) - sr.putChild("atom", atom) - diff --git a/tools/buildbot/master/README b/tools/buildbot/master/README new file mode 100644 index 0000000..35fbff0 --- /dev/null +++ b/tools/buildbot/master/README @@ -0,0 +1,7 @@ +The BuildBot Master is managed by the ASF Infrastructure team. + +This was announced per this email: +https://mail-archives.apache.org/mod_mbox/subversion-dev/201005.mbox/%3CAANLkTilvSpSwJHLlJVpKpGVAI2-JQyGqLqCn1Sjgo-Qf@mail.gmail.com%3E + +The new BuildBot Master configuration is maintained here: +https://svn.apache.org/repos/infra/infrastructure/buildbot/aegis/buildmaster/master1/ diff --git a/tools/buildbot/master/SVNMailNotifier.py b/tools/buildbot/master/SVNMailNotifier.py deleted file mode 100644 index 1dfe839..0000000 --- a/tools/buildbot/master/SVNMailNotifier.py +++ /dev/null @@ -1,210 +0,0 @@ -# -# -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. -# -# -import os -import urllib -import re - -from email.Message import Message -from email.Utils import formatdate -from email.MIMEText import MIMEText - -from twisted.internet import defer -from twisted.application import service - -from buildbot.status.builder import FAILURE, SUCCESS, WARNINGS -from buildbot.status.mail import MailNotifier - -class SVNMailNotifier(MailNotifier): - """Implement custom status mails for the Subversion project""" - - def __init__(self, fromaddr, mode="all", categories=None, builders=None, - addLogs=False, relayhost="localhost", - subject="buildbot %(result)s in %(builder)s", - lookup=None, extraRecipients=[], - sendToInterestedUsers=True, - body="", - replytoaddr=""): - """ - @type body: string - @param body: a string to be used as the body of the message. - - @type replytoaddr: string - @param replytoaddr: the email address to be used in the 'Reply-To' header. - """ - - self.body = body - self.replytoaddr = replytoaddr - - # pass the rest of the parameters to our parent. - MailNotifier.__init__(self, fromaddr, mode, categories, builders, - addLogs, relayhost, subject, lookup, extraRecipients, - sendToInterestedUsers) - - def buildMessage(self, name, build, results): - if self.mode == "all": - intro = "The Buildbot has finished a build of %s.\n" % name - elif self.mode == "failing": - intro = "The Buildbot has detected a failed build of %s.\n" % name - else: - intro = "The Buildbot has detected a new failure of %s.\n" % name - - # buildurl - buildurl = self.status.getURLForThing(build) -# lgo: url's are already quoted now. -# if buildurl: -# buildurl = urllib.quote(buildurl, '/:') - - # buildboturl - buildboturl = self.status.getBuildbotURL() -# if url: -# buildboturl = urllib.quote(url, '/:') - - # reason of build - buildreason = build.getReason() - - # source stamp - patch = None - ss = build.getSourceStamp() - if ss is None: - source = "unavailable" - else: - if build.getChanges(): - revision = max([int(c.revision) for c in build.getChanges()]) - - source = "" - if ss.branch is None: - ss.branch = "trunk" - source += "[branch %s] " % ss.branch - if revision: - source += str(revision) - else: - source += "HEAD" - if ss.patch is not None: - source += " (plus patch)" - - # actual buildslave - buildslave = build.getSlavename() - - # TODO: maybe display changes here? or in an attachment? - - # status - t = build.getText() - if t: - t = ": " + " ".join(t) - else: - t = "" - - if results == SUCCESS: - status = "Build succeeded!\n" - res = "PASS" - elif results == WARNINGS: - status = "Build Had Warnings%s\n" % t - res = "WARN" - else: - status = "BUILD FAILED%s\n" % t - res = "FAIL" - - if build.getLogs(): - log = build.getLogs()[-1] - laststep = log.getStep().getName() - lastlog = log.getText() - - # only give me the last lines of the log files. - lines = re.split('\n', lastlog) - lastlog = '' - for logline in lines[max(0, len(lines)-100):]: - lastlog = lastlog + logline - - # TODO: it would be nice to provide a URL for the specific build - # here. That involves some coordination with html.Waterfall . - # Ideally we could do: - # helper = self.parent.getServiceNamed("html") - # if helper: - # url = helper.getURLForBuild(build) - - text = self.body % { 'result': res, - 'builder': name, - 'revision': revision, - 'branch': ss.branch, - 'blamelist': ",".join(build.getResponsibleUsers()), - 'buildurl': buildurl, - 'buildboturl': buildboturl, - 'reason': buildreason, - 'source': source, - 'intro': intro, - 'status': status, - 'slave': buildslave, - 'laststep': laststep, - 'lastlog': lastlog, - } - - haveAttachments = False - if ss.patch or self.addLogs: - haveAttachments = True - if not canDoAttachments: - log.msg("warning: I want to send mail with attachments, " - "but this python is too old to have " - "email.MIMEMultipart . Please upgrade to python-2.3 " - "or newer to enable addLogs=True") - - if haveAttachments and canDoAttachments: - m = MIMEMultipart() - m.attach(MIMEText(text)) - else: - m = Message() - m.set_payload(text) - - m['Date'] = formatdate(localtime=True) - m['Subject'] = self.subject % { 'result': res, - 'builder': name, - 'revision': revision, - 'branch': ss.branch - } - m['From'] = self.fromaddr - # m['To'] is added later - m['Reply-To'] = self.replytoaddr - - if ss.patch: - a = MIMEText(patch) - a.add_header('Content-Disposition', "attachment", - filename="source patch") - m.attach(a) - if self.addLogs: - for log in build.getLogs(): - name = "%s.%s" % (log.getStep().getName(), - log.getName()) - a = MIMEText(log.getText()) - a.add_header('Content-Disposition', "attachment", - filename=name) - m.attach(a) - - # now, who is this message going to? - dl = [] - recipients = self.extraRecipients[:] - if self.sendToInterestedUsers and self.lookup: - for u in build.getInterestedUsers(): - d = defer.maybeDeferred(self.lookup.getAddress, u) - d.addCallback(recipients.append) - dl.append(d) - d = defer.DeferredList(dl) - d.addCallback(self._gotRecipients, recipients, m) - return d - diff --git a/tools/buildbot/master/master.cfg b/tools/buildbot/master/master.cfg deleted file mode 100644 index 96b0037..0000000 --- a/tools/buildbot/master/master.cfg +++ /dev/null @@ -1,258 +0,0 @@ -# -*- python -*- -# -# -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. -# -# - -import os, os.path, re - -from buildbot.scheduler import Scheduler -from buildbot.process import factory -from buildbot.steps import source, shell -from buildbot.status.html import WebStatus -from buildbot.scheduler import AnyBranchScheduler -#from buildbot.twcompat import implements -from buildbot.scheduler import Try_Userpass -from buildbot.scheduler import Nightly -from buildbot.changes.svnpoller import SVNPoller, split_file_branches -from buildbot.buildslave import BuildSlave - -#import TigrisMailSource -import SVNMailNotifier -from Feeder import WebStatusWithFeeds -import private - -REPO="http://svn.apache.org/repos/asf/subversion/" - -s = factory.s - -# This is the dictionary that the buildmaster pays attention to. We also use -# a shorter alias to save typing. -c = BuildmasterConfig = {} - -# slaves -c['slaves'] = [BuildSlave("fc1-gcc3.3.2-ia32", private.slavePwd), - BuildSlave("osx10.4-gcc4.0.1-ia32", private.slavePwd), - BuildSlave("xp-vs2003-ia32", private.slavePwd), - BuildSlave("dlr-fc3", private.slavePwd), - BuildSlave("eh-debsarge1", private.slavePwd), - BuildSlave("x64-ubuntu", private.hwrightPwd), - BuildSlave("x64-centos", private.wandPwd), -] - -# sources -c['change_source'] = SVNPoller(REPO, - split_file=split_file_branches, - svnbin=private.svnbin, - pollinterval=300) - -excludes = ["COMMITTERS", "STATUS", "CHANGES", "README", "INSTALL", "COPYING", "HACKING", "TRANSLATING", "BUGS", "www", "notes", "packages", "subversion/LICENSE", "subversion/po", "doc", "contrib", "tools", "dist.sh"] - -# function checks if this revision is interesting enough to trigger the builds. -def isImportant(change): - if not excludes: - return True - - for file in change.files: - triggerBuild = True - for pattern in excludes: - match = re.match(pattern, file) - if match: - triggerBuild = False - break - if triggerBuild: - return True - -# schedulers -bs1 = AnyBranchScheduler("main", - [None, "branches/1.3.x", "branches/1.4.x", "branches/1.5.x", - "branches/1.6.x"], - 5*60, ["x86-macosx-gnu shared", - "debian-x86_64-32 shared gcc", - "x64-ubuntu gcc", - "x64-centos gcc", - ], - fileIsImportant=isImportant) - -ps1 = Nightly('daily-2pm-cet', ['x86-macosx-gnu shared daily ra_serf'], hour=14, minute=0) - -ts = Try_Userpass("try", ["x86-macosx-gnu shared", "debian-x86_64-32 shared gcc"], - port=private.tryPort, userpass=[(private.tryUser,private.tryPwd)] ) -c['schedulers'] = [bs1, ps1, ts] - -# steps and builders - -# define default set of steps, all under masters control. -defSteps = [shell.ShellCommand(name="Cleanup", command=["../svnclean.sh"], timeout=3600), - source.SVN(baseURL=REPO,defaultBranch='trunk', timeout=3600), - shell.ShellCommand(name="Build", command=["../svnbuild.sh"], logfiles={"configlog": "config.log"}, timeout=3600, haltOnFailure=True), - shell.ShellCommand(name="Test fsfs+ra_neon", command=["../svncheck.sh", "fsfs", "ra_neon"], logfiles={"testlog": "tests.log"}, timeout=3600, flunkOnFailure=True), - ] - -defFact = factory.BuildFactory(defSteps) - -# define Windows custom steps -winSteps = [source.SVN(baseURL=REPO,defaultBranch='trunk', timeout=3600), - shell.ShellCommand(name="Build", command=["..\svnbuild.bat"], timeout=3600, haltOnFailure=True), - shell.ShellCommand(name="Test fsfs+ra_local", command=["..\svncheck.bat","fsfs","ra_local"], timeout=3600, flunkOnFailure=True), - shell.ShellCommand(name="Test fsfs+ra_dav", command=["..\svncheck.bat","fsfs","ra_dav"], timeout=3600, flunkOnFailure=True), - shell.ShellCommand(name="Test fsfs+ra_svn", command=["..\svncheck.bat","fsfs","ra_svn"], timeout=3600, flunkOnFailure=True), - shell.ShellCommand(name="Cleanup", command=["..\svnclean.bat"], timeout=3600), - ] -winFact = factory.BuildFactory(winSteps) - -# define Windows 6 way steps -win6wSteps = [source.SVN(baseURL=REPO,defaultBranch='trunk', timeout=3600), - shell.ShellCommand(name="Cleanup", command=["..\svnclean.bat"], timeout=3600), - shell.ShellCommand(name="Build", command=["..\svnbuild.bat", "%(branch)"], timeout=3600, haltOnFailure=True), - shell.ShellCommand(name="Test fsfs+ra_local", command=["..\svncheck.bat","fsfs","ra_local"], logfiles={"testlog": "tests.log"}, timeout=3600, flunkOnFailure=True), - ] -win6wFact = factory.BuildFactory(win6wSteps) - -# define set of steps for eh-x84_64-32, clean step comes first. -ehSteps = [shell.ShellCommand(name="Cleanup", command=["../svnclean.sh"], workdir='', timeout=3600), - source.SVN(baseURL=REPO,defaultBranch='trunk', timeout=3600), - shell.ShellCommand(name="Build", command=["../svnbuild.sh"], logfiles={"configlog": "config.log"}, timeout=3600, haltOnFailure=True), - shell.ShellCommand(name="Test fsfs+ra_svn", command=["../svncheck.sh","fsfs","ra_svn"], logfiles={"testlog": "tests.log"}, timeout=3600, flunkOnFailure=True), - ] -ehFact = factory.BuildFactory(ehSteps) - -# nightly build ra_serf -serfSteps = [shell.ShellCommand(name="Cleanup", command=["../svnclean.sh"], timeout=3600), - source.SVN(baseURL=REPO,defaultBranch='trunk', timeout=3600), - shell.ShellCommand(name="Build", command=["../svnbuild.sh"], logfiles={"configlog": "config.log"}, timeout=3600, haltOnFailure=True), - shell.ShellCommand(name="Test fsfs+ra_serf", command=["../svncheck.sh", "fsfs", "ra_serf"], logfiles={"testlog": "tests.log"}, timeout=3600, flunkOnFailure=True), - ] -serfFact = factory.BuildFactory(serfSteps) - -# define set of steps for x64-ubuntu, clean step comes first. -x64ubSteps = [shell.ShellCommand(name="Cleanup", command=["../svnclean.sh"], workdir='', timeout=3600), - source.SVN(baseURL=REPO,defaultBranch='trunk', timeout=3600), - shell.ShellCommand(name="Build", command=["../svnbuild.sh"], logfiles={"configlog": "config.log"}, timeout=3600, haltOnFailure=True), - shell.ShellCommand(name="Test fsfs+ra_local", command=["../svncheck.sh","fsfs","ra_local"], logfiles={"testlog": "tests.log"}, timeout=3600, flunkOnFailure=False), - shell.ShellCommand(name="Test bindings", command=["../svncheck-bindings.sh","fsfs","ra_local"], logfiles={"testlog": "tests.log"}, timeout=3600, flunkOnFailure=True), - ] -x64ubFact = factory.BuildFactory(x64ubSteps) - -x64coSteps = [shell.ShellCommand(name="Cleanup", command=["../svnclean.sh"], timeout=3600), - source.SVN(baseURL=REPO,defaultBranch='trunk', timeout=3600), - shell.ShellCommand(name="Build", command=["../svnbuild.sh"], logfiles={"configlog": "config.log"}, timeout=3600, haltOnFailure=True), - shell.ShellCommand(name="Test fsfs+ra_local", command=["../svncheck.sh", "fsfs", "ra_neon"], logfiles={"testlog": "tests.log"}, timeout=3600, flunkOnFailure=True), - shell.ShellCommand(name="Test bindings", command=["../svncheck-bindings.sh","fsfs","ra_neon"], logfiles={"testlog": "tests.log"}, timeout=3600, flunkOnFailure=True), - ] -x64coFact = factory.BuildFactory(x64coSteps) - - -c['builders'] = [ - {'name': "x86-macosx-gnu shared", - 'slavename': "osx10.4-gcc4.0.1-ia32", - 'builddir': "osx10.4-gcc4.0.1-ia32", - 'factory': defFact, - 'category': "prod", - }, - {'name': "debian-x86_64-32 shared gcc", - 'slavename': "eh-debsarge1", - 'builddir': "eh-debsarge1", - 'factory': ehFact, - 'category': "prod", - }, - {'name': "x86-macosx-gnu shared daily ra_serf", - 'slavename': "osx10.4-gcc4.0.1-ia32", - 'builddir': "osx10.4-gcc4.0.1-ia32-serf", - 'factory': serfFact, - 'category': "prod", - }, - {'name': "x64-ubuntu gcc", - 'slavename': "x64-ubuntu", - 'builddir': "x64-ubuntu", - 'factory': x64ubFact, - 'category': "prod", - }, - {'name': "x64-centos gcc", - 'slavename': "x64-centos", - 'builddir': "x64-centos", - 'factory': x64coFact, - 'category': "prod", - }, -] - -# 'slavePortnum' defines the TCP port to listen on. This must match the value -# configured into the buildslaves (with their --master option) - -c['slavePortnum'] = private.slavePortnum - -# show webpage -c['status'] = [] -c['status'].append(WebStatusWithFeeds(http_port="tcp:"+str(private.htmlPort)+":interface=127.0.0.1", allowForce=True)) - -# send emails -from buildbot.status import mail -mailbody = 'Full details are available at: \n%(buildurl)s\n\n'\ - 'Author list: %(blamelist)s\n\n'\ - 'Build Slave: %(slave)s\n\n\n'\ - 'Subversion Buildbot\n'\ - '%(buildboturl)s\n\n\n'\ - 'Last 100 lines of the build log (step: %(laststep)s ):\n\n %(lastlog)s' - - -c['status'].append(SVNMailNotifier.SVNMailNotifier( - fromaddr="buildbot@mobsol.be", - extraRecipients=["notifications@subversion.apache.org"], - sendToInterestedUsers=False, - subject="svn %(branch)s r%(revision)s: %(result)s (%(builder)s)", - body=mailbody, - replytoaddr="dev@subversion.apache.org", - categories=["prod"], - relayhost=private.smtp)) - -# from buildbot.status import words -# c['status'].append(words.IRC(host="irc.example.com", nick="bb", -# channels=["#example"])) - - -# if you set 'debugPassword', then you can connect to the buildmaster with -# the diagnostic tool in contrib/debugclient.py . From this tool, you can -# manually force builds and inject changes, which may be useful for testing -# your buildmaster without actually commiting changes to your repository (or -# before you have a functioning 'sources' set up). The debug tool uses the -# same port number as the slaves do: 'slavePortnum'. - -#c['debugPassword'] = "debugpassword" - -# if you set 'manhole', you can telnet into the buildmaster and get an -# interactive python shell, which may be useful for debugging buildbot -# internals. It is probably only useful for buildbot developers. -# from buildbot.master import Manhole -#c['manhole'] = Manhole(9999, "admin", "password") - -# the 'projectName' string will be used to describe the project that this -# buildbot is working on. For example, it is used as the title of the -# waterfall HTML page. The 'projectURL' string will be used to provide a link -# from buildbot HTML pages to your project's home page. - -c['projectName'] = "Subversion" -c['projectURL'] = "http://subversion.apache.org/" - -# the 'buildbotURL' string should point to the location where the buildbot's -# internal web server (usually the html.Waterfall page) is visible. This -# typically uses the port number set in the Waterfall 'status' entry, but -# with an externally-visible host name which the buildbot cannot figure out -# without some help. - -c['buildbotURL'] = "http://crest.ics.uci.edu/buildbot/" diff --git a/tools/buildbot/master/private-sample.py b/tools/buildbot/master/private-sample.py deleted file mode 100644 index 2d2cd8c..0000000 --- a/tools/buildbot/master/private-sample.py +++ /dev/null @@ -1,32 +0,0 @@ -# -# -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. -# -# -# -*- python -*- - -svnbin="svn" -smtp="smtp.example.com" -htmlPort = 8010 -slavePortnum = 9989 -tryPort = 8031 -tryUser = "xxxx" -tryPwd = "xxxx" -slavePwd = "xxxx" -hwrightPwd = "xxxx" -aholst_slavePwd = "xxxx" diff --git a/tools/buildbot/master/public_html/buildbot.css b/tools/buildbot/master/public_html/buildbot.css deleted file mode 100644 index edf51f9..0000000 --- a/tools/buildbot/master/public_html/buildbot.css +++ /dev/null @@ -1,68 +0,0 @@ -/* Copied from buildbot.ethereal.com. Thanks! */ - -* { - font-family: verdana, arial, helvetica, sans-serif; - font-size: 12px; - font-weight: bold; -} - -a:link,a:visited,a:active { - color: #333; -} -a:hover { - color: #999; -} - -.table { - border-spacing: 2px; -} - -td.Project { - color: #000; - border: 1px solid #666666; - background-color: #fff; -} - -td.Event, td.Activity, td.Time, td.Builder { -/* color: #333333; */ - border: 1px solid #666666; - background-color: #eee; - font-weight: normal; -} - -td.Change { - color: #fff; - border: 1px solid #666666; - background-color: #aaf; -} - -/* LastBuild, BuildStep states */ -.success { - color: #FFFFFF; - border: 1px solid #666666; - background-color: #3b0; -} - -.failure { - color: #FFFFFF; - border: 1px solid #666666; - background-color: #d33; -} - -.warnings { - color: #FFFFFF; - border: 1px solid #666666; - background-color: #fa2; -} - -.exception, td.offline { - color: #FFFFFF; - border: 1px solid #666666; - background-color: #e0b0ff; -} - -.start,.running, td.building { - color: #555; - border: 1px solid #666666; - background-color: #fffc6c; -} diff --git a/tools/buildbot/master/public_html/index.html b/tools/buildbot/master/public_html/index.html deleted file mode 100644 index c2b419f..0000000 --- a/tools/buildbot/master/public_html/index.html +++ /dev/null @@ -1,53 +0,0 @@ -<!-- - - Licensed to the Apache Software Foundation (ASF) under one - or more contributor license agreements. See the NOTICE file - distributed with this work for additional information - regarding copyright ownership. The ASF licenses this file - to you under the Apache License, Version 2.0 (the - "License"); you may not use this file except in compliance - with the License. You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, - software distributed under the License is distributed on an - "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - KIND, either express or implied. See the License for the - specific language governing permissions and limitations - under the License. - ---> - -<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> -<html> -<head> -<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-15"> -<title>Welcome to the Buildbot</title> -</head> - -<body> -<h1>Welcome to the Buildbot!</h1> - -<ul> - <li>the <a href="waterfall">Waterfall Display</a> will give you a - time-oriented summary of recent buildbot activity.</li> - - <li>the <a href="grid">Grid Display</a> will give you a - developer-oriented summary of recent buildbot activity.</li> - - <li>The <a href="one_box_per_builder">Latest Build</a> for each builder is - here.</li> - - <li><a href="one_line_per_build">Recent Builds</a> are summarized here, one - per line.</li> - - <li><a href="buildslaves">Buildslave</a> information</li> - <li><a href="changes">ChangeSource</a> information.</li> - - <br /> - <li><a href="about">About this Buildbot</a></li> -</ul> - - -</body> </html> diff --git a/tools/buildbot/master/public_html/robots.txt b/tools/buildbot/master/public_html/robots.txt deleted file mode 100644 index 47a9d27..0000000 --- a/tools/buildbot/master/public_html/robots.txt +++ /dev/null @@ -1,9 +0,0 @@ -User-agent: * -Disallow: /waterfall -Disallow: /builders -Disallow: /changes -Disallow: /buildslaves -Disallow: /schedulers -Disallow: /one_line_per_build -Disallow: /one_box_per_builder -Disallow: /xmlrpc diff --git a/tools/buildbot/slaves/bb-openbsd/svncheck.sh b/tools/buildbot/slaves/bb-openbsd/svncheck.sh index ef785b1..7d50d98 100755 --- a/tools/buildbot/slaves/bb-openbsd/svncheck.sh +++ b/tools/buildbot/slaves/bb-openbsd/svncheck.sh @@ -25,6 +25,8 @@ set -x branch="$(basename $(svn info . | grep ^URL | cut -d' ' -f2))" export MALLOC_OPTIONS=S (cd .. && gmake BRANCH="$branch" PARALLEL="" THREADING="no" \ + MEMCACHED_SERVER="127.0.0.1:11211" \ + EXCLUSIVE_WC_LOCKS=1 \ svn-check-local \ svn-check-svn \ svn-check-neon \ diff --git a/tools/buildbot/slaves/bb-openbsd/svnclean.sh b/tools/buildbot/slaves/bb-openbsd/svnclean.sh index 82dbbbb..063f4dd 100755 --- a/tools/buildbot/slaves/bb-openbsd/svnclean.sh +++ b/tools/buildbot/slaves/bb-openbsd/svnclean.sh @@ -24,7 +24,7 @@ set -x branch="$(basename $(svn info . | grep ^URL | cut -d' ' -f2))" (test -h ../svn-trunk || ln -s build ../svn-trunk) -for i in 6 7; do +for i in 6 7 8 9 10; do (test -h ../svn-1.${i}.x || ln -s build ../svn-1.${i}.x) done svn update ../../unix-build diff --git a/tools/buildbot/slaves/i686-debian-sarge1/svnlog.sh b/tools/buildbot/slaves/i686-debian-sarge1/svnlog.sh index d3b5036..c2302e1 100755 --- a/tools/buildbot/slaves/i686-debian-sarge1/svnlog.sh +++ b/tools/buildbot/slaves/i686-debian-sarge1/svnlog.sh @@ -25,7 +25,7 @@ set -x # upload file to server FILENAME=tests-`date +%Y%m%d%H%M`.log.tgz tar -czf $FILENAME tests.log -ftp -n www.mobsol.be < ../ftpscript +ftp -n www.mobsol.be < ../ftpscript rm $FILENAME echo "Logs of the testrun can be found here: http://www.mobsol.be/logs/eh-debsarge1/$FILENAME" diff --git a/tools/buildbot/slaves/svn-sparc-solaris/svnbuild.sh b/tools/buildbot/slaves/svn-sparc-solaris/svnbuild.sh new file mode 100755 index 0000000..495cb21 --- /dev/null +++ b/tools/buildbot/slaves/svn-sparc-solaris/svnbuild.sh @@ -0,0 +1,51 @@ +#!/bin/sh + +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. + +set -x +. ../svnenv.sh + +echo "============ autogen.sh" +./autogen.sh || exit $? + +SVN_VER_MINOR=`awk '/define SVN_VER_MINOR/ { print $3 }' subversion/include/svn_version.h` + +cd ../obj +grep obj/subversion/tests /etc/mnttab > /dev/null || mount-tmpfs + +# --enable-optimize adds -flto which breaks the 1.8 C tests because +# they link main() from a library. +if [ $SVN_VER_MINOR -gt 8 ]; then + OPTIMIZE_OPTION='--enable-optimize' +fi + +echo "============ configure" +../build/configure CC='cc -m64 -v' \ + --with-apr=/export/home/wandisco/buildbot/install \ + --with-apr-util=/export/home/wandisco/buildbot/install \ + --with-serf=/export/home/wandisco/buildbot/install \ + --with-apxs=/export/home/wandisco/buildbot/install/bin/apxs \ + --with-sqlite=/export/home/wandisco/buildbot/sqlite-amalgamation-3071501/sqlite3.c \ + --disable-shared \ + $OPTIMIZE_OPTION \ + || exit $? + +echo "============ make" +make -j30 || exit $? + +exit 0 diff --git a/tools/buildbot/slaves/svn-sparc-solaris/svncheck.sh b/tools/buildbot/slaves/svn-sparc-solaris/svncheck.sh new file mode 100755 index 0000000..0ea134c --- /dev/null +++ b/tools/buildbot/slaves/svn-sparc-solaris/svncheck.sh @@ -0,0 +1,39 @@ +#!/bin/sh + +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. + +set -x +. ../svnenv.sh + +SVN_VER_MINOR=`awk '/define SVN_VER_MINOR/ { print $3 }' subversion/include/svn_version.h` + +cd ../obj + +# Use GNU iconv since the system one does not work well enough +LD_PRELOAD_64=/export/home/wandisco/buildbot/install/lib/preloadable_libiconv.so +export LD_PRELOAD_64 + +if [ $SVN_VER_MINOR -eq 9 ]; then + echo "============ make svnserveautocheck" + make svnserveautocheck CLEANUP=1 PARALLEL=30 THREADED=1 || exit $? +else + echo "============ make check" + make check CLEANUP=1 PARALLEL=30 THREADED=1 || exit $? +fi + +exit 0 diff --git a/tools/buildbot/slaves/svn-sparc-solaris/svncleanup.sh b/tools/buildbot/slaves/svn-sparc-solaris/svncleanup.sh new file mode 100755 index 0000000..b828e5e --- /dev/null +++ b/tools/buildbot/slaves/svn-sparc-solaris/svncleanup.sh @@ -0,0 +1,30 @@ +#!/bin/sh + +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. + +set -x +. ../svnenv.sh + +cd ../obj + +echo "============ make extraclean" +test -f Makefile && (make extraclean || exit $?) + +grep obj/subversion/tests /etc/mnttab > /dev/null && umount-tmpfs + +exit 0 diff --git a/tools/buildbot/slaves/svn-sparc-solaris/svnenv.sh b/tools/buildbot/slaves/svn-sparc-solaris/svnenv.sh new file mode 100644 index 0000000..48d6b42 --- /dev/null +++ b/tools/buildbot/slaves/svn-sparc-solaris/svnenv.sh @@ -0,0 +1,23 @@ +#!/bin/sh + +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. + +GREP=/usr/bin/grep +export GREP +PATH=/opt/csw/gnu:/usr/bin:/usr/ccs/bin:/opt/csw/bin:/export/home/wandisco/buildbot/install/bin +export PATH diff --git a/tools/buildbot/slaves/svn-x64-centos/list-svn-deps.sh b/tools/buildbot/slaves/svn-x64-centos/list-svn-deps.sh new file mode 100755 index 0000000..793874c --- /dev/null +++ b/tools/buildbot/slaves/svn-x64-centos/list-svn-deps.sh @@ -0,0 +1,34 @@ +#!/bin/sh +# List the versions of all of SVN's dependencies. +# The output is suitable for putting in the buildbot slave's 'info/host' +# file, after a general description of the slave machine. + +echo "=== SVN dependencies ===" +DEPS="gcc apr apr-util apr-devel apr-util-devel httpd httpd-devel \ + neon neon-devel python python-devel ruby ruby-devel" +#yum -C list $DEPS +rpm -q ${DEPS} | sort | uniq +# The SQLite version is found by the name of the amalgamation directory, +# which is found in the home dir. It is also explicitly referenced in the +# './configure' line in 'svnbuild.sh'. +(cd && echo sqlite-3.*[0-9].*[0-9]) +echo + +echo "=== SVN test dependencies ===" +#rpm -q pysqlite | sort | uniq +echo + +JAVA_VER=`java -fullversion 2>&1` +PY_VER=`python -V 2>&1` +RUBY_VER=`ruby --version` +PERL_VER=`perl -v | grep This` +echo "=== interpreters / bindings ===" +echo "Java: $JAVA_VER" +echo "Python: $PY_VER" +echo "Ruby: $RUBY_VER" +echo "Perl: $PERL_VER" +echo + +echo "=== BuildBot version ===" +buildbot --version +echo diff --git a/tools/buildbot/slaves/centos/svnbuild.sh b/tools/buildbot/slaves/svn-x64-centos/svnbuild.sh index 9278aeb..eea0863 100755 --- a/tools/buildbot/slaves/centos/svnbuild.sh +++ b/tools/buildbot/slaves/svn-x64-centos/svnbuild.sh @@ -25,6 +25,22 @@ set -x export MAKEFLAGS=-j4 export PYTHON=/usr/local/python25/bin/python +SVN_VER_MINOR=`awk '/define SVN_VER_MINOR/ { print $3 }' subversion/include/svn_version.h` + +if [ $SVN_VER_MINOR -ge 9 ]; then + # 1.9 or newer requires APR 1.3.x and Serf 1.3.4 + # this bubbles out to httpd as well. So use the right dependencies + APR=/home/bt/packages/apr-1.3.9-prefix/bin/apr-1-config + APU=/home/bt/packages/apr-1.3.9-prefix/bin/apu-1-config + APXS=/home/bt/packages/apr-1.3.9-prefix/bin/apxs + SERF=/home/bt/packages/apr-1.3.9-prefix +else + APR=/usr + APU=/usr + APXS=/usr/sbin/apxs + SERF=/usr/local +fi + echo "========= autogen.sh" ./autogen.sh || exit $? @@ -32,13 +48,15 @@ echo "========= configure" # --with-junit=/usr/share/java/junit.jar # --with-jdk=/usr/lib/jvm/java-1.6.0-openjdk-1.6.0.0.x86_64 \ # --without-berkeley-db \ +# --disable-shared \ +#CFLAGS='-fprofile-arcs -ftest-coverage' \ ./configure --enable-javahl --enable-maintainer-mode \ --with-neon=/usr \ - --with-serf=/usr/local \ - --with-apxs=/usr/sbin/apxs \ + --with-serf=$SERF \ + --with-apxs=$APXS \ --with-berkeley-db \ - --with-apr=/usr \ - --with-apr-util=/usr \ + --with-apr=$APR \ + --with-apr-util=$APU \ --with-jdk=/opt/java/jdk1.6.0_15 \ --with-junit=/home/bt/junit-4.4.jar \ --with-sqlite=/home/bt/packages/sqlite-amalgamation-dir/sqlite3.c \ diff --git a/tools/buildbot/slaves/centos/svncheck-bindings.sh b/tools/buildbot/slaves/svn-x64-centos/svncheck-bindings.sh index 4e8c1aa..4e8c1aa 100755 --- a/tools/buildbot/slaves/centos/svncheck-bindings.sh +++ b/tools/buildbot/slaves/svn-x64-centos/svncheck-bindings.sh diff --git a/tools/buildbot/slaves/centos/svncheck.sh b/tools/buildbot/slaves/svn-x64-centos/svncheck.sh index 8240e36..77ed04d 100755 --- a/tools/buildbot/slaves/centos/svncheck.sh +++ b/tools/buildbot/slaves/svn-x64-centos/svncheck.sh @@ -35,10 +35,7 @@ test -e ../mount-ramdrive && ../mount-ramdrive echo "========= make" case "$2" in - ""|ra_dav|ra_neon) - make davautocheck FS_TYPE=$1 HTTP_LIBRARY=neon CLEANUP=1 || exit $? - ;; - ra_serf) + ""|ra_serf) make davautocheck FS_TYPE=$1 HTTP_LIBRARY=serf CLEANUP=1 || exit $? ;; ra_svn) diff --git a/tools/buildbot/slaves/centos/svnclean.sh b/tools/buildbot/slaves/svn-x64-centos/svnclean.sh index 95d4290..9a5e715 100755 --- a/tools/buildbot/slaves/centos/svnclean.sh +++ b/tools/buildbot/slaves/svn-x64-centos/svnclean.sh @@ -27,6 +27,6 @@ echo "========= unmount RAM disc" test -e ../unmount-ramdrive && ../unmount-ramdrive echo "========= make extraclean" -test -e Makefile && { make extraclean || exit $?; } +test -e Makefile && (make extraclean || exit $?) exit 0 diff --git a/tools/buildbot/slaves/centos/svnlog.sh b/tools/buildbot/slaves/svn-x64-centos/svnlog.sh index d3b5036..c2302e1 100755 --- a/tools/buildbot/slaves/centos/svnlog.sh +++ b/tools/buildbot/slaves/svn-x64-centos/svnlog.sh @@ -25,7 +25,7 @@ set -x # upload file to server FILENAME=tests-`date +%Y%m%d%H%M`.log.tgz tar -czf $FILENAME tests.log -ftp -n www.mobsol.be < ../ftpscript +ftp -n www.mobsol.be < ../ftpscript rm $FILENAME echo "Logs of the testrun can be found here: http://www.mobsol.be/logs/eh-debsarge1/$FILENAME" diff --git a/tools/buildbot/slaves/svn-x64-macosx-gnu-shared-daily-ra_serf/svnlog.sh b/tools/buildbot/slaves/svn-x64-macosx-gnu-shared-daily-ra_serf/svnlog.sh index b4d9e0c..ce845f8 100755 --- a/tools/buildbot/slaves/svn-x64-macosx-gnu-shared-daily-ra_serf/svnlog.sh +++ b/tools/buildbot/slaves/svn-x64-macosx-gnu-shared-daily-ra_serf/svnlog.sh @@ -23,7 +23,7 @@ # upload file to server FILENAME=tests-`date +%Y%m%d%H%M`.log.tgz tar -czf $FILENAME tests.log -ftp -n www.mobsol.be < ../ftpscript +ftp -n www.mobsol.be < ../ftpscript rm $FILENAME echo "Logs of the testrun can be found here: http://www.mobsol.be/logs/osx10.4-gcc4.0.1-ia32/$FILENAME" diff --git a/tools/buildbot/slaves/svn-x64-macosx-gnu-shared/svnlog.sh b/tools/buildbot/slaves/svn-x64-macosx-gnu-shared/svnlog.sh index b4d9e0c..ce845f8 100755 --- a/tools/buildbot/slaves/svn-x64-macosx-gnu-shared/svnlog.sh +++ b/tools/buildbot/slaves/svn-x64-macosx-gnu-shared/svnlog.sh @@ -23,7 +23,7 @@ # upload file to server FILENAME=tests-`date +%Y%m%d%H%M`.log.tgz tar -czf $FILENAME tests.log -ftp -n www.mobsol.be < ../ftpscript +ftp -n www.mobsol.be < ../ftpscript rm $FILENAME echo "Logs of the testrun can be found here: http://www.mobsol.be/logs/osx10.4-gcc4.0.1-ia32/$FILENAME" diff --git a/tools/buildbot/slaves/svn-x64-macosx/mkramdisk.sh b/tools/buildbot/slaves/svn-x64-macosx/mkramdisk.sh new file mode 100755 index 0000000..27c2e87 --- /dev/null +++ b/tools/buildbot/slaves/svn-x64-macosx/mkramdisk.sh @@ -0,0 +1,63 @@ +#!/bin/bash + +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. + +set -x + +if [ -z "$1" ]; then + echo "Missing parameter: volume name" + exit 1 +fi + +if [ -z "$2" ]; then + echo "Missing parameter: RAMdisk config file" + exit 1 +fi + +volume="/Volumes/$1" +ramconf="$2" + +ramconfpath=$(dirname "${ramconf}") +if [ ! -d "${ramconfpath}" ]; then + echo "Missing RAMdisk config file path: ${ramconfpath}" + exit 1 +fi +if [ -f "${ramconf}" ]; then + echo "RAMdisk config file exists: ${ramconf}" + exit 1 +fi + +if [ -d "${volume}" ]; then + echo "Mount point exists: ${volume}" + exit 1 +fi + +mount | grep "^/dev/disk[0-9][0-9]* on ${volume} (hfs" >/dev/null || { + set -e + echo -n "" > "${ramconf}" + + # Make sure we strip trailing spaces from the result of older + # versions of hduitil. + device=$(echo $(hdiutil attach -nomount ram://900000)) + newfs_hfs -M 0700 -v "$1" "${device}" + hdiutil mountvol "${device}" + + echo -n "${device}" > "${ramconf}" +} + +exit 0 diff --git a/tools/buildbot/slaves/svn-x64-macosx/rmramdisk.sh b/tools/buildbot/slaves/svn-x64-macosx/rmramdisk.sh new file mode 100755 index 0000000..c5db9bb --- /dev/null +++ b/tools/buildbot/slaves/svn-x64-macosx/rmramdisk.sh @@ -0,0 +1,62 @@ +#!/bin/bash + +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. + +set -x + +if [ -z "$1" ]; then + echo "Missing parameter: volume name" + exit 1 +fi + +if [ -z "$2" ]; then + echo "Missing parameter: RAMdisk config file" + exit 1 +fi + +volume="/Volumes/$1" +ramconf="$2" + +if [ ! -f "${ramconf}" ]; then + mount | grep "^/dev/disk[0-9][0-9]* on ${volume} (hfs" || { + echo "Not mounted: ${volume}" + exit 0 + } + echo "Missing RAMdisk config file: ${ramconf}" + exit 1 +fi + +if [ ! -d "${volume}" ]; then + echo "Mount point missing: ${volume}" + exit 1 +fi + +device=$(cat "${ramconf}") +devfmt=$(echo "${device}" | grep "^/dev/disk[0-9][0-9]*$") +if [ "${device}" != "${devfmt}" ]; then + echo "Invalid device name: ${device}" + exit 1 +fi + +mount | grep "^${device} on ${volume} (hfs" >/dev/null && { + set -e + rm "${ramconf}" + hdiutil detach "${device}" -force +} + +exit 0 diff --git a/tools/buildbot/slaves/svn-x64-macosx/setenv.sh b/tools/buildbot/slaves/svn-x64-macosx/setenv.sh new file mode 100644 index 0000000..31ece51 --- /dev/null +++ b/tools/buildbot/slaves/svn-x64-macosx/setenv.sh @@ -0,0 +1,70 @@ +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. + +## This script calls a helper that provides the folloing environemnt +## variables: +## +## PATH The search path +## SVNBB_OPENSSL OpenSSL installation prefix +## SVNBB_BDB Berkeley DB installation prefix +## SVNBB_SWIG Swig installation prefix +## SVNBB_SERF Serf installation prefix +## Note: Serf should be built only +## with the system APR/-Util. +## SVNBB_APR_13_NOTHREAD Path of APR-1.3 with threading disabled +## SVNBB_APR_15 Path of APR-1.5 +## SVNBB_APR_20_DEV Path of APR-2.0 +## SVNBB_JUNIT The path of the junit.jar +## SVNBB_PARALLEL Optional: parallelization; defaults to 2 +## LIBTOOL_CONFIG Optional: libtool configuration path +## +## The invoking script will set local variable named ${scripts} that +## is the absolute path the parent of this file. + +# Modify this to suit your deployment +environment=$(cd "${scripts}/.." && pwd)/environment.sh + +eval $(${environment}) +SVNBB_PARALLEL="${SVNBB_PARALLEL-2}" + +export PATH +export SVNBB_BDB +export SVNBB_SWIG +export SVNBB_SERF +export SVNBB_APR_13_NOTHREAD +export SVNBB_APR_15 +export SVNBB_APR_20_DEV +export SVNBB_JUNIT +export SVNBB_PARALLEL +export LIBTOOL_CONFIG + + +# Set the absolute source path +abssrc=$(pwd) + +# Set the path to the RAMdisk device name file +ramconf=$(dirname "${abssrc}")/ramdisk.conf + +# The RAMdisk volume name is the same as the name of the builder +volume_name=$(basename $(dirname "${abssrc}")) +if [ -z "${volume_name}" ]; then + echo "Missing config parameter: RAMdisk volume name" + exit 1 +fi + +# Set the absolute build path +absbld="/Volumes/${volume_name}" diff --git a/tools/buildbot/slaves/svn-x64-macosx/svnbuild-bindings.sh b/tools/buildbot/slaves/svn-x64-macosx/svnbuild-bindings.sh new file mode 100755 index 0000000..fa085dd --- /dev/null +++ b/tools/buildbot/slaves/svn-x64-macosx/svnbuild-bindings.sh @@ -0,0 +1,45 @@ +#!/bin/bash + +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. + +set -e +set -x + +scripts=$(cd $(dirname "$0") && pwd) + +. ${scripts}/setenv.sh + +# +# Step 4: build swig-py +# + +echo "============ make swig-py" +cd ${absbld} +make swig-py + +echo "============ make swig-pl" +cd ${absbld} +make swig-pl + +echo "============ make swig-rb" +cd ${absbld} +make swig-rb + +echo "============ make javahl" +cd ${absbld} +make javahl diff --git a/tools/buildbot/slaves/svn-x64-macosx/svnbuild.sh b/tools/buildbot/slaves/svn-x64-macosx/svnbuild.sh new file mode 100755 index 0000000..4f1e4e9 --- /dev/null +++ b/tools/buildbot/slaves/svn-x64-macosx/svnbuild.sh @@ -0,0 +1,101 @@ +#!/bin/bash + +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. + +set -e +set -x + +scripts=$(cd $(dirname "$0") && pwd) + +. ${scripts}/setenv.sh + +${scripts}/mkramdisk.sh ${volume_name} ${ramconf} + +# These are the default APR and Serf config options +serfconfig="--with-serf=${SVNBB_SERF} --with-apxs=/usr/sbin/apxs" + +# An optional parameter tells build scripts which version of APR to use +if [ ! -z "$1" ]; then + aprdir=$(eval 'echo $SVNBB_'"$1") +fi +if [ ! -z "${aprdir}" -a -d "${aprdir}" ]; then + aprconfig="--with-apr=${aprdir} --with-apr-util=${aprdir}" + serfconfig=" --without-serf --without-apxs" +fi + +# +# Step 0: Create a directory for the test log files +# +if [ -d "${abssrc}/.test-logs" ]; then + rm -fr "${abssrc}/.test-logs" +fi +mkdir "${abssrc}/.test-logs" || exit 1 + +# +# Step 1: get the latest and greatest amalgamanted SQLite +# + +echo "============ get-deps.sh sqlite" +cd ${abssrc} +rm -fr sqlite-amalgamation +./get-deps.sh sqlite + +# +# Step 2: Regenerate build scripts +# + +echo "============ autogen.sh" +cd ${abssrc} +./autogen.sh + +svnminor=$(awk '/define *SVN_VER_MINOR/ { print $3 }' subversion/include/svn_version.h) + +# --enable-optimize adds -flto which breaks the 1.8 C tests because +# they link main() from a library. +if [ ${svnminor} -gt 8 ]; then + optimizeconfig=' --enable-optimize' +fi + +# +# Step 3: Configure +# + +echo "============ configure" +cd ${absbld} +env CC=clang CXX=clang++ \ +${abssrc}/configure \ + --prefix="${absbld}/.install-prefix" \ + --disable-debug${optimizeconfig} \ + --disable-nls \ + --disable-mod-activation \ + ${aprconfig}${serfconfig} \ + --with-swig="${SVNBB_SWIG}" \ + --with-berkeley-db=db.h:"${SVNBB_BDB}/include":${SVNBB_BDB}/lib:db \ + --enable-javahl \ + --without-jikes \ + --with-junit="${SVNBB_JUNIT}" + +test -f config.log && mv config.log "${abssrc}/.test-logs/config.log" + +# +# Step 4: build +# + +echo "============ make" +cd ${absbld} +make -j${SVNBB_PARALLEL} diff --git a/tools/buildbot/slaves/svn-x64-macosx/svncheck-bindings.sh b/tools/buildbot/slaves/svn-x64-macosx/svncheck-bindings.sh new file mode 100755 index 0000000..943eb56 --- /dev/null +++ b/tools/buildbot/slaves/svn-x64-macosx/svncheck-bindings.sh @@ -0,0 +1,58 @@ +#!/bin/bash + +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. + + +run_tests() { + check="$1" + + echo "============ make check-${check}" + cd ${absbld} + make check-${check} || exit 1 +} + + +set -x + +scripts=$(cd $(dirname "$0") && pwd) + +. ${scripts}/setenv.sh + +# Parse arguments to find out which tests we should run +check_swig_py=false +check_swig_pl=false +check_swig_rb=false +check_javahl=false + +while [ ! -z "$1" ]; do + case "$1" in + swig-py) check_swig_py=true;; + swig-pl) check_swig_pl=true;; + swig-rb) check_swig_rb=true;; + javahl) check_javahl=true;; + *) exit 1;; + esac + shift +done + +${check_swig_py} && run_tests swig-py +${check_swig_pl} && run_tests swig-pl +${check_swig_rb} && run_tests swig-rb +${check_javahl} && run_tests javahl + +exit 0 diff --git a/tools/buildbot/slaves/svn-x64-macosx/svncheck.sh b/tools/buildbot/slaves/svn-x64-macosx/svncheck.sh new file mode 100755 index 0000000..31ca3a7 --- /dev/null +++ b/tools/buildbot/slaves/svn-x64-macosx/svncheck.sh @@ -0,0 +1,94 @@ +#!/bin/bash + +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. + + +run_tests() { + ra="$1" + fs="$2" + ok=true + + case "${ra}" in + local) check=check; skipC=;; + svn) check=svnserveautocheck; skipC="SKIP_C_TESTS=1";; + dav) check=davautocheck; skipC="SKIP_C_TESTS=1";; + *) exit 1;; + esac + + echo "============ make check ${ra}+${fs}" + cd ${absbld} + make ${check} FS_TYPE=${fs} PARALLEL=${SVNBB_PARALLEL} CLEANUP=1 ${skipC} || ok=false + + # Move any log files to the buildbot work directory + test -f tests.log && mv tests.log "${abssrc}/.test-logs/tests-${ra}-${fs}.log" + test -f fails.log && mv fails.log "${abssrc}/.test-logs/fails-${ra}-${fs}.log" + + # Remove the test working directory to make space on the RAM disk + # for more tests. + rm -fr subversion/tests/cmdline/svn-test-work + + ${ok} || exit 1 +} + +check_tests() { + ra="$1" + + ${check_fsfs} && run_tests ${ra} fsfs + ${check_fsfs_v6} && run_tests ${ra} fsfs-v6 + ${check_fsfs_v4} && run_tests ${ra} fsfs-v4 + ${check_bdb} && run_tests ${ra} bdb + ${check_fsx} && run_tests ${ra} fsx +} + + +set -x + +scripts=$(cd $(dirname "$0") && pwd) + +. ${scripts}/setenv.sh + +# Parse arguments to find out which tests we should run +check_local=false +check_svn=false +check_dav=false +check_fsfs=false +check_fsfs_v6=false +check_fsfs_v4=false +check_fsx=false +check_bdb=false + +while [ ! -z "$1" ]; do + case "$1" in + local) check_local=true;; + svn) check_svn=true;; + dav) check_dav=true;; + fsfs) check_fsfs=true;; + fsfs-v6) check_fsfs_v6=true;; + fsfs-v4) check_fsfs_v4=true;; + fsx) check_fsx=true;; + bdb) check_bdb=true;; + *) exit 1;; + esac + shift +done + +${check_local} && check_tests local +${check_svn} && check_tests svn +${check_dav} && check_tests dav + +exit 0 diff --git a/tools/buildbot/slaves/svn-x64-macosx/svnclean.sh b/tools/buildbot/slaves/svn-x64-macosx/svnclean.sh new file mode 100755 index 0000000..b2b0bb3 --- /dev/null +++ b/tools/buildbot/slaves/svn-x64-macosx/svnclean.sh @@ -0,0 +1,27 @@ +#!/bin/bash + +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. + +set -e +set -x + +scripts=$(cd $(dirname "$0") && pwd) + +. ${scripts}/setenv.sh + +${scripts}/rmramdisk.sh ${volume_name} ${ramconf} diff --git a/tools/buildbot/slaves/ubuntu-x64/svnlog.sh b/tools/buildbot/slaves/ubuntu-x64/svnlog.sh index d3b5036..c2302e1 100755 --- a/tools/buildbot/slaves/ubuntu-x64/svnlog.sh +++ b/tools/buildbot/slaves/ubuntu-x64/svnlog.sh @@ -25,7 +25,7 @@ set -x # upload file to server FILENAME=tests-`date +%Y%m%d%H%M`.log.tgz tar -czf $FILENAME tests.log -ftp -n www.mobsol.be < ../ftpscript +ftp -n www.mobsol.be < ../ftpscript rm $FILENAME echo "Logs of the testrun can be found here: http://www.mobsol.be/logs/eh-debsarge1/$FILENAME" diff --git a/tools/buildbot/slaves/win32-SharpSvn/svn-config.cmd.template b/tools/buildbot/slaves/win32-SharpSvn/svn-config.cmd.template index 5f337c0..d283de6 100644 --- a/tools/buildbot/slaves/win32-SharpSvn/svn-config.cmd.template +++ b/tools/buildbot/slaves/win32-SharpSvn/svn-config.cmd.template @@ -29,3 +29,22 @@ SET TMP=%TEMP% IF NOT EXIST "%TESTDIR%\" MKDIR "%TESTDIR%" IF NOT EXIST "%TEMP%\" MKDIR "%TEMP%" + + + + + +SET SVN_URL= +SET SVN_RELURL= +for /F "usebackq tokens=1,* delims=:" %%i IN (`svn info .`) do ( + + IF "%%i" == "URL" ( + SET SVN_URL=%%j + ) ELSE IF "%%i" == "Relative URL" ( + SET SVN_RELURL=%%j + ) +) +SET SVN_URL=%SVN_URL:~1% +SET SVN_RELURL=%SVN_RELURL:~3% +SET SVN_SUBBRANCH=%SVN_RELURL:~11% +SET SVN_BRANCH=%SVN_SUBBRANCH:branches/=% diff --git a/tools/buildbot/slaves/win32-SharpSvn/svntest-bindings.cmd b/tools/buildbot/slaves/win32-SharpSvn/svntest-bindings.cmd index f3c551e..90fd5d2 100644 --- a/tools/buildbot/slaves/win32-SharpSvn/svntest-bindings.cmd +++ b/tools/buildbot/slaves/win32-SharpSvn/svntest-bindings.cmd @@ -23,63 +23,99 @@ SETLOCAL ENABLEEXTENSIONS ENABLEDELAYEDEXPANSION CALL ..\svn-config.cmd IF ERRORLEVEL 1 EXIT /B 1 -svnversion . /1.6.x | find "S" > nul: -IF ERRORLEVEL 1 ( - ECHO --- Building 1.6.x: Skipping bindings --- - EXIT /B 0 +IF "%SVN_BRANCH%" LEQ "1.6.x" ( + ECHO --- Building 1.6.x or older: Skipping bindings --- + EXIT /B 0 ) -PATH %PATH%;%TESTDIR%\bin -SET result=0 +IF "%SVN_BRANCH%" LSS "1.9." ( + IF NOT EXIST "%TESTDIR%\bin" MKDIR "%TESTDIR%\bin" + xcopy /y /i ..\deps\release\bin\*.dll "%TESTDIR%\bin" -python win-tests.py -d -f fsfs --javahl "%TESTDIR%\tests" -IF ERRORLEVEL 1 ( - echo [python reported error %ERRORLEVEL%] - SET result=1 + PATH %TESTDIR%\bin;!PATH! ) -IF EXIST "%TESTDIR%\swig" rmdir /s /q "%TESTDIR%\swig" -mkdir "%TESTDIR%\swig\py-release\libsvn" -mkdir "%TESTDIR%\swig\py-release\svn" +SET result=0 + +if "%SVN_BRANCH%" GTR "1.9." ( -xcopy "release\subversion\bindings\swig\python\*.pyd" "%TESTDIR%\swig\py-release\libsvn\*.pyd" > nul: -xcopy "release\subversion\bindings\swig\python\libsvn_swig_py\*.dll" "%TESTDIR%\swig\py-release\libsvn\*.dll" > nul: -xcopy "subversion\bindings\swig\python\*.py" "%TESTDIR%\swig\py-release\libsvn\*.py" > nul: -xcopy "subversion\bindings\swig\python\svn\*.py" "%TESTDIR%\swig\py-release\svn\*.py" > nul: + python win-tests.py -r -f fsfs --swig=python "%TESTDIR%\tests" -SET PYTHONPATH=%TESTDIR%\swig\py-release + IF ERRORLEVEL 1 ( + echo [Python tests reported error !ERRORLEVEL!] 1>&2 + SET result=1 + ) ELSE ( + echo Done. + ) -python subversion\bindings\swig\python\tests\run_all.py -IF ERRORLEVEL 1 ( - echo [Python reported error %ERRORLEVEL%] - SET result=1 -) +) ELSE ( + IF EXIST "%TESTDIR%\swig" rmdir /s /q "%TESTDIR%\swig" + mkdir "%TESTDIR%\swig\py-release\libsvn" + mkdir "%TESTDIR%\swig\py-release\svn" -mkdir "%TESTDIR%\swig\pl-release\SVN" -mkdir "%TESTDIR%\swig\pl-release\auto\SVN" -xcopy subversion\bindings\swig\perl\native\*.pm "%TESTDIR%\swig\pl-release\SVN" > nul: -pushd release\subversion\bindings\swig\perl\native -for %%i in (*.dll) do ( - set name=%%i - mkdir "%TESTDIR%\swig\pl-release\auto\SVN\!name:~0,-4!" - xcopy "!name:~0,-4!.*" "%TESTDIR%\swig\pl-release\auto\SVN\!name:~0,-4!" > nul: - xcopy /y "_Core.dll" "%TESTDIR%\swig\pl-release\auto\SVN\!name:~0,-4!" > nul: + xcopy "release\subversion\bindings\swig\python\*.pyd" "%TESTDIR%\swig\py-release\libsvn\*.pyd" > nul: + xcopy "release\subversion\bindings\swig\python\libsvn_swig_py\*.dll" "%TESTDIR%\swig\py-release\libsvn\*.dll" > nul: + xcopy "subversion\bindings\swig\python\*.py" "%TESTDIR%\swig\py-release\libsvn\*.py" > nul: + xcopy "subversion\bindings\swig\python\svn\*.py" "%TESTDIR%\swig\py-release\svn\*.py" > nul: + + SET PYTHONPATH=%TESTDIR%\swig\py-release + + python subversion\bindings\swig\python\tests\run_all.py + IF ERRORLEVEL 1 ( + echo [Python tests reported error !ERRORLEVEL!] 1>&2 + REM SET result=1 + ) ELSE ( + echo Done. + ) ) -popd -svnversion . /1.7.x | find "S" > nul: -IF ERRORLEVEL 1 ( - ECHO --- Building 1.7.x: Skipping perl tests --- - EXIT /B %result% +if "%SVN_BRANCH%" GTR "1.9." ( + + python win-tests.py -d -f fsfs --swig=perl "%TESTDIR%\tests" + + IF ERRORLEVEL 1 ( + echo [Perl tests reported error !ERRORLEVEL!] 1>&2 + SET result=1 + ) ELSE ( + echo Done. + ) + +) ELSE IF "%SVN_BRANCH%" GTR "1.8." ( + + mkdir "%TESTDIR%\swig\pl-debug\SVN" + mkdir "%TESTDIR%\swig\pl-debug\auto\SVN" + xcopy subversion\bindings\swig\perl\native\*.pm "%TESTDIR%\swig\pl-debug\SVN" > nul: + pushd debug\subversion\bindings\swig\perl\native + for %%i in (*.dll) do ( + set name=%%i + mkdir "%TESTDIR%\swig\pl-debug\auto\SVN\!name:~0,-4!" + xcopy "!name:~0,-4!.*" "%TESTDIR%\swig\pl-debug\auto\SVN\!name:~0,-4!" > nul: + xcopy /y "_Core.dll" "%TESTDIR%\swig\pl-debug\auto\SVN\!name:~0,-4!" > nul: + ) + popd + + + SET PERL5LIB=%PERL5LIB%;%TESTDIR%\swig\pl-debug; + pushd subversion\bindings\swig\perl\native + perl -MExtUtils::Command::MM -e "test_harness()" t\*.t + IF ERRORLEVEL 1 ( + echo [Test runner reported error !ERRORLEVEL!] + REM SET result=1 + ) + popd ) -SET PERL5LIB=%PERL5LIB%;%TESTDIR%\swig\pl-release; -pushd subversion\bindings\swig\perl\native -perl -MExtUtils::Command::MM -e test_harness() t\*.t -IF ERRORLEVEL 1 ( - echo [Perl reported error %ERRORLEVEL%] - SET result=1 +if "%SVN_BRANCH%" GTR "1.9." ( + python win-tests.py -d -f fsfs --swig=ruby "%TESTDIR%\tests" + + IF ERRORLEVEL 1 ( + echo [Ruby tests reported error !ERRORLEVEL!] 1>&2 + REM SET result=1 + ) ELSE ( + echo Done. + ) + + taskkill /im svnserve.exe /f ) -popd exit /b %result% diff --git a/tools/buildbot/slaves/win32-SharpSvn/svntest-build-bindings.cmd b/tools/buildbot/slaves/win32-SharpSvn/svntest-build-bindings.cmd index 9ed5879..c51133d 100644 --- a/tools/buildbot/slaves/win32-SharpSvn/svntest-build-bindings.cmd +++ b/tools/buildbot/slaves/win32-SharpSvn/svntest-build-bindings.cmd @@ -23,14 +23,26 @@ SETLOCAL ENABLEEXTENSIONS ENABLEDELAYEDEXPANSION CALL ..\svn-config.cmd IF ERRORLEVEL 1 EXIT /B 1 -svnversion . /1.6.x | find "S" > nul: -IF ERRORLEVEL 1 ( +IF "%SVN_BRANCH%" LEQ "1.6.x" ( ECHO --- Building 1.6.x: Skipping bindings --- EXIT /B 0 ) -msbuild subversion_vcnet.sln /p:Configuration=Debug /p:Platform=win32 /t:__JAVAHL__ /t:__JAVAHL_TESTS__ +SET DEBUG_TARGETS=/t:__ALL_TESTS__ +SET RELEASE_TARGETS=/t:__SWIG_PYTHON__ + +if "%SVN_BRANCH%" GTR "1.8." ( + SET DEBUG_TARGETS=%DEBUG_TARGETS% /t:__SWIG_PERL__ +) + +if "%SVN_BRANCH%" GTR "1.9." ( + SET DEBUG_TARGETS=%DEBUG_TARGETS% /t:__SWIG_RUBY__ +) + +msbuild subversion_vcnet.sln /m /v:m /p:Configuration=Debug /p:Platform=Win32 %DEBUG_TARGETS% IF ERRORLEVEL 1 EXIT /B 1 -msbuild subversion_vcnet.sln /p:Configuration=Release /p:Platform=win32 /t:__SWIG_PYTHON__ /t:__SWIG_PERL__ +msbuild subversion_vcnet.sln /m /v:m /p:Configuration=Release /p:Platform=Win32 %RELEASE_TARGETS% IF ERRORLEVEL 1 EXIT /B 1 + +EXIT /B 0 diff --git a/tools/buildbot/slaves/win32-SharpSvn/svntest-build.cmd b/tools/buildbot/slaves/win32-SharpSvn/svntest-build.cmd index 27ca272..41a8438 100644 --- a/tools/buildbot/slaves/win32-SharpSvn/svntest-build.cmd +++ b/tools/buildbot/slaves/win32-SharpSvn/svntest-build.cmd @@ -25,10 +25,12 @@ IF ERRORLEVEL 1 EXIT /B 1 PUSHD ..\deps -nant gen-dev -D:wc=..\build -D:impBase=../deps/build/win32 -D:botBuild=true %NANTARGS% +nant gen-dev -D:wc=..\build -D:impBase=../deps/build/win32 -D:botBuild=true %SVN_NANT_ARGS% IF ERRORLEVEL 1 EXIT /B 1 POPD -msbuild subversion_vcnet.sln /p:Configuration=Debug /p:Platform=win32 /t:__ALL_TESTS__ +msbuild subversion_vcnet.sln /m /v:m /p:Configuration=Debug /p:Platform=Win32 /t:__ALL_TESTS__ %SVN_MSBUILD_ARGS% IF ERRORLEVEL 1 EXIT /B 1 + +EXIT /B 0 diff --git a/tools/buildbot/slaves/win32-SharpSvn/svntest-cleanup.cmd b/tools/buildbot/slaves/win32-SharpSvn/svntest-cleanup.cmd index fc0adb6..571e2c0 100644 --- a/tools/buildbot/slaves/win32-SharpSvn/svntest-cleanup.cmd +++ b/tools/buildbot/slaves/win32-SharpSvn/svntest-cleanup.cmd @@ -28,17 +28,17 @@ PUSHD ..\deps ECHO Checking dependencies in %CD% IF NOT EXIST "imports\" ( - svn co --username guest --password "" http://sharpsvn.open.collab.net/svn/sharpsvn/trunk/imports imports + svn co https://ctf.open.collab.net/svn/repos/sharpsvn/trunk/imports imports --username guest --password "" ) IF NOT EXIST build\imports.done ( - svn up imports - copy /y imports\dev-default.build default.build - nant prep-dev %NANTARGS% - IF ERRORLEVEL 1 ( - exit /B 1 - ) - del release\bin\*svn* release\bin\_*.* 2>nul: - echo. > build\imports.done + svn up imports --username guest --password "" + copy /y imports\dev-default.build default.build + nant prep-dev %NANTARGS% + IF ERRORLEVEL 1 ( + EXIT /B 1 + ) + del release\bin\*svn* release\bin\_*.* 2>nul: + ECHO. > build\imports.done ) POPD @@ -50,6 +50,7 @@ IF NOT ERRORLEVEL 1 ( POPD +taskkill /im msbuild.exe /f 2> nul: taskkill /im svn.exe /f 2> nul: taskkill /im svnlook.exe /f 2> nul: taskkill /im svnadmin.exe /f 2> nul: @@ -57,19 +58,23 @@ taskkill /im svnserve.exe /f 2> nul: taskkill /im svnrdump.exe /f 2> nul: taskkill /im svnsync.exe /f 2> nul: taskkill /im httpd.exe /f 2> nul: +taskkill /im client-test.exe /f 2> nul: taskkill /im fs-test.exe /f 2> nul: taskkill /im op-depth-test.exe /f 2> nul: +taskkill /im atomic-ra-revprop-change.exe /f 2> nul: taskkill /im java.exe /f 2> nul: taskkill /im perl.exe /f 2> nul: +taskkill /im ruby.exe /f 2> nul: taskkill /im mspdbsrv.exe /f 2> nul: -IF EXIST "%TESTDIR%\tests\subversion\tests\cmdline\httpd\" ( - rmdir /s /q "%TESTDIR%\tests\subversion\tests\cmdline\httpd" -) + IF EXIST "%TESTDIR%\swig\" ( - rmdir /s /q "%TESTDIR%\swig" + rmdir /s /q "%TESTDIR%\swig" ) -del "%TESTDIR%\tests\*.log" 2> nul: - +IF EXIST "%TESTDIR%\tests\" ( + PUSHD "%TESTDIR%\tests\" + rmdir /s /q "%TESTDIR%\tests\" 2> nul: + POPD +) exit /B 0 diff --git a/tools/buildbot/slaves/win32-SharpSvn/svntest-javahl.cmd b/tools/buildbot/slaves/win32-SharpSvn/svntest-javahl.cmd new file mode 100644 index 0000000..0b0a507 --- /dev/null +++ b/tools/buildbot/slaves/win32-SharpSvn/svntest-javahl.cmd @@ -0,0 +1,46 @@ +@echo off +REM ================================================================ +REM Licensed to the Apache Software Foundation (ASF) under one +REM or more contributor license agreements. See the NOTICE file +REM distributed with this work for additional information +REM regarding copyright ownership. The ASF licenses this file +REM to you under the Apache License, Version 2.0 (the +REM "License"); you may not use this file except in compliance +REM with the License. You may obtain a copy of the License at +REM +REM http://www.apache.org/licenses/LICENSE-2.0 +REM +REM Unless required by applicable law or agreed to in writing, +REM software distributed under the License is distributed on an +REM "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +REM KIND, either express or implied. See the License for the +REM specific language governing permissions and limitations +REM under the License. +REM ================================================================ + +SETLOCAL ENABLEEXTENSIONS ENABLEDELAYEDEXPANSION + +CALL ..\svn-config.cmd +IF ERRORLEVEL 1 EXIT /B 1 + +IF "%SVN_BRANCH%" LEQ "1.6.x" ( + ECHO --- Building 1.6.x or older: Skipping JavaHL --- + EXIT /B 0 +) + +IF "%SVN_BRANCH%" LSS "1.9." ( + IF NOT EXIST "%TESTDIR%\bin" MKDIR "%TESTDIR%\bin" + xcopy /y /i ..\deps\release\bin\*.dll "%TESTDIR%\bin" + + PATH %TESTDIR%\bin;!PATH!;!JAVADIR! +) + +SET result=0 + +python win-tests.py -d -f fsfs --javahl "%TESTDIR%\tests" +IF ERRORLEVEL 1 ( + ECHO [JavaHL test runner reported error !ERRORLEVEL!] 1>&2 + SET result=1 +) + +EXIT /b %result% diff --git a/tools/buildbot/slaves/win32-SharpSvn/svntest-test.cmd b/tools/buildbot/slaves/win32-SharpSvn/svntest-test.cmd index 522cdae..d56ec3b 100644 --- a/tools/buildbot/slaves/win32-SharpSvn/svntest-test.cmd +++ b/tools/buildbot/slaves/win32-SharpSvn/svntest-test.cmd @@ -65,10 +65,12 @@ IF NOT "%1" == "" GOTO next taskkill /im svnserve.exe httpd.exe /f 2> nul: -IF NOT EXIST "%TESTDIR%\bin" MKDIR "%TESTDIR%\bin" -xcopy /y /i ..\deps\release\bin\*.dll "%TESTDIR%\bin" +IF "%SVN_BRANCH%" LSS "1.9." ( + IF NOT EXIST "%TESTDIR%\bin" MKDIR "%TESTDIR%\bin" + xcopy /y /i ..\deps\release\bin\*.dll "%TESTDIR%\bin" -PATH %TESTDIR%\bin;%PATH% + PATH %TESTDIR%\bin;!PATH! +) IF "%LOCAL%+%FSFS%" == "1+1" ( echo win-tests.py -c %PARALLEL% %MODE% -f fsfs %ARGS% "%TESTDIR%\tests" |