Commit c089b569 authored by Raphael Kubo da Costa's avatar Raphael Kubo da Costa Committed by Commit Bot

web_platform_tests.md: Sync documentation with reality.

--allow-local-commits was removed in 4a301c5f ("Remove the
--allow-local-commits flag from wpt-import") so stop recommending its usage.

Additionally, given the amount of export commits we have in
web-platform-tests it is likely that unauthenticated runs will fail, so
explain how to use the --credentials-json option in both wpt-export and
wpt-import.

Bug: 816390
Change-Id: I72d7bc6dcb80d0db372e9dac1176f68d1b812bcb
Reviewed-on: https://chromium-review.googlesource.com/937241Reviewed-by: default avatarPhilip Jägenstedt <foolip@chromium.org>
Commit-Queue: Raphael Kubo da Costa <raphael.kubo.da.costa@intel.com>
Cr-Commit-Position: refs/heads/master@{#539116}
parent d16e74c3
......@@ -110,6 +110,20 @@ for Windows. To check what files are skipped in import, check the recent logs
for [wpt-importer
builder](https://build.chromium.org/p/chromium.infra.cron/builders/wpt-importer).
### GitHub credentials
When manually running the `wpt-import` and `wpt-export` scripts, several
requests are made to GitHub to query the status of pull requests, look for
existing exported commits etc. GitHub has a [fairly
low](https://developer.github.com/v3/#rate-limiting) request limit for
unauthenticated requests, so it is recommended that you let `wpt-export` and
`wpt-import` use your GitHub credentials when sending requests:
1. Generate a new [personal access token](https://github.com/settings/tokens)
1. Create a JSON file with two keys: `GH_USER`, your GitHub user name, and
`GH_TOKEN`, the access token you have just generated.
1. Pass `--credentials-json <path-to-json>` to `wpt-export` and `wpt-import`.
### Manual import
To pull the latest versions of the tests that are currently being imported, you
......@@ -120,6 +134,10 @@ That script will pull the latest version of the tests from our mirrors of the
upstream repositories. If any new versions of tests are found, they will be
committed locally to your local repository. You may then upload the changes.
Remember your import might fail due to GitHub's limit for unauthenticated
requests, so consider [passing your GitHub credentials](#GitHub-credentials) to
the script.
### Enabling import for a new directory
If you wish to add more tests (by un-skipping some of the directories currently
......@@ -127,7 +145,11 @@ skipped in `W3CImportExpectations`), you can modify that file locally and commit
it, and on the next auto-import, the new tests should be imported.
If you want to import immediately (in order to try the tests out locally, etc)
you can also run `wpt-import --allow-local-commits`, but this is not required.
you can also run `wpt-import`, but this is not required.
Remember your import might fail due to GitHub's limit for unauthenticated
requests, so consider [passing your GitHub credentials](#GitHub-credentials) to
the script.
## Writing tests
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment