Bug 68904
Summary: | watchlist: Move boilerplate diff to .patch file or something similar. | ||
---|---|---|---|
Product: | WebKit | Reporter: | David Levin <levin> |
Component: | Tools / Tests | Assignee: | David Levin <levin> |
Status: | RESOLVED WONTFIX | ||
Severity: | Normal | CC: | abarth, eric |
Priority: | P2 | ||
Version: | 528+ (Nightly build) | ||
Hardware: | All | ||
OS: | All | ||
Bug Depends on: | 68871 | ||
Bug Blocks: | 68822 |
David Levin
See https://bugs.webkit.org/show_bug.cgi?id=68871#c3.
Attachments | ||
---|---|---|
Add attachment proposed patch, testcase, etc. |
David Levin
I'm willing to do whatever changes are needed here and I think they are simple but I'm at a loss for what change should be done.
Here's a sketch of an idea:
1. Create Tools/Scripts/webkitpy/common/data/test.patch and put the patch in there.
2. Create Tools/Scripts/webkitpy/common/data/test_data.py to supply functions to return test data.
Initially it would have one function: get_test_patch()
which would load test.patch and return it as a string and cache the result for future callers.
I'll change all the current instances which use the string directly to call get_test_patch. (I'm not sure if this is a good name. I started with "test_patch" but that sounds like it is testing a patch.)
Adam Barth
I'm not sure I understand what problem you're trying to solve. Are you trying to write a test?
David Levin
(In reply to comment #2)
> I'm not sure I understand what problem you're trying to solve. Are you trying to write a test?
For this change https://bugs.webkit.org/attachment.cgi?id=108792&action=prettypatch, Eric suggested "Hm... OK. We could also just store this as a .patch file in some new fixtures directory or similar."
I checked it in so I could use that in my tests (which I have already done).
I filed this bug as a follow up to his comment. I'm trying to workout what that follow up looks like which is my comment was about. (I'm also fine with not doing anything else on this.)
Eric Seidel (no email)
I'm really not worried. You should do what you feel is best. No need to spend any serious time on this, just follow your vision. :)
David Levin
Ok maybe some times later if inspiration strikes.