[Webkit-unassigned] [Bug 117831] Develop rebase info tool for EWS

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Thu Jul 4 06:14:57 PDT 2013


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





--- Comment #6 from János Badics <jbadics at inf.u-szeged.hu>  2013-07-04 06:16:56 PST ---
(In reply to comment #2)
> 
> > Tools/Scripts/webkitpy/tool/steps/rebased_tests.py:61
> > +        match = re.match(os.path.join('LayoutTests', 'platform', '(.+?)', '(.*)'), absdir)
> 
> Why don't we use port.baseline_platform_dir or port.baseline_version_dir instead?

The goal of this function is to return the generic directory path without the LayoutTests prefix. So, if the last parameter is  LayoutTests/platform/efl/css1/basic/containment-expected.txt, then match is (u'efl', u'css1/basic'). This function returns css1/basic in this case. However, port.baseline_platform_dir returns /path/to/WebKit/repository/LayoutTests/platform/qt, if the script runs on a Qt EWS. But I can't use it to get css1/basic from 'LayoutTests/platform/efl/css1/basic/containment-expected.txt'.

> 
> > Tools/Scripts/webkitpy/tool/steps/rebased_tests.py:83
> > +    def _get_first_generic_by_filename(self, port, filename):
> > +        paths = self._get_tests_by_expected(port, filename)
> > +        filestub = self._get_test_name_stub(filename)
> > +        ret = None
> > +        for path in paths:
> > +            hit = re.match('.*' + filestub + '\..*', path)
> > +            if hit:
> > +                ret = hit.group(0)
> > +                break
> > +        return ret
> 
> What is this function trying to do?

According to the description at https://bugs.webkit.org/show_bug.cgi?id=118293 :
_test_relative_dir() determines the relative generic directory path for the given test, e.g.
LayoutTests/platform/qt-5.0-wk1/editing/deleting/delete-cell-contents-expected.txt ->
editing/deleting/
Then _tests_in_dir gets the paths of all the tests found in this directory. As a last step, the loop in _first_generic_by_filename() gets the first match to the given file name.

I am sure it can be solved in a more elegant way; currently this is the only way I can do it.

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.


More information about the webkit-unassigned mailing list