Reorganize Servo's WPT Python scripts

This change moves all of Servo's WPT Python support scripts into one
directory as they were previously scattered throughout the directory
structure. This should allow more code reuse and make it easier to
understand how everything fits together.

The changes:

- `tests/wpt/update` → `python/wpt/importer`
- `etc/ci/upstream-wpt-changes/wptupstreamer` → `python/wpt/exporter`
- `etc/ci/upstream-wpt-changes/test.py` → `python/wpt/test.py`
- `etc/ci/upstream-wpt-changes/tests` → `python/wpt/tests`
- `tests/wpt/servowpt.py` →
    - `python/wpt/update.py`
    - `python/wpt/run.py`
- `tests/wpt/manifestupdate.py` → `python/wpt/manifestupdate.py`

This change also removes
 - The ability to run the `update-wpt` and `test-wpt` commands without
   using `mach`. These didn't work very well, because it was difficult
   to get all of the wptrunner and mach dependencies installed outside
   of the Python virtualenv. It's simpler if they are always run through
   `mach`.
- The old WPT change upstreaming script that was no longer used.
This commit is contained in:
Martin Robinson 2023-04-16 11:33:02 +02:00
parent 9acb9cc5cf
commit e2cf3e8d1a
52 changed files with 237 additions and 888 deletions

View file

@ -32,9 +32,9 @@ jobs:
# See https://github.com/actions/checkout/issues/162.
token: ${{ secrets.WPT_SYNC_TOKEN }}
- name: Install requirements
run: pip install -r servo/etc/ci/upstream-wpt-changes/requirements.txt
run: pip install -r servo/python/wpt/requirements.txt
- name: Process pull request
run: servo/etc/ci/upstream-wpt-changes/upstream-wpt-changes.py
run: servo/python/wpt/upstream.py
env:
GITHUB_CONTEXT: ${{ toJson(github) }}
WPT_SYNC_TOKEN: ${{ secrets.WPT_SYNC_TOKEN }}
WPT_SYNC_TOKEN: ${{ secrets.WPT_SYNC_TOKEN }}

View file

@ -2,7 +2,7 @@ name: WPT exporter test
on:
pull_request:
branches: ["**"]
paths: ["etc/ci/upstream-wpt-changes/**"]
paths: ["python/wpt/exporter/**"]
jobs:
test:
@ -12,7 +12,7 @@ jobs:
- uses: actions/checkout@v3
- name: Install dependencies
run: |
python3 -m pip install --upgrade -r etc/ci/upstream-wpt-changes/requirements-dev.txt
python3 -m pip install --upgrade -r python/wpt/requirements-dev.txt
- name: Running tests
run: |
python3 etc/ci/upstream-wpt-changes/test.py
python3 python/wpt/test.py