Title: [165108] trunk/Tools
- Revision
- 165108
- Author
- [email protected]
- Date
- 2014-03-05 07:48:29 -0800 (Wed, 05 Mar 2014)
Log Message
[GTK] Give the WebKit GObject DOM bindings API break detection it's own buildbot bubble
https://bugs.webkit.org/show_bug.cgi?id=129637
Reviewed by Carlos Garcia Campos.
* BuildSlaveSupport/build.webkit.org-config/master.cfg:
(RunGtkWebKitGObjectDOMBindingsAPIBreakTests): Added this test runner.
(RunGtkWebKitGObjectDOMBindingsAPIBreakTests.commandComplete): Run the breakage test command and scan the output.
(RunGtkWebKitGObjectDOMBindingsAPIBreakTests.evaluateCommand): Return failure if there is missing API (an API break).
New API typically just requires a rebaseline and isn't necessarily a faiulre.
(TestFactory.__init__): Add the test for GTK+.
* BuildSlaveSupport/build.webkit.org-config/mastercfg_unittest.py: Add a unit test for the new bubble.
Modified Paths
Diff
Modified: trunk/Tools/BuildSlaveSupport/build.webkit.org-config/master.cfg (165107 => 165108)
--- trunk/Tools/BuildSlaveSupport/build.webkit.org-config/master.cfg 2014-03-05 15:16:08 UTC (rev 165107)
+++ trunk/Tools/BuildSlaveSupport/build.webkit.org-config/master.cfg 2014-03-05 15:48:29 UTC (rev 165108)
@@ -635,6 +635,35 @@
return [self.name]
+class RunGtkWebKitGObjectDOMBindingsAPIBreakTests(shell.Test):
+ name = "WebKit GObject DOM bindings API break tests"
+ description = ["WebKit GObject DOM bindings API break tests running"]
+ descriptionDone = ["WebKit GObject DOM bindings API break tests"]
+ command = ["./Tools/gtk/check-for-webkitdom-api-breaks"]
+
+ def commandComplete(self, cmd):
+ shell.Test.commandComplete(self, cmd)
+
+ logText = cmd.logs['stdio'].getText()
+
+ self.missingAPI = bool(re.findall("Missing API", logText))
+ self.newAPI = bool(re.findall("New API", logText))
+
+ line = ""
+ if self.newAPI:
+ line += "Found new API."
+ if self.missingAPI:
+ line += "Found missing API."
+ if line:
+ self.statusLine = [ line ]
+
+ def evaluateCommand(self, cmd):
+ if self.missingAPI:
+ return FAILURE
+ if self.newAPI:
+ return WARNINGS
+ return SUCCESS
+
class RunWebKitLeakTests(RunWebKitTests):
warnOnWarnings = True
def start(self):
@@ -797,6 +826,7 @@
self.addStep(RunEflAPITests)
if platform == "gtk":
self.addStep(RunGtkAPITests())
+ self.addStep(RunGtkWebKitGObjectDOMBindingsAPIBreakTests())
class BuildAndTestFactory(Factory):
CompileClass = CompileWebKit
Modified: trunk/Tools/BuildSlaveSupport/build.webkit.org-config/mastercfg_unittest.py (165107 => 165108)
--- trunk/Tools/BuildSlaveSupport/build.webkit.org-config/mastercfg_unittest.py 2014-03-05 15:16:08 UTC (rev 165107)
+++ trunk/Tools/BuildSlaveSupport/build.webkit.org-config/mastercfg_unittest.py 2014-03-05 15:48:29 UTC (rev 165108)
@@ -381,6 +381,51 @@
self.fail("Error during instantiation %s buildstep for %s builder: %s\n" % (buildStepName, builderName, e))
return doTest
+class RunGtkWebKitGObjectDOMBindingsAPIBreakTestsTest(unittest.TestCase):
+ def assertResults(self, expected_missing, expected_new, stdio):
+ expected_text = ""
+ expected_results = SUCCESS
+ if expected_new:
+ expected_results = WARNINGS
+ if expected_missing:
+ expected_results = FAILURE
+
+ cmd = StubRemoteCommand(0, stdio)
+ step = RunGtkWebKitGObjectDOMBindingsAPIBreakTests()
+ step.commandComplete(cmd)
+
+ actual_results = step.evaluateCommand(cmd)
+ self.assertEqual(expected_results, actual_results)
+ self.assertEqual(expected_missing, step.missingAPI)
+ self.assertEqual(expected_new, step.newAPI)
+
+ def test_missing_and_new_api(self):
+ self.assertResults(expected_missing=True, expected_new=True, stdio="""Missing API (API break!) detected in GObject DOM bindings
+ gboolean webkit_dom_html_input_element_get_webkitdirectory(WebKitDOMHTMLInputElement*)
+ gchar* webkit_dom_text_track_cue_get_text(WebKitDOMTextTrackCue*)
+
+New API detected in GObject DOM bindings
+ void webkit_dom_html_input_element_set_capture(WebKitDOMHTMLInputElement*, gboolean)
+ gboolean webkit_dom_html_input_element_get_capture(WebKitDOMHTMLInputElement*)
+ void webkit_dom_text_track_add_cue(WebKitDOMTextTrack*, WebKitDOMTextTrackCue*, GError**)
+ gchar* webkit_dom_document_get_origin(WebKitDOMDocument*)""")
+
+ def test_missing_api(self):
+ self.assertResults(expected_missing=True, expected_new=False, stdio="""Missing API (API break!) detected in GObject DOM bindings
+ gboolean webkit_dom_html_input_element_get_webkitdirectory(WebKitDOMHTMLInputElement*)
+ gchar* webkit_dom_text_track_cue_get_text(WebKitDOMTextTrackCue*)""")
+
+ def test_new_api(self):
+ self.assertResults(expected_missing=False, expected_new=True, stdio="""New API detected in GObject DOM bindings
+ void webkit_dom_html_input_element_set_capture(WebKitDOMHTMLInputElement*, gboolean)
+ gboolean webkit_dom_html_input_element_get_capture(WebKitDOMHTMLInputElement*)
+ void webkit_dom_text_track_add_cue(WebKitDOMTextTrack*, WebKitDOMTextTrackCue*, GError**)
+ gchar* webkit_dom_document_get_origin(WebKitDOMDocument*)""")
+
+ def test_success(self):
+ self.assertResults(expected_missing=False, expected_new=False, stdio="")
+
+
# FIXME: We should run this file as part of test-webkitpy.
# Unfortunately test-webkitpy currently requires that unittests
# be located in a directory with a valid module name.
Modified: trunk/Tools/ChangeLog (165107 => 165108)
--- trunk/Tools/ChangeLog 2014-03-05 15:16:08 UTC (rev 165107)
+++ trunk/Tools/ChangeLog 2014-03-05 15:48:29 UTC (rev 165108)
@@ -1,3 +1,18 @@
+2014-03-05 Martin Robinson <[email protected]>
+
+ [GTK] Give the WebKit GObject DOM bindings API break detection it's own buildbot bubble
+ https://bugs.webkit.org/show_bug.cgi?id=129637
+
+ Reviewed by Carlos Garcia Campos.
+
+ * BuildSlaveSupport/build.webkit.org-config/master.cfg:
+ (RunGtkWebKitGObjectDOMBindingsAPIBreakTests): Added this test runner.
+ (RunGtkWebKitGObjectDOMBindingsAPIBreakTests.commandComplete): Run the breakage test command and scan the output.
+ (RunGtkWebKitGObjectDOMBindingsAPIBreakTests.evaluateCommand): Return failure if there is missing API (an API break).
+ New API typically just requires a rebaseline and isn't necessarily a faiulre.
+ (TestFactory.__init__): Add the test for GTK+.
+ * BuildSlaveSupport/build.webkit.org-config/mastercfg_unittest.py: Add a unit test for the new bubble.
+
2014-03-05 Krzysztof Czech <[email protected]>
[ATK] Expose missing functionalities of AtkTableCell to AT
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes