Changeset 79046 in webkit


Ignore:
Timestamp:
Feb 18, 2011 3:47:12 PM (13 years ago)
Author:
dpranke@chromium.org
Message:

2011-02-18 Dirk Pranke <dpranke@chromium.org>

Reviewed by Adam Roben.

Skip pretty patch unit tests if ruby isn't installed.

https://bugs.webkit.org/show_bug.cgi?id=54699

  • Scripts/webkitpy/common/prettypatch_unittest.py:
Location:
trunk/Tools
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Tools/ChangeLog

    r79045 r79046  
     12011-02-18  Dirk Pranke  <dpranke@chromium.org>
     2
     3        Reviewed by Adam Roben.
     4
     5        Skip pretty patch unit tests if ruby isn't installed.
     6
     7        https://bugs.webkit.org/show_bug.cgi?id=54699
     8
     9        * Scripts/webkitpy/common/prettypatch_unittest.py:
     10
    1112011-02-18  Dirk Pranke  <dpranke@chromium.org>
    212
  • trunk/Tools/Scripts/webkitpy/common/prettypatch_unittest.py

    r58803 r79046  
    3535
    3636class PrettyPatchTest(unittest.TestCase):
     37    def check_ruby(self):
     38        executive = Executive()
     39        try:
     40            result = executive.run_command(['ruby', '--version'])
     41        except OSError, e:
     42            return False
     43        return True
    3744
    3845    _diff_with_multiple_encodings = """
     
    6067
    6168    def test_pretty_diff_encodings(self):
     69        if not self.check_ruby():
     70            return
     71
    6272        pretty_patch = PrettyPatch(Executive(), self._webkit_root())
    6373        pretty = pretty_patch.pretty_diff(self._diff_with_multiple_encodings)
     
    6676
    6777    def test_pretty_print_empty_string(self):
     78        if not self.check_ruby():
     79            return
     80
    6881        # Make sure that an empty diff does not hang the process.
    6982        pretty_patch = PrettyPatch(Executive(), self._webkit_root())
Note: See TracChangeset for help on using the changeset viewer.