| OLD | NEW |
| 1 # -*- python -*- | 1 # -*- python -*- |
| 2 # ex: set syntax=python: | 2 # ex: set syntax=python: |
| 3 | 3 |
| 4 # These modules come from scripts/master, which must be in the PYTHONPATH. | 4 # These modules come from scripts/master, which must be in the PYTHONPATH. |
| 5 # TODO(maruel): Upstream these to make it webkit.org-friendly. | 5 # TODO(maruel): Upstream these to make it webkit.org-friendly. |
| 6 from builders_pools import BuildersPools | 6 from builders_pools import BuildersPools |
| 7 from try_job_http import TryJobHTTP | 7 from try_job_http import TryJobHTTP |
| 8 #import try_job_status_update | 8 #import try_job_status_update |
| 9 #from try_job_svn import TryJobSubversion | 9 #from try_job_svn import TryJobSubversion |
| 10 | 10 |
| 11 | 11 |
| 12 c = BuildmasterConfig = {} | 12 c = BuildmasterConfig = {} |
| 13 | 13 |
| 14 from buildbot.buildslave import BuildSlave | 14 from buildbot.buildslave import BuildSlave |
| 15 from buildbot.changes.pb import PBChangeSource | 15 from buildbot.changes.pb import PBChangeSource |
| 16 from buildbot.scheduler import AnyBranchScheduler, Triggerable | 16 from buildbot.scheduler import AnyBranchScheduler, Triggerable |
| 17 from buildbot.status import html | 17 from buildbot.status import html |
| 18 from buildbot.process import buildstep, factory, properties | 18 from buildbot.process import buildstep, factory, properties |
| 19 # TODO(nsylvain) master is not available in 8.08. | 19 from buildbot.steps import master, shell, source, transfer, trigger |
| 20 #from buildbot.steps import master, shell, source, transfer, trigger | |
| 21 from buildbot.steps import shell, source, transfer, trigger | |
| 22 from buildbot.status.builder import SUCCESS, FAILURE, WARNINGS, SKIPPED | 20 from buildbot.status.builder import SUCCESS, FAILURE, WARNINGS, SKIPPED |
| 23 | 21 |
| 24 from twisted.internet import defer | 22 from twisted.internet import defer |
| 25 | 23 |
| 26 import re | 24 import re |
| 27 import simplejson | 25 import simplejson |
| 28 | 26 |
| 29 WithProperties = properties.WithProperties | 27 WithProperties = properties.WithProperties |
| 30 | 28 |
| 31 class ConfigureBuild(buildstep.BuildStep): | 29 class ConfigureBuild(buildstep.BuildStep): |
| (...skipping 263 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 295 | 293 |
| 296 | 294 |
| 297 class UploadTestResults(transfer.FileUpload): | 295 class UploadTestResults(transfer.FileUpload): |
| 298 slavesrc = "layout-test-results.zip" | 296 slavesrc = "layout-test-results.zip" |
| 299 masterdest = WithProperties("public_html/results/%(buildername)s/r%(got_revi
sion)s (%(buildnumber)s).zip") | 297 masterdest = WithProperties("public_html/results/%(buildername)s/r%(got_revi
sion)s (%(buildnumber)s).zip") |
| 300 | 298 |
| 301 def __init__(self): | 299 def __init__(self): |
| 302 transfer.FileUpload.__init__(self, self.slavesrc, self.masterdest) | 300 transfer.FileUpload.__init__(self, self.slavesrc, self.masterdest) |
| 303 | 301 |
| 304 | 302 |
| 305 # TODO(nsylvain): master is not available in 0.7.8 | 303 class ExtractTestResults(master.MasterShellCommand): |
| 306 #class ExtractTestResults(master.MasterShellCommand): | 304 zipFile = WithProperties("public_html/results/%(buildername)s/r%(got_revisio
n)s (%(buildnumber)s).zip") |
| 307 # zipFile = WithProperties("public_html/results/%(buildername)s/r%(got_revisi
on)s (%(buildnumber)s).zip") | 305 resultDirectory = WithProperties("public_html/results/%(buildername)s/r%(got
_revision)s (%(buildnumber)s)") |
| 308 # resultDirectory = WithProperties("public_html/results/%(buildername)s/r%(go
t_revision)s (%(buildnumber)s)") | 306 |
| 309 # | 307 def __init__(self): |
| 310 # def __init__(self): | 308 master.MasterShellCommand.__init__(self, "") |
| 311 # master.MasterShellCommand.__init__(self, "") | 309 |
| 312 # | 310 def start(self): |
| 313 # def start(self): | 311 self.command = ["ditto", "-k", "-x", "-V", self.build.getProperties().re
nder(self.zipFile), self.build.getProperties().render(self.resultDirectory)] |
| 314 # self.command = ["ditto", "-k", "-x", "-V", self.build.getProperties().r
ender(self.zipFile), self.build.getProperties().render(self.resultDirectory)] | 312 return master.MasterShellCommand.start(self) |
| 315 # return master.MasterShellCommand.start(self) | 313 |
| 316 # | 314 def finished(self, result): |
| 317 # def finished(self, result): | 315 url = self.build.getProperties().render(self.resultDirectory).replace("p
ublic_html/", "") |
| 318 # url = self.build.getProperties().render(self.resultDirectory).replace("
public_html/", "") | 316 self.addURL("view results", url) |
| 319 # self.addURL("view results", url) | 317 result = master.MasterShellCommand.finished(self, result) |
| 320 # result = master.MasterShellCommand.finished(self, result) | 318 self.step_status.setText(["uploaded results"]) |
| 321 # self.step_status.setText(["uploaded results"]) | 319 return result |
| 322 # return result | |
| 323 | 320 |
| 324 | 321 |
| 325 class Factory(factory.BuildFactory): | 322 class Factory(factory.BuildFactory): |
| 323 CheckOutClass = CheckOutSource |
| 326 def __init__(self, platform, configuration, architectures, buildOnly): | 324 def __init__(self, platform, configuration, architectures, buildOnly): |
| 327 factory.BuildFactory.__init__(self) | 325 factory.BuildFactory.__init__(self) |
| 328 self.addStep(ConfigureBuild, platform=platform, configuration=configurat
ion, architecture=" ".join(architectures), buildOnly=buildOnly) | 326 self.addStep(ConfigureBuild, platform=platform, configuration=configurat
ion, architecture=" ".join(architectures), buildOnly=buildOnly) |
| 329 self.addStep(CheckOutSource) | 327 self.addStep(self.CheckOutClass) |
| 330 if platform == "win": | 328 if platform == "win": |
| 331 self.addStep(InstallWin32Dependencies) | 329 self.addStep(InstallWin32Dependencies) |
| 332 | 330 |
| 333 # FIXME: Remove this factory once Chromium WebKit port build system is decoupled
from | 331 # FIXME: Remove this factory once Chromium WebKit port build system is decoupled
from |
| 334 # Chromium (https://bugs.webkit.org/show_bug.cgi?id=28396) | 332 # Chromium (https://bugs.webkit.org/show_bug.cgi?id=28396) |
| 335 class ChromiumBuildFactory(factory.BuildFactory): | 333 class ChromiumBuildFactory(factory.BuildFactory): |
| 336 def __init__(self, platform, configuration, architectures): | 334 def __init__(self, platform, configuration, architectures): |
| 337 factory.BuildFactory.__init__(self) | 335 factory.BuildFactory.__init__(self) |
| 338 self.addStep(ConfigureBuild, platform=platform, configuration=configurat
ion, architecture=" ".join(architectures), buildOnly=True) | 336 self.addStep(ConfigureBuild, platform=platform, configuration=configurat
ion, architecture=" ".join(architectures), buildOnly=True) |
| 339 self.addStep(UpdateChromiumSource) | 337 self.addStep(UpdateChromiumSource) |
| 340 self.addStep(CompileChromiumWebKit) | 338 self.addStep(CompileChromiumWebKit) |
| 341 | 339 |
| 342 class BuildFactory(Factory): | 340 class BuildFactory(Factory): |
| 343 def __init__(self, platform, configuration, architectures, triggers): | 341 def __init__(self, platform, configuration, architectures, triggers): |
| 344 Factory.__init__(self, platform, configuration, architectures, True) | 342 Factory.__init__(self, platform, configuration, architectures, True) |
| 345 self.addStep(CompileWebKit) | 343 self.addStep(CompileWebKit) |
| 346 self.addStep(ArchiveBuiltProduct) | 344 self.addStep(ArchiveBuiltProduct) |
| 347 self.addStep(UploadBuiltProduct) | 345 self.addStep(UploadBuiltProduct) |
| 348 self.addStep(trigger.Trigger, schedulerNames=triggers) | 346 self.addStep(trigger.Trigger, schedulerNames=triggers) |
| 349 | 347 |
| 350 class TestFactory(Factory): | 348 class TestFactory(Factory): |
| 351 def __init__(self, platform, configuration, architectures): | 349 def __init__(self, platform, configuration, architectures): |
| 352 Factory.__init__(self, platform, configuration, architectures, False) | 350 Factory.__init__(self, platform, configuration, architectures, False) |
| 353 self.addStep(DownloadBuiltProduct) | 351 self.addStep(DownloadBuiltProduct) |
| 354 self.addStep(ExtractBuiltProduct) | 352 self.addStep(ExtractBuiltProduct) |
| 355 self.addStep(RunJavaScriptCoreTests, skipBuild=True) | 353 self.addStep(RunJavaScriptCoreTests, skipBuild=True) |
| 356 self.addStep(RunWebKitTests, skipBuild=(platform == 'win')) | 354 self.addStep(RunWebKitTests, skipBuild=(platform == 'win')) |
| 357 self.addStep(ArchiveTestResults) | 355 self.addStep(ArchiveTestResults) |
| 358 self.addStep(UploadTestResults) | 356 self.addStep(UploadTestResults) |
| 359 # TODO(nsylvain): master is not available in 0.7.8 | 357 self.addStep(ExtractTestResults) |
| 360 #self.addStep(ExtractTestResults) | |
| 361 | 358 |
| 362 class BuildAndTestFactory(Factory): | 359 class BuildAndTestFactory(Factory): |
| 363 TestClass = RunWebKitTests | 360 TestClass = RunWebKitTests |
| 364 def __init__(self, platform, configuration, architectures): | 361 def __init__(self, platform, configuration, architectures): |
| 365 Factory.__init__(self, platform, configuration, architectures, False) | 362 Factory.__init__(self, platform, configuration, architectures, False) |
| 366 self.addStep(CompileWebKit) | 363 self.addStep(CompileWebKit) |
| 367 self.addStep(RunJavaScriptCoreTests) | 364 self.addStep(RunJavaScriptCoreTests) |
| 368 self.addStep(self.TestClass) | 365 self.addStep(self.TestClass) |
| 369 self.addStep(ArchiveTestResults) | 366 self.addStep(ArchiveTestResults) |
| 370 self.addStep(UploadTestResults) | 367 self.addStep(UploadTestResults) |
| 371 # TODO(nsylvain): master is not available in 0.7.8 | 368 self.addStep(ExtractTestResults) |
| 372 #self.addStep(ExtractTestResults) | |
| 373 | 369 |
| 374 class BuildAndTestLeaksFactory(BuildAndTestFactory): | 370 class BuildAndTestLeaksFactory(BuildAndTestFactory): |
| 375 TestClass = RunWebKitLeakTests | 371 TestClass = RunWebKitLeakTests |
| 376 | 372 |
| 373 class TryJobCheckOutSource(CheckOutSource): |
| 374 mode = "copy" |
| 377 | 375 |
| 378 class TryFactory(Factory): | 376 class TryFactory(Factory): |
| 379 """Similar to BuildAndTestFactory but doesn't archive the results.""" | 377 """Similar to BuildAndTestFactory but doesn't archive the results.""" |
| 380 TestClass = RunWebKitTests | 378 TestClass = RunWebKitTests |
| 379 CheckOutClass = TryJobCheckOutSource |
| 381 def __init__(self, platform, configuration, architectures): | 380 def __init__(self, platform, configuration, architectures): |
| 382 Factory.__init__(self, platform, configuration, architectures, False) | 381 Factory.__init__(self, platform, configuration, architectures, False) |
| 383 self.addStep(CompileWebKit) | 382 self.addStep(CompileWebKit) |
| 384 self.addStep(RunJavaScriptCoreTests) | 383 self.addStep(RunJavaScriptCoreTests) |
| 385 self.addStep(self.TestClass) | 384 self.addStep(self.TestClass) |
| 386 | 385 |
| 387 | 386 |
| 388 # FIXME: Remove this factory once Chromium WebKit port build system is decoupled
from | 387 # FIXME: Remove this factory once Chromium WebKit port build system is decoupled
from |
| 389 # Chromium (https://bugs.webkit.org/show_bug.cgi?id=28396) | 388 # Chromium (https://bugs.webkit.org/show_bug.cgi?id=28396) |
| 390 class TryChromiumFactory(ChromiumBuildFactory): | 389 class TryChromiumFactory(ChromiumBuildFactory): |
| (...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 461 | 460 |
| 462 # Keep last try jobs, the default is too low. Must keep at least a few days | 461 # Keep last try jobs, the default is too low. Must keep at least a few days |
| 463 # worth of try jobs. | 462 # worth of try jobs. |
| 464 c['buildHorizon'] = 3000 | 463 c['buildHorizon'] = 3000 |
| 465 c['logHorizon'] = 3000 | 464 c['logHorizon'] = 3000 |
| 466 # Must be at least 2x the number of slaves. | 465 # Must be at least 2x the number of slaves. |
| 467 c['eventHorizon'] = 200 | 466 c['eventHorizon'] = 200 |
| 468 # Must be at least 2x the number of on-going builds. | 467 # Must be at least 2x the number of on-going builds. |
| 469 c['buildCacheSize'] = 200 | 468 c['buildCacheSize'] = 200 |
| 470 | 469 |
| OLD | NEW |