Title: [97521] trunk/Tools
Revision
97521
Author
[email protected]
Date
2011-10-14 15:37:16 -0700 (Fri, 14 Oct 2011)

Log Message

Write unit test to ensure style-checker-filter option is passed properly in webkit-patch
https://bugs.webkit.org/show_bug.cgi?id=70143

Reviewed by Adam Barth.

* Scripts/webkitpy/tool/commands/download_unittest.py: Added a test for land-cowboy. Not so cowboy after all.
* Scripts/webkitpy/tool/steps/checkstyle.py: Fixed a bug, discovered by the newly added test.

Modified Paths

Diff

Modified: trunk/Tools/ChangeLog (97520 => 97521)


--- trunk/Tools/ChangeLog	2011-10-14 22:35:26 UTC (rev 97520)
+++ trunk/Tools/ChangeLog	2011-10-14 22:37:16 UTC (rev 97521)
@@ -1,3 +1,13 @@
+2011-10-14  Dimitri Glazkov  <[email protected]>
+
+        Write unit test to ensure style-checker-filter option is passed properly in webkit-patch
+        https://bugs.webkit.org/show_bug.cgi?id=70143
+
+        Reviewed by Adam Barth.
+
+        * Scripts/webkitpy/tool/commands/download_unittest.py: Added a test for land-cowboy. Not so cowboy after all.
+        * Scripts/webkitpy/tool/steps/checkstyle.py: Fixed a bug, discovered by the newly added test.
+
 2011-10-14  David Levin  <[email protected]>
 
         watchlist: If the style check fails, then the watchlist will not be run.

Modified: trunk/Tools/Scripts/webkitpy/tool/commands/download_unittest.py (97520 => 97521)


--- trunk/Tools/Scripts/webkitpy/tool/commands/download_unittest.py	2011-10-14 22:35:26 UTC (rev 97520)
+++ trunk/Tools/Scripts/webkitpy/tool/commands/download_unittest.py	2011-10-14 22:37:16 UTC (rev 97521)
@@ -124,6 +124,31 @@
         self.assertEqual(mock_tool.scm().create_patch.call_count, 0)
         self.assertEqual(mock_tool.checkout().modified_changelogs.call_count, 1)
 
+    def test_land_cowboy(self):
+        expected_stderr = """MOCK run_and_throw_if_fail: ['mock-prepare-ChangeLog', '--email=MOCK email', '--merge-base=None', 'MockFile1'], cwd=/mock-checkout
+MOCK run_and_throw_if_fail: ['mock-check-webkit-style', '--git-commit', 'MOCK git commit', '--diff-files', 'MockFile1', '--filter', '-changelog'], cwd=/mock-checkout
+MOCK run_command: ['ruby', '-I', '/mock-checkout/Websites/bugs.webkit.org/PrettyPatch', '/mock-checkout/Websites/bugs.webkit.org/PrettyPatch/prettify.rb'], cwd=None
+MOCK: user.open_url: file://...
+Was that diff correct?
+Building WebKit
+MOCK run_and_throw_if_fail: ['mock-build-webkit'], cwd=/mock-checkout
+Running Python unit tests
+MOCK run_and_throw_if_fail: ['mock-test-webkitpy'], cwd=/mock-checkout
+Running Perl unit tests
+MOCK run_and_throw_if_fail: ['mock-test-webkitperl'], cwd=/mock-checkout
+Running Bindings tests
+MOCK run_and_throw_if_fail: ['mock-run-bindings-tests'], cwd=/mock-checkout
+Running _javascript_Core tests
+MOCK run_and_throw_if_fail: ['mock-run-javacriptcore-tests'], cwd=/mock-checkout
+Running run-webkit-tests
+MOCK run_and_throw_if_fail: ['mock-run-webkit-tests', '--quiet'], cwd=/mock-checkout
+Committed r49824: <http://trac.webkit.org/changeset/49824>
+Committed r49824: <http://trac.webkit.org/changeset/49824>
+No bug id provided.
+"""
+        mock_tool = MockTool(log_executive=True)
+        self.assert_execute_outputs(LandCowboy(), [50000], options=self._default_options(), expected_stderr=expected_stderr, tool=mock_tool)
+
     def test_land_red_builders(self):
         expected_stderr = 'Building WebKit\nRunning Python unit tests\nRunning Perl unit tests\nRunning Bindings tests\nRunning _javascript_Core tests\nRunning run-webkit-tests\nCommitted r49824: <http://trac.webkit.org/changeset/49824>\nUpdating bug 50000\n'
         mock_tool = MockTool()

Modified: trunk/Tools/Scripts/webkitpy/tool/steps/checkstyle.py (97520 => 97521)


--- trunk/Tools/Scripts/webkitpy/tool/steps/checkstyle.py	2011-10-14 22:35:26 UTC (rev 97520)
+++ trunk/Tools/Scripts/webkitpy/tool/steps/checkstyle.py	2011-10-14 22:37:16 UTC (rev 97521)
@@ -57,7 +57,7 @@
 
         if self._options.check_style_filter:
             args.append("--filter")
-            args.extend(self._options.check_style_filter)
+            args.append(self._options.check_style_filter)
 
         try:
             self._tool.executive.run_and_throw_if_fail(self._tool.port().check_webkit_style_command() + args, cwd=self._tool.scm().checkout_root)
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes

Reply via email to