Bug 47761 - Rebaseline server tool
Summary: Rebaseline server tool
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Tools / Tests (show other bugs)
Version: 528+ (Nightly build)
Hardware: PC OS X 10.5
: P2 Normal
Assignee: Mihai Parparita
URL:
Keywords:
Depends on: 48892 49626 49640 49692 49763 49841 49991 50207 50305 50421 50473 50484
Blocks:
  Show dependency treegraph
 
Reported: 2010-10-15 18:22 PDT by Mihai Parparita
Modified: 2010-12-06 15:14 PST (History)
6 users (show)

See Also:


Attachments
Patch (31.93 KB, patch)
2010-10-15 18:23 PDT, Mihai Parparita
no flags Details | Formatted Diff | Diff
Patch (33.88 KB, patch)
2010-10-22 09:23 PDT, Mihai Parparita
no flags Details | Formatted Diff | Diff
Patch (42.90 KB, patch)
2010-10-22 21:54 PDT, Mihai Parparita
no flags Details | Formatted Diff | Diff
Patch (46.56 KB, patch)
2010-10-22 22:47 PDT, Mihai Parparita
no flags Details | Formatted Diff | Diff
Patch (48.37 KB, patch)
2010-10-25 14:52 PDT, Mihai Parparita
no flags Details | Formatted Diff | Diff
Patch (48.97 KB, patch)
2010-10-29 13:47 PDT, Mihai Parparita
no flags Details | Formatted Diff | Diff
Patch (51.19 KB, patch)
2010-11-01 18:15 PDT, Mihai Parparita
no flags Details | Formatted Diff | Diff
Patch (51.47 KB, patch)
2010-11-02 17:52 PDT, Mihai Parparita
no flags Details | Formatted Diff | Diff
Patch (14.48 KB, patch)
2010-11-04 15:58 PDT, Mihai Parparita
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Mihai Parparita 2010-10-15 18:22:58 PDT
For mass rebaselines (Leopard -> Snow Leopard, SVG changes, Skia changes), etc. it would be nice to be able to update baselines locally en-masse.
Comment 1 Mihai Parparita 2010-10-15 18:23:35 PDT
Created attachment 70938 [details]
Patch
Comment 2 Dirk Pranke 2010-10-15 19:08:29 PDT
nice! I've often thought about writing a script that did exactly this ...
Comment 3 Tony Chang 2010-10-18 09:03:35 PDT
I like the use of a local httpd to handle the file copies.  I'm happy to review this once you're happy with it.
Comment 4 Mihai Parparita 2010-10-22 09:23:32 PDT
Created attachment 71568 [details]
Patch

Progress
Comment 5 Mihai Parparita 2010-10-22 21:54:57 PDT
Created attachment 71619 [details]
Patch

More progress
Comment 6 Mihai Parparita 2010-10-22 22:47:26 PDT
Created attachment 71621 [details]
Patch
Comment 7 Mihai Parparita 2010-10-22 22:48:09 PDT
(notes for anyone interested in trying this)

Current usage:
1. Make a change that requires lots of (pixel) rebaselines
2. Run new-run-webkit-tests --tolerance 0 --pixel-tests [path/to/tests]
3. Run webkit-patch local-rebaseline /path/to/tests/results (usually WebKitBuild/{Debug|Release}/layout-test-results
4. Go to http://localhost:8127/

In the future, it probably also makes sense to allow a results zip file to be pulled from a bot, so that you can do mass rebaselines for other platforms too.

In the web UI (which requires a 30 inch display), you can use the menus at the top to select tests by failure type and directory. Once you have a set of tests selected, you can navigate between them with the « and » buttons, or by using the left and right arrow keys.

For a particular test, the current and expected outputs will be displayed, along with a diff. For image diffs, you can click anywhere in the images to get a "loupe" that lets you see pixel values up close.

You can use the two drop-downs at the bottom of the screen to choose what you want done with the baselines. The baseline target is where the test outputs should be copied to. If moving between platforms, you may wish to move current baselines to another directory (e.g. if updating current Mac baselines for Snow Leopard, you would set the target to "mac" and move current baselines to "mac-leopard").

Once you've determined that baselines should be updated, you can use the "Add to rebaseline queue" button (or the q key) to add it to the list. Once you've added enough tests to the queue (commits probably shouldn't get any bigger than ~250 baselines), you show the queue with the "Queue" link and use the "Rebaseline tests" button (or the r key). You can watch the progress in the log area (toggled by the link in the upper right).

The tool uses scm.py to move baselines around and mark them for addition/move, but I've only tried it in git checkouts so far.
Comment 8 Mihai Parparita 2010-10-22 22:49:28 PDT
+Ojan since he's interested in making rebaselining less painful too.
Comment 9 Adam Barth 2010-10-22 23:47:01 PDT
Hum...  I'm having trouble using the tool because I don't have a results.json.  It doesn't seem to be included in the zip from the bot.
Comment 10 Mihai Parparita 2010-10-25 14:52:36 PDT
Created attachment 71799 [details]
Patch
Comment 11 Mihai Parparita 2010-10-25 14:57:08 PDT
For anyone wanting to use this to help with rebaselining of pixel tests for Snow Leopard:
1. webkit-patch apply-attachment 71799 [details]
2. Claim a directory from https://spreadsheets.google.com/ccc?key=0AkV6W8Td7jGwdFpFdzJLNzZXNFZkVmhXYmlNVS1PZVE&hl=en&authkey=COyB-LwN
3. new-run-webkit-tests --tolerance=0.0 --pixel-tests directory/you/picked
4. webkit-patch local-rebaseline WebKitBuild/Debug/layout-test-results
5. Go to http://localhost:8127
6. Set the baseline target as "mac" and move current baselines to "mac-leopard"

For now,  rebaseline only tests that have text anti-aliasing differences or HTML color name differences. Have no more than 100 tests per patch. See comment 7 for details on how to use the tool UI.
Comment 12 Adam Barth 2010-10-27 18:32:46 PDT
Yay!  I got it to work.  Pretty.
Comment 13 James Robinson 2010-10-28 19:57:47 PDT
I updated the fast/table Snow Leopard expectations with this: http://trac.webkit.org/changeset/70835.  Worked beautifully!
Comment 14 Mihai Parparita 2010-10-29 13:47:00 PDT
Created attachment 72384 [details]
Patch
Comment 15 Mihai Parparita 2010-11-01 18:15:40 PDT
Created attachment 72614 [details]
Patch
Comment 16 Mihai Parparita 2010-11-02 17:52:15 PDT
Created attachment 72778 [details]
Patch
Comment 17 Mihai Parparita 2010-11-04 15:58:06 PDT
Created attachment 72996 [details]
Patch
Comment 18 Mihai Parparita 2010-11-04 15:59:11 PDT
Comment on attachment 72996 [details]
Patch

Oops, this ended up on the wrong bug.
Comment 19 Mihai Parparita 2010-12-06 15:14:50 PST
The tool is now checked in (thanks to Tony doing lots of reviews). I've also written up https://trac.webkit.org/wiki/RebaselineServer with instructions on how to use it. Feel free to file bugs and cc me on them if you notice any bugs or limitations.