Bug 45100 - dumpAsText / dumpAsMarkUp test conversion should be automated
Summary: dumpAsText / dumpAsMarkUp test conversion should be automated
Status: NEW
Alias: None
Product: WebKit
Classification: Unclassified
Component: Tools / Tests (show other bugs)
Version: 528+ (Nightly build)
Hardware: All All
: P2 Enhancement
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-09-02 03:33 PDT by Ryosuke Niwa
Modified: 2017-07-18 08:30 PDT (History)
7 users (show)

See Also:


Attachments
prototype (9.29 KB, text/plain)
2010-09-02 03:33 PDT, Ryosuke Niwa
no flags Details
prototype 2 (9.58 KB, application/octet-stream)
2011-05-17 15:17 PDT, Ryosuke Niwa
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Ryosuke Niwa 2010-09-02 03:33:16 PDT
Created attachment 66347 [details]
prototype

Most of the work needed to convert a test to dumpAsText or dumpAsMarkup tests are very mechanical.  We should write a script that automates this process so that we only need to verify the results.
Comment 1 Ryosuke Niwa 2010-09-02 03:40:40 PDT
I attached a prototype for this script.

Usage will be:
rebaseline-for-dumpas-conv <path to test>

The script first attempts to convert the test autonomously to either runDumpAsTextEditingTest or dump-as-markup test, and launch an editor for the verification.  When this fails, it prints out a message to ask user to manually convert the test, and launches an editor.

After that, the script will prompt the user whether or not he/she wants to rebaseline now.  If the user choses no, the script halts immediately.  If the user chooses to rebaseline, it'll automatically svn-delete all platform-specific results and run webkit tests to generate new result, then svn-add the new result.

If the user decides that new test result is wrong or test wasn't converted correctly, he/she can revert all operations done by this script by simply running:
rebaseline-for-dumpas-conv <path to test> --revert
Comment 2 Hajime Morrita 2010-10-13 22:34:20 PDT
Nice!  It would be  fine if this support git.
Comment 3 Adam Barth 2010-10-13 22:38:30 PDT
If you use scm.py, you'll get SVN+GIT functionality for free.
Comment 4 Ryosuke Niwa 2011-05-17 15:17:24 PDT
Created attachment 93829 [details]
prototype 2