Changeset 55938 in webkit


Ignore:
Timestamp:
Mar 12, 2010 2:43:00 PM (14 years ago)
Author:
dpranke@chromium.org
Message:

2010-03-12 Dirk Pranke <dpranke@chromium.org>

Reviewed by Adam Barth.

new-run-webkit-tests --new-baseline doesn't work at all.

It attempts to call a method that isn't defined. To fix it, I
removed the unnecessary and unnecessarily confusing 'platform'
argument to the test_type constructor and use the Port object that
is passed in instead, since we are only ever generating a baseline
from the port that is currently executing.

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

  • Scripts/webkitpy/layout_tests/port/mac.py:
  • Scripts/webkitpy/layout_tests/rebaseline_chromium_webkit_tests.py:
  • Scripts/webkitpy/layout_tests/run_webkit_tests.py:
  • Scripts/webkitpy/layout_tests/test_types/test_type_base.py:
Location:
trunk/WebKitTools
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/WebKitTools/ChangeLog

    r55937 r55938  
     12010-03-12  Dirk Pranke  <dpranke@chromium.org>
     2
     3        Reviewed by Adam Barth.
     4
     5        new-run-webkit-tests --new-baseline doesn't work at all.
     6
     7        It attempts to call a method that isn't defined. To fix it, I
     8        removed the unnecessary and unnecessarily confusing 'platform'
     9        argument to the test_type constructor and use the Port object that
     10        is passed in instead, since we are only ever generating a baseline
     11        from the port that is currently executing.
     12
     13        https://bugs.webkit.org/show_bug.cgi?id=36046
     14
     15        * Scripts/webkitpy/layout_tests/port/mac.py:
     16        * Scripts/webkitpy/layout_tests/rebaseline_chromium_webkit_tests.py:
     17        * Scripts/webkitpy/layout_tests/run_webkit_tests.py:
     18        * Scripts/webkitpy/layout_tests/test_types/test_type_base.py:
     19
    1202010-03-12  Dirk Pranke  <dpranke@chromium.org>
    221
  • trunk/WebKitTools/Scripts/webkitpy/layout_tests/port/mac.py

    r55603 r55938  
    5959        self._cached_build_root = None
    6060
     61    def baseline_path(self):
     62        return self._webkit_baseline_path(self._name)
     63
    6164    def baseline_search_path(self):
    6265        dirs = []
  • trunk/WebKitTools/Scripts/webkitpy/layout_tests/rebaseline_chromium_webkit_tests.py

    r55868 r55938  
    545545
    546546        if ext1 == '.PNG':
    547             return image_diff.ImageDiff(self._port, self._platform,
    548                 '').diff_files(self._port, file1, file2)
     547            return image_diff.ImageDiff(self._port,
     548               '').diff_files(self._port, file1, file2)
    549549        else:
    550             return text_diff.TestTextDiff(self._port, self._platform,
     550            return text_diff.TestTextDiff(self._port,
    551551                '').diff_files(self._port, file1, file2)
    552552
  • trunk/WebKitTools/Scripts/webkitpy/layout_tests/run_webkit_tests.py

    r55741 r55938  
    517517            test_types = []
    518518            for t in self._test_types:
    519                 test_types.append(t(self._port, self._options.platform,
     519                test_types.append(t(self._port,
    520520                                    self._options.results_directory))
    521521
  • trunk/WebKitTools/Scripts/webkitpy/layout_tests/test_types/test_type_base.py

    r55603 r55938  
    7373    FILENAME_SUFFIX_COMPARE = "-diff.png"
    7474
    75     def __init__(self, port, platform, root_output_dir):
     75    def __init__(self, port, root_output_dir):
    7676        """Initialize a TestTypeBase object.
    7777
    7878        Args:
    79           platform: the platform (e.g., 'chromium-mac-leopard')
    80             identifying the platform-specific results to be used.
     79          port: object implementing port-specific information and methods
    8180          root_output_dir: The unix style path to the output dir.
    8281        """
    8382        self._root_output_dir = root_output_dir
    8483        self._port = port
    85         self._platform = platform
    8684
    8785    def _make_output_directory(self, filename):
     
    9391
    9492    def _save_baseline_data(self, filename, data, modifier):
    95         """Saves a new baseline file into the platform directory.
     93        """Saves a new baseline file into the port's baseline directory.
    9694
    9795        The file will be named simply "<test>-expected<modifier>", suitable for
     
    105103        relative_dir = os.path.dirname(
    106104            self._port.relative_test_filename(filename))
    107         output_dir = os.path.join(
    108             self._port.chromium_baseline_path(self._platform), relative_dir)
     105
     106        baseline_path = self._port.baseline_path()
     107        output_dir = os.path.join(baseline_path, relative_dir)
    109108        output_file = os.path.basename(os.path.splitext(filename)[0] +
    110109            self.FILENAME_SUFFIX_EXPECTED + modifier)
Note: See TracChangeset for help on using the changeset viewer.