Changeset 57290 in webkit


Ignore:
Timestamp:
Apr 8, 2010 1:47:06 PM (14 years ago)
Author:
dpranke@chromium.org
Message:

2010-04-07 Laszlo Gombos <Laszlo Gombos>

Reviewed by Kenneth Rohde Christiansen.

[Qt] Fix trunk (non-standalone) builds for Symbian
https://bugs.webkit.org/show_bug.cgi?id=37136

Test for source files before building instead of relying on
standalone_package config.

  • WebKit.pro:
Location:
trunk/WebKitTools
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/WebKitTools/ChangeLog

    r57278 r57290  
     12010-04-07  Dirk Pranke  <dpranke@chromium.org>
     2
     3        Reviewed by Adam Barth.
     4
     5        Enable rebaseline-chromium-webkit-tests to run from a webkit-only
     6        checkout (i.e., you don't need anything from the Chromium tree checked
     7        out). This requires us to introduce the concept of a "target"
     8        port/platform that we use to get configuration information from as well
     9        as the "running" port that we use to make directories and diff images
     10        and the "rebaselining" port we use to actually manage baselines.
     11
     12        https://bugs.webkit.org/show_bug.cgi?id=37238
     13
     14        * Scripts/webkitpy/layout_tests/port/mac.py:
     15        * Scripts/webkitpy/layout_tests/rebaseline_chromium_webkit_tests.py:
     16
    1172010-04-05  Antonio Gomes  <tonikitoo@webkit.org>
    218
  • trunk/WebKitTools/Scripts/webkitpy/layout_tests/port/mac.py

    r57257 r57290  
    6363        # FIXME: disable pixel tests until they are run by default on the
    6464        # build machines.
    65         if options and options.pixel_tests is None:
     65        if options and (not hasattr(options, "pixel_tests") or
     66           options.pixel_tests is None):
    6667            options.pixel_tests = False
    6768
     
    8788            return False
    8889
     90        if not self.check_image_diff():
     91            return False
     92
    8993        driver_path = self._path_to_driver()
    9094        if not os.path.exists(driver_path):
    9195            _log.error("DumpRenderTree was not found at %s" % driver_path)
    92             return False
    93 
    94         image_diff_path = self._path_to_image_diff()
    95         if not os.path.exists(image_diff_path):
    96             _log.error("ImageDiff was not found at %s" % image_diff_path)
    9796            return False
    9897
     
    103102            return False
    104103
     104        return True
     105
     106    def check_image_diff(self, override_step=None, logging=True):
     107        image_diff_path = self._path_to_image_diff()
     108        if not os.path.exists(image_diff_path):
     109            _log.error("ImageDiff was not found at %s" % image_diff_path)
     110            return False
    105111        return True
    106112
  • trunk/WebKitTools/Scripts/webkitpy/layout_tests/rebaseline_chromium_webkit_tests.py

    r57256 r57290  
    4242"""
    4343
     44import copy
    4445import logging
    4546import optparse
     
    204205    REVISION_REGEX = r'<a href=\"(\d+)/\">'
    205206
    206     def __init__(self, running_port, platform, options):
     207    def __init__(self, running_port, target_port, platform, options):
     208        """
     209        Args:
     210            running_port: the Port the script is running on.
     211            target_port: the Port the script uses to find port-specific
     212                configuration information like the test_expectations.txt
     213                file location and the list of test platforms.
     214            platform: the test platform to rebaseline
     215            options: the command-line options object."""
    207216        self._platform = platform
    208217        self._options = options
    209         # This is the port that the script is running on.
    210218        self._port = running_port
    211         # This is the port that the rebaselining tool creates new baselines for.
     219        self._target_port = target_port
    212220        self._rebaseline_port = port.get(
    213             self._port.test_platform_name_to_name(platform), options)
     221            self._target_port.test_platform_name_to_name(platform), options)
    214222        self._rebaselining_tests = []
    215223        self._rebaselined_tests = []
     
    505513          False otherwise.
    506514        """
    507         test_filepath = os.path.join(self._port.layout_tests_dir(), test)
     515        test_filepath = os.path.join(self._target_port.layout_tests_dir(),
     516                                     test)
    508517        all_baselines = self._rebaseline_port.expected_baselines(
    509518            test_filepath, suffix, True)
     
    581590                self._test_expectations.remove_platform_from_expectations(
    582591                self._rebaselined_tests, self._platform))
    583             path = self._port.path_to_test_expectations_file()
     592            path = self._target_port.path_to_test_expectations_file()
    584593            if backup:
    585594                date_suffix = time.strftime('%Y%m%d%H%M%S',
     
    798807    HTML_TR = '<tr>%s</tr>'
    799808
    800     def __init__(self, port, options, platforms, rebaselining_tests):
     809    def __init__(self, target_port, options, platforms, rebaselining_tests):
    801810        self._html_directory = options.html_directory
    802         self._port = port
     811        self._target_port = target_port
    803812        self._platforms = platforms
    804813        self._rebaselining_tests = rebaselining_tests
     
    839848        _log.info('Launching html: "%s"', self._html_file)
    840849
    841         html_uri = self._port.filename_to_uri(self._html_file)
     850        html_uri = self._target_port.filename_to_uri(self._html_file)
    842851        webbrowser.open(html_uri, 1)
    843852
     
    877886        if os.path.exists(old_file):
    878887            links += html_td_link % {
    879                 'uri': self._port.filename_to_uri(old_file),
     888                'uri': self._target_port.filename_to_uri(old_file),
    880889                'name': baseline_filename}
    881890        else:
     
    883892            links += self.HTML_TD_NOLINK % ''
    884893
    885         links += html_td_link % {'uri': self._port.filename_to_uri(new_file),
     894        links += html_td_link % {'uri': self._target_port.filename_to_uri(
     895                                     new_file),
    886896                                 'name': baseline_filename}
    887897
     
    891901        _log.info('    Baseline diff file: "%s"', diff_file)
    892902        if os.path.exists(diff_file):
    893             links += html_td_link % {'uri': self._port.filename_to_uri(
     903            links += html_td_link % {'uri': self._target_port.filename_to_uri(
    894904                diff_file), 'name': 'Diff'}
    895905        else:
     
    930940
    931941        if rows:
    932             test_path = os.path.join(self._port.layout_tests_dir(), test)
    933             html = self.HTML_TR_TEST % (self._port.filename_to_uri(test_path),
    934                 test)
     942            test_path = os.path.join(self._target_port.layout_tests_dir(),
     943                                     test)
     944            html = self.HTML_TR_TEST % (
     945                self._target_port.filename_to_uri(test_path), test)
    935946            html += self.HTML_TEST_DETAIL % ' '.join(rows)
    936947
     
    988999                                   ' rebaselining comparison.'))
    9891000
     1001    option_parser.add_option('', '--target-platform',
     1002                             default='chromium',
     1003                             help=('The target platform to rebaseline '
     1004                                   '("mac", "chromium", "qt", etc.). Defaults '
     1005                                   'to "chromium".'))
    9901006    options = option_parser.parse_args()[0]
    9911007
    992     # FIXME: Setting options.chromium to True forces port.get() to only look
    993     # at Chromium ports; we hard-code this because this script doesn't work
    994     # on non-Chromium ports yet. We should fix that.
    995     options.chromium = True
     1008    # We need to create three different Port objects over the life of this
     1009    # script. |target_port_obj| is used to determine configuration information:
     1010    # location of the expectations file, names of ports to rebaseline, etc.
     1011    # |port_obj| is used for runtime functionality like actually diffing
     1012    # Then we create a rebaselining port to actual find and manage the
     1013    # baselines.
     1014    target_options = copy.copy(options)
     1015    if options.target_platform == 'chromium':
     1016        target_options.chromium = True
     1017    target_port_obj = port.get(None, target_options)
    9961018
    9971019    # Set up our logging format.
     
    10141036        port_obj = port.get(None, options)
    10151037    else:
    1016        _log.debug('Found release version image diff binary.')
     1038        _log.debug('Found release version image diff binary.')
    10171039
    10181040    # Verify 'platforms' option is valid
     
    10411063    backup = options.backup
    10421064    for platform in rebaseline_platforms:
    1043         rebaseliner = Rebaseliner(port_obj, platform, options)
     1065        rebaseliner = Rebaseliner(port_obj, target_port_obj, platform, options)
    10441066
    10451067        _log.info('')
     
    10561078    _log.info('')
    10571079    log_dashed_string('Rebaselining result comparison started', None)
    1058     html_generator = HtmlGenerator(port_obj,
     1080    html_generator = HtmlGenerator(target_port_obj,
    10591081                                   options,
    10601082                                   rebaseline_platforms,
Note: See TracChangeset for help on using the changeset viewer.