Commit 98cb06d5 authored by aroben@apple.com's avatar aroben@apple.com

Add a "view leaks" link to builds on SnowLeopard Intel Leaks

Fixes <http://webkit.org/b/56032> Leaks viewer should be linked from leaks bot results page

Reviewed by David Kilzer.

* BuildSlaveSupport/build.webkit.org-config/master.cfg:
(ExtractTestResults.resultDirectoryURL): Added. Moved code to calculate the URL for the
build's results directory here...
(ExtractTestResults.finished): ...from here.
(ExtractTestResultsAndLeaks): New class that's used by the leaks builder
(ExtractTestResultsAndLeaks.finished): Calls up to the base class, but also adds a "view
leaks" link to point to Leaks Viewer for this build.
(TestFactory): Added ExtractTestResultsClass abstraction. This isn't overridden anywhere,
but it seemed good to add for consistency with BuildAndTestFactory.
(BuildAndTestFactory): Added ExtractTestResultsClass abstraction.
(BuildAndTestLeaksFactory): Use ExtractTestResultsAndLeaks as our ExtractTestResultsClass so
that we'll get a "view leaks" link.

git-svn-id: svn://svn.chromium.org/blink/trunk@83101 bbb929c8-8fbe-4397-9dbb-9b2b20218538
parent 10acfa3f
...@@ -407,17 +407,26 @@ class ExtractTestResults(master.MasterShellCommand): ...@@ -407,17 +407,26 @@ class ExtractTestResults(master.MasterShellCommand):
def __init__(self): def __init__(self):
master.MasterShellCommand.__init__(self, "") master.MasterShellCommand.__init__(self, "")
def resultDirectoryURL(self):
return self.build.getProperties().render(self.resultDirectory).replace("public_html/", "/") + "/"
def start(self): def start(self):
self.command = ["ditto", "-k", "-x", "-V", self.build.getProperties().render(self.zipFile), self.build.getProperties().render(self.resultDirectory)] self.command = ["ditto", "-k", "-x", "-V", self.build.getProperties().render(self.zipFile), self.build.getProperties().render(self.resultDirectory)]
return master.MasterShellCommand.start(self) return master.MasterShellCommand.start(self)
def finished(self, result): def finished(self, result):
url = self.build.getProperties().render(self.resultDirectory).replace("public_html/", "/") + "/results.html" url = self.resultDirectoryURL() + "results.html"
self.addURL("view results", url) self.addURL("view results", url)
result = master.MasterShellCommand.finished(self, result) result = master.MasterShellCommand.finished(self, result)
self.step_status.setText(["uploaded results"]) self.step_status.setText(["uploaded results"])
return result return result
class ExtractTestResultsAndLeaks(ExtractTestResults):
def finished(self, result):
result = ExtractTestResults.finished(self, result)
url = "/LeaksViewer/?url=" + urllib.quote(self.resultDirectoryURL(), safe="")
self.addURL("view leaks", url)
return result
class Factory(factory.BuildFactory): class Factory(factory.BuildFactory):
def __init__(self, platform, configuration, architectures, buildOnly): def __init__(self, platform, configuration, architectures, buildOnly):
...@@ -442,6 +451,7 @@ class BuildFactory(Factory): ...@@ -442,6 +451,7 @@ class BuildFactory(Factory):
class TestFactory(Factory): class TestFactory(Factory):
TestClass = RunWebKitTests TestClass = RunWebKitTests
ExtractTestResultsClass = ExtractTestResults
def __init__(self, platform, configuration, architectures): def __init__(self, platform, configuration, architectures):
Factory.__init__(self, platform, configuration, architectures, False) Factory.__init__(self, platform, configuration, architectures, False)
self.addStep(DownloadBuiltProduct) self.addStep(DownloadBuiltProduct)
...@@ -455,10 +465,11 @@ class TestFactory(Factory): ...@@ -455,10 +465,11 @@ class TestFactory(Factory):
self.addStep(RunPerlTests) self.addStep(RunPerlTests)
self.addStep(ArchiveTestResults) self.addStep(ArchiveTestResults)
self.addStep(UploadTestResults) self.addStep(UploadTestResults)
self.addStep(ExtractTestResults) self.addStep(self.ExtractTestResultsClass)
class BuildAndTestFactory(Factory): class BuildAndTestFactory(Factory):
TestClass = RunWebKitTests TestClass = RunWebKitTests
ExtractTestResultsClass = ExtractTestResults
def __init__(self, platform, configuration, architectures): def __init__(self, platform, configuration, architectures):
Factory.__init__(self, platform, configuration, architectures, False) Factory.__init__(self, platform, configuration, architectures, False)
if platform.startswith("chromium"): if platform.startswith("chromium"):
...@@ -481,7 +492,7 @@ class BuildAndTestFactory(Factory): ...@@ -481,7 +492,7 @@ class BuildAndTestFactory(Factory):
self.addStep(RunPerlTests) self.addStep(RunPerlTests)
self.addStep(ArchiveTestResults) self.addStep(ArchiveTestResults)
self.addStep(UploadTestResults) self.addStep(UploadTestResults)
self.addStep(ExtractTestResults) self.addStep(self.ExtractTestResultsClass)
if platform == "gtk": if platform == "gtk":
self.addStep(RunGtkAPITests) self.addStep(RunGtkAPITests)
if platform == "qt": if platform == "qt":
...@@ -489,6 +500,7 @@ class BuildAndTestFactory(Factory): ...@@ -489,6 +500,7 @@ class BuildAndTestFactory(Factory):
class BuildAndTestLeaksFactory(BuildAndTestFactory): class BuildAndTestLeaksFactory(BuildAndTestFactory):
TestClass = RunWebKitLeakTests TestClass = RunWebKitLeakTests
ExtractTestResultsClass = ExtractTestResultsAndLeaks
class NewBuildAndTestFactory(BuildAndTestFactory): class NewBuildAndTestFactory(BuildAndTestFactory):
TestClass = NewRunWebKitTests TestClass = NewRunWebKitTests
......
2011-04-06 Adam Roben <aroben@apple.com>
Add a "view leaks" link to builds on SnowLeopard Intel Leaks
Fixes <http://webkit.org/b/56032> Leaks viewer should be linked from leaks bot results page
Reviewed by David Kilzer.
* BuildSlaveSupport/build.webkit.org-config/master.cfg:
(ExtractTestResults.resultDirectoryURL): Added. Moved code to calculate the URL for the
build's results directory here...
(ExtractTestResults.finished): ...from here.
(ExtractTestResultsAndLeaks): New class that's used by the leaks builder
(ExtractTestResultsAndLeaks.finished): Calls up to the base class, but also adds a "view
leaks" link to point to Leaks Viewer for this build.
(TestFactory): Added ExtractTestResultsClass abstraction. This isn't overridden anywhere,
but it seemed good to add for consistency with BuildAndTestFactory.
(BuildAndTestFactory): Added ExtractTestResultsClass abstraction.
(BuildAndTestLeaksFactory): Use ExtractTestResultsAndLeaks as our ExtractTestResultsClass so
that we'll get a "view leaks" link.
2011-04-06 Zan Dobersek <zandobersek@gmail.com> 2011-04-06 Zan Dobersek <zandobersek@gmail.com>
Reviewed by Eric Seidel. Reviewed by Eric Seidel.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment