Bug 68904 - watchlist: Move boilerplate diff to .patch file or something similar.
Summary: watchlist: Move boilerplate diff to .patch file or something similar.
Status: RESOLVED WONTFIX
Alias: None
Product: WebKit
Classification: Unclassified
Component: Tools / Tests (show other bugs)
Version: 528+ (Nightly build)
Hardware: All All
: P2 Normal
Assignee: David Levin
URL:
Keywords:
Depends on: 68871
Blocks: 68822
  Show dependency treegraph
 
Reported: 2011-09-27 08:27 PDT by David Levin
Modified: 2011-09-27 22:55 PDT (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description David Levin 2011-09-27 08:27:40 PDT
See https://bugs.webkit.org/show_bug.cgi?id=68871#c3.
Comment 1 David Levin 2011-09-27 17:53:26 PDT
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.)
Comment 2 Adam Barth 2011-09-27 21:31:41 PDT
I'm not sure I understand what problem you're trying to solve.  Are you trying to write a test?
Comment 3 David Levin 2011-09-27 22:14:54 PDT
(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.)
Comment 4 Eric Seidel (no email) 2011-09-27 22:27:18 PDT
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. :)
Comment 5 David Levin 2011-09-27 22:55:33 PDT
Ok maybe some times later if inspiration strikes.