[webkit-dev] js-only-tests migration from "resources" to "script-tests"
hamaji at chromium.org
Wed Sep 16 18:17:12 PDT 2009
Hi WebKit folks,
With great helps from Eric and Darin, I'm working on moving js only
layout tests from "resources" to "script-tests" directories. If there
are no objections, I'll submit this patch after 24 hours.
tests something with our js test framework (js-test-pre.js,
js-test-post.js, ...). For such tests, we have a tool to generate
HTMLs from resources/TEMPLATE.html. This tool is
WebKitTools/Scripts/make-script-test-wrappers. It generates HTMLs from
resources/TEMPLATE.html for each resources/*.js. You can write the
list of exceptions in make-script-wrappers script to tell the tool not
to re-generate your HTML. Otherwise, your modified HTMLs will be
overwritten by the next run of make-script-wrappers. So, if you have
layout test HTMLs which are modified from TEMPLATE.html, you should
always add the name of your script into the exception list in
Unfortunately, sometimes people forget the existence of this tool and
people like me a month ago may not notice this tool at all. Though we
should see no change by running make-script-wrappers using unchanged
ToT, it actually changes some HTMLs. Also, even for people who know
this mechanism well, it's annoying to add the exception list. Eric
suggested to move such js-only-tests from "resources" directory to
another directory so make-script-wrappers knows which files should be
generated without the exception list. We don't need to modify
make-script-wrappers script when you add layout tests which have a
custom HTML after this change.
What will change:
All js only tests will go to "script-tests" sub-directories by the
next commit which will be dome after 24 hours. The
make-script-wrappers and run-webkit-tests script have been already
changed and they care about both "resources" and "script-tests" for
now. They were tested with LayoutTests/animations directory and it
seems to be working. Also, the next patch is passing run-webkit-tests.
>From now, please put your js-only-tests into "script-tests"
sub-directory instead of "resources" directory. After the migration
patch is submitted, I'll remove support for "resources" directory from
The current plan of the next steps is
1. Submit the migration ("resources" => "script-tests") patch.
2. Fix all layout tests which are modified from ToT by
make-script-wrappers script. Some of them will go to script-tests and
be re-generated. For others, I'll add them into make-script-wrappers'
3. Remove support of "resources" directory from make-script-wrappers
so that we don't have the exception list anymore!
If there are something unclear, please feel to free to ask. I hope you
like this change and start to put your js-only-tests in "script-tests"
P.S. Eric and Darin, if there are something I should have noticed,
please add some comments on this email. Otherwise, I was lucky :)
More information about the webkit-dev