Changeset 57499 in webkit


Ignore:
Timestamp:
Apr 12, 2010 9:00:30 PM (14 years ago)
Author:
eric@webkit.org
Message:

2010-04-12 Eric Seidel <eric@webkit.org>

Reviewed by Adam Barth.

new-run-webkit-tests should only build java support files on Mac
https://bugs.webkit.org/show_bug.cgi?id=37482

Only the mac needs java support files, so I pushed _build_java
down into the Mac port using a new hook "_check_port_build".
In the process I noticed a bunch of code which could be shared
between all ports and thus got rid of _tests_for_disabled_features
and version() copy/paste between all webkit ports.
I also made check_build only bother to check for ImageDiff if we're
using pixel tests.

  • Scripts/webkitpy/layout_tests/port/gtk.py:
  • Scripts/webkitpy/layout_tests/port/mac.py:
  • Scripts/webkitpy/layout_tests/port/qt.py:
  • Scripts/webkitpy/layout_tests/port/webkit.py:
  • Scripts/webkitpy/layout_tests/port/win.py:
Location:
trunk/WebKitTools
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • trunk/WebKitTools/ChangeLog

    r57497 r57499  
     12010-04-12  Eric Seidel  <eric@webkit.org>
     2
     3        Reviewed by Adam Barth.
     4
     5        new-run-webkit-tests should only build java support files on Mac
     6        https://bugs.webkit.org/show_bug.cgi?id=37482
     7
     8        Only the mac needs java support files, so I pushed _build_java
     9        down into the Mac port using a new hook "_check_port_build".
     10        In the process I noticed a bunch of code which could be shared
     11        between all ports and thus got rid of _tests_for_disabled_features
     12        and version() copy/paste between all webkit ports.
     13        I also made check_build only bother to check for ImageDiff if we're
     14        using pixel tests.
     15
     16        * Scripts/webkitpy/layout_tests/port/gtk.py:
     17        * Scripts/webkitpy/layout_tests/port/mac.py:
     18        * Scripts/webkitpy/layout_tests/port/qt.py:
     19        * Scripts/webkitpy/layout_tests/port/webkit.py:
     20        * Scripts/webkitpy/layout_tests/port/win.py:
     21
    1222010-04-12  Dumitru Daniliuc  <dumi@chromium.org>
    223
  • trunk/WebKitTools/Scripts/webkitpy/layout_tests/port/gtk.py

    r57483 r57499  
    4646        WebKitPort.__init__(self, port_name, options)
    4747
    48     def version(self):
    49         return ''
    50 
    5148    def _tests_for_other_platforms(self):
    5249        # FIXME: This list could be dynamic based on platform name and
     
    5956            "platform/mac",
    6057        ]
    61 
    62     # FIXME: Validate this list.
    63     def _tests_for_disabled_features(self):
    64         # FIXME: This should use the feature detection from
    65         # webkitperl/features.pm to match run-webkit-tests.
    66         # For now we hard-code a list of features known to be disabled on
    67         # the Win platform.
    68         disabled_feature_tests = [
    69             "fast/xhtmlmp",
    70             "http/tests/wml",
    71             "mathml",
    72             "wml",
    73         ]
    74         # FIXME: webarchive tests expect to read-write from
    75         # -expected.webarchive files instead of .txt files.
    76         # This script doesn't know how to do that yet, so pretend they're
    77         # just "disabled".
    78         webarchive_tests = [
    79             "webarchive",
    80             "svg/webarchive",
    81             "http/tests/webarchive",
    82             "svg/custom/image-with-prefix-in-webarchive.svg",
    83         ]
    84         return disabled_feature_tests + webarchive_tests
    8558
    8659    def _path_to_apache_config_file(self):
  • trunk/WebKitTools/Scripts/webkitpy/layout_tests/port/mac.py

    r57466 r57499  
    107107        return ''
    108108
     109    def _build_java_test_support(self):
     110        java_tests_path = os.path.join(self.layout_tests_dir(), "java")
     111        build_java = ["/usr/bin/make", "-C", java_tests_path]
     112        if self._executive.run_command(build_java, return_exit_code=True):
     113            _log.error("Failed to build Java support files: %s" % build_java)
     114            return False
     115        return True
     116
     117    def _check_port_build(self):
     118        return self._build_java_test_support()
     119
    109120    def _tests_for_other_platforms(self):
    110121        # The original run-webkit-tests builds up a "whitelist" of tests to
     
    120131            "platform/win",
    121132        ]
    122 
    123     def _tests_for_disabled_features(self):
    124         # FIXME: This should use the feature detection from
    125         # webkitperl/features.pm to match run-webkit-tests.
    126         # For now we hard-code a list of features known to be disabled on
    127         # the Mac platform.
    128         disabled_feature_tests = [
    129             "fast/xhtmlmp",
    130             "http/tests/wml",
    131             "mathml",
    132             "wml",
    133         ]
    134         # FIXME: webarchive tests expect to read-write from
    135         # -expected.webarchive files instead of .txt files.
    136         # This script doesn't know how to do that yet, so pretend they're
    137         # just "disabled".
    138         webarchive_tests = [
    139             "webarchive",
    140             "svg/webarchive",
    141             "http/tests/webarchive",
    142             "svg/custom/image-with-prefix-in-webarchive.svg",
    143         ]
    144         return disabled_feature_tests + webarchive_tests
    145133
    146134    # FIXME: This doesn't have anything to do with WebKit.
  • trunk/WebKitTools/Scripts/webkitpy/layout_tests/port/qt.py

    r57491 r57499  
    4646        WebKitPort.__init__(self, port_name, options)
    4747
    48     def version(self):
    49         return ''
    50 
    5148    def _tests_for_other_platforms(self):
    5249        # FIXME: This list could be dynamic based on platform name and
     
    5956            "platform/mac",
    6057        ]
    61 
    62     # FIXME: Validate this list.
    63     def _tests_for_disabled_features(self):
    64         # FIXME: This should use the feature detection from
    65         # webkitperl/features.pm to match run-webkit-tests.
    66         # For now we hard-code a list of features known to be disabled on
    67         # the Qt platform.
    68         disabled_feature_tests = [
    69             "fast/xhtmlmp",
    70             "http/tests/wml",
    71             "mathml",
    72             "wml",
    73         ]
    74         # FIXME: webarchive tests expect to read-write from
    75         # -expected.webarchive files instead of .txt files.
    76         # This script doesn't know how to do that yet, so pretend they're
    77         # just "disabled".
    78         webarchive_tests = [
    79             "webarchive",
    80             "svg/webarchive",
    81             "http/tests/webarchive",
    82             "svg/custom/image-with-prefix-in-webarchive.svg",
    83         ]
    84         return disabled_feature_tests + webarchive_tests
    8558
    8659    def _path_to_apache_config_file(self):
  • trunk/WebKitTools/Scripts/webkitpy/layout_tests/port/webkit.py

    r57446 r57499  
    7272                            'test_expectations.txt')
    7373
     74    # Only needed by ports which maintain versioned test expectations (like mac-tiger vs. mac-leopard)
     75    def version(self):
     76        return ''
     77
    7478    def _build_driver(self):
    7579        return not self._executive.run_command([
     
    7781            self.flag_from_configuration(self._options.configuration),
    7882        ], return_exit_code=True)
    79 
    80     def _build_java(self):
    81         java_tests_path = os.path.join(self.layout_tests_dir(), "java")
    82         build_java = ["/usr/bin/make", "-C", java_tests_path]
    83         if self._executive.run_command(build_java, return_exit_code=True):
    84             _log.error("Failed to build Java support files: %s" % build_java)
    85             return False
    86         return True
    8783
    8884    def _check_driver(self):
     
    9692        if not self._build_driver():
    9793            return False
    98         if not self.check_image_diff():
    99             return False
    10094        if not self._check_driver():
    10195            return False
    102         if not self._build_java():
     96        if self._options.pixel_tests:
     97            if not self.check_image_diff():
     98                return False
     99        if not self._check_port_build():
    103100            return False
    104101        return True
     102
     103    def _check_port_build(self):
     104        # Ports can override this method to do additional checks.
     105        pass
    105106
    106107    def check_image_diff(self, override_step=None, logging=True):
     
    210211
    211212    def _tests_for_disabled_features(self):
    212         raise NotImplementedError('WebKitPort._tests_for_disabled_features')
    213213        # FIXME: This should use the feature detection from
    214214        # webkitperl/features.pm to match run-webkit-tests.
  • trunk/WebKitTools/Scripts/webkitpy/layout_tests/port/win.py

    r57444 r57499  
    4646        WebKitPort.__init__(self, port_name, options)
    4747
    48     def version(self):
    49         return ''
    50 
    5148    def _tests_for_other_platforms(self):
    5249        # FIXME: This list could be dynamic based on platform name and
     
    5956            "platform/mac",
    6057        ]
    61 
    62     # FIXME: Validate this list.
    63     def _tests_for_disabled_features(self):
    64         # FIXME: This should use the feature detection from
    65         # webkitperl/features.pm to match run-webkit-tests.
    66         # For now we hard-code a list of features known to be disabled on
    67         # the Win platform.
    68         disabled_feature_tests = [
    69             "fast/xhtmlmp",
    70             "http/tests/wml",
    71             "mathml",
    72             "wml",
    73         ]
    74         # FIXME: webarchive tests expect to read-write from
    75         # -expected.webarchive files instead of .txt files.
    76         # This script doesn't know how to do that yet, so pretend they're
    77         # just "disabled".
    78         webarchive_tests = [
    79             "webarchive",
    80             "svg/webarchive",
    81             "http/tests/webarchive",
    82             "svg/custom/image-with-prefix-in-webarchive.svg",
    83         ]
    84         return disabled_feature_tests + webarchive_tests
    8558
    8659    def _path_to_apache_config_file(self):
Note: See TracChangeset for help on using the changeset viewer.