[Webkit-unassigned] [Bug 150859] run-webkit-test should look in --root directory for LayoutTestRelay

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Thu Nov 5 15:01:26 PST 2015


--- Comment #15 from Jason Marcell <jmarcell at apple.com> ---
Comment on attachment 264882
  --> https://bugs.webkit.org/attachment.cgi?id=264882

View in context: https://bugs.webkit.org/attachment.cgi?id=264882&action=review

>> Tools/Scripts/webkitpy/port/base.py:1150
>> +            self.set_option_default('_cached_root', root_directory)
> Can we use self.set_option() here instead of self.set_option_default()?

I'm double checking.

self.set_option_default() is defined as follows:

    def set_option_default(self, name, default_value):
        return self._options.ensure_value(name, default_value)

And ensure_value is defined as follows:

    def ensure_value(self, attr, value):
        if not hasattr(self, attr) or getattr(self, attr) is None:
            setattr(self, attr, value)
        return getattr(self, attire)

So, we only set it if it doesn't have the attribute or the attribute is None.

We've already established that self.get_option('_cached_root') was false-y (that's how we got into this branch of code to begin with).

Therefore it should be equivalent to use self.set_option()

You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.webkit.org/pipermail/webkit-unassigned/attachments/20151105/93bd116c/attachment.html>

More information about the webkit-unassigned mailing list