servo/python/wpt
Mukilan Thiyagarajan c6d7c5785a
mach: fix logic to override paths for legacy layout (#34467)
wptrunner internally derives the path to the MANIFEST.json file from the
`metadata_path` passed via `test_paths`. The current logic overrides
only the `metadata_path`, leaving the manifest_path pointing at the
wrong (non-legacy) layout's MANIFEST.json.

In #34436 we observed that the recent WPT imports create a transient
`.cache` diretory that wptrunner logic uses for optimization. This has
not been observed until #34436 because a [recent bump in MANIFEST.json's
schema version][1] triggered the creation of the cache. Because of the
above issue with incorrect path and the fact that we *first* trigger
`mach update-wpt` for legacy layout during WPT import, the MANIFEST.json
of non-legacy layout gets incorrectly migrated during the invocation of
`update-wpt` for legacy layout but the cache is still created under
legacy-layout's path as it is not based on `manifest_path`. The
subsequent invocation of `mach update-wpt` for non-legacy finds the
MANIFEST.json already migrated so the `.cache` directory is not
constucted.

This change simply replaces the whole object using the wptrunner's
`TestRoot` class constructor so that all derived paths are calculated
correctly. We also add the `.cache` folders to gitignore as it seems
like they are expected to be created during such version migrations.

[1]: https://github.com/web-platform-tests/wpt/pull/49406

Signed-off-by: Mukilan Thiyagarajan <mukilan@igalia.com>
2024-12-04 12:38:58 +00:00
..
exporter ci: Fix the WPT export job after the repository change (#33228) 2024-08-29 09:26:04 +00:00
tests Rename the master branch to main 2023-12-04 10:11:56 +01:00
__init__.py mach: fix logic to override paths for legacy layout (#34467) 2024-12-04 12:38:58 +00:00
export.py ci: Use Servo's wpt repository for WPT export (#33224) 2024-08-28 11:29:51 +00:00
grouping_formatter.py Add fallback value for data['message'] (#33185) 2024-08-25 21:54:51 +00:00
manifestupdate.py tidy: A few small improvements and fixes (#30941) 2024-01-02 06:14:51 +00:00
run.py CI: use new intermittent-tracker deployment (#34068) 2024-11-04 10:42:26 +00:00
test.py ci: Fix the WPT export job after the repository change (#33228) 2024-08-29 09:26:04 +00:00
update.py ci: Use a servo.org email address for the servo-wpt-sync GitHub bot (#32515) 2024-06-18 16:38:26 +00:00