Changeset 52025 in webkit


Ignore:
Timestamp:
Dec 11, 2009 2:39:29 PM (14 years ago)
Author:
eric@webkit.org
Message:

2009-12-11 Eric Seidel <eric@webkit.org>

Reviewed by Adam Barth.

CommandsTest.assert_execute_outputs doesn't check stderr
https://bugs.webkit.org/show_bug.cgi?id=32352

Fix assert_execute_outputs to check stderr
and then fix all the unit tests which needed to
pass stderr output.

  • Scripts/modules/commands/commandtest.py:
  • Scripts/modules/commands/download_unittest.py:
  • Scripts/modules/commands/upload_unittest.py:
Location:
trunk/WebKitTools
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/WebKitTools/ChangeLog

    r52016 r52025  
     12009-12-11  Eric Seidel  <eric@webkit.org>
     2
     3        Reviewed by Adam Barth.
     4
     5        CommandsTest.assert_execute_outputs doesn't check stderr
     6        https://bugs.webkit.org/show_bug.cgi?id=32352
     7
     8        Fix assert_execute_outputs to check stderr
     9        and then fix all the unit tests which needed to
     10        pass stderr output.
     11
     12        * Scripts/modules/commands/commandtest.py:
     13        * Scripts/modules/commands/download_unittest.py:
     14        * Scripts/modules/commands/upload_unittest.py:
     15
    1162009-12-11  Adam Barth  <abarth@webkit.org>
    217
  • trunk/WebKitTools/Scripts/modules/commands/commandtest.py

    r51436 r52025  
    4040        (stdout_string, stderr_string) = capture.restore_output()
    4141        self.assertEqual(stdout_string, expected_stdout)
    42         self.assertEqual(expected_stderr, expected_stderr)
     42        self.assertEqual(stderr_string, expected_stderr)
  • trunk/WebKitTools/Scripts/modules/commands/download_unittest.py

    r51443 r52025  
    4848
    4949    def test_build(self):
    50         self.assert_execute_outputs(Build(), [], options=self._default_options())
     50        expected_stderr = "Updating working directory\nBuilding WebKit\n"
     51        self.assert_execute_outputs(Build(), [], options=self._default_options(), expected_stderr=expected_stderr)
    5152
    5253    def test_apply_attachment(self):
     
    5455        options.update = True
    5556        options.local_commit = True
    56         self.assert_execute_outputs(ApplyAttachment(), [197], options=options)
     57        expected_stderr = "Updating working directory\nApplying attachment 197 from bug 42\n"
     58        self.assert_execute_outputs(ApplyAttachment(), [197], options=options, expected_stderr=expected_stderr)
    5759
    5860    def test_apply_patches(self):
     
    6062        options.update = True
    6163        options.local_commit = True
    62         self.assert_execute_outputs(ApplyPatches(), [42], options=options)
     64        expected_stderr = "Updating working directory\nApplying attachment 197 from bug 42\nApplying attachment 128 from bug 42\n"
     65        self.assert_execute_outputs(ApplyPatches(), [42], options=options, expected_stderr=expected_stderr)
    6366
    6467    def test_land_diff(self):
    65         self.assert_execute_outputs(LandDiff(), [42], options=self._default_options())
     68        expected_stderr = "Building WebKit\nUpdating bug 42\n"
     69        self.assert_execute_outputs(LandDiff(), [42], options=self._default_options(), expected_stderr=expected_stderr)
    6670
    6771    def test_check_style(self):
    68         self.assert_execute_outputs(CheckStyle(), [197], options=self._default_options())
     72        expected_stderr = "Processing 1 patch from 1 bug.\nUpdating working directory\nProcessing patch 197 from bug 42.\nRunning check-webkit-style\n"
     73        self.assert_execute_outputs(CheckStyle(), [197], options=self._default_options(), expected_stderr=expected_stderr)
    6974
    7075    def test_build_attachment(self):
    71         self.assert_execute_outputs(BuildAttachment(), [197], options=self._default_options())
     76        expected_stderr = "Processing 1 patch from 1 bug.\nUpdating working directory\nProcessing patch 197 from bug 42.\nBuilding WebKit\n"
     77        self.assert_execute_outputs(BuildAttachment(), [197], options=self._default_options(), expected_stderr=expected_stderr)
    7278
    7379    def test_land_attachment(self):
    74         self.assert_execute_outputs(LandAttachment(), [197], options=self._default_options())
     80        expected_stderr = "Processing 1 patch from 1 bug.\nUpdating working directory\nProcessing patch 197 from bug 42.\nBuilding WebKit\n"
     81        self.assert_execute_outputs(LandAttachment(), [197], options=self._default_options(), expected_stderr=expected_stderr)
    7582
    7683    def test_land_patches(self):
    77         self.assert_execute_outputs(LandPatches(), [42], options=self._default_options())
     84        expected_stderr = "2 reviewed patches found on bug 42.\nProcessing 2 patches from 1 bug.\nUpdating working directory\nProcessing patch 197 from bug 42.\nBuilding WebKit\nUpdating working directory\nProcessing patch 128 from bug 42.\nBuilding WebKit\n"
     85        self.assert_execute_outputs(LandPatches(), [42], options=self._default_options(), expected_stderr=expected_stderr)
  • trunk/WebKitTools/Scripts/modules/commands/upload_unittest.py

    r51436 r52025  
    4040
    4141    def test_post_diff(self):
    42         self.assert_execute_outputs(PostDiff(), [42])
     42        expected_stderr = "Obsoleting 2 old patches on bug 42\n"
     43        self.assert_execute_outputs(PostDiff(), [42], expected_stderr=expected_stderr)
Note: See TracChangeset for help on using the changeset viewer.