CI: disable mac-wpt job in main workflow
In theory, the new mac-wpt jobs added in #29201 are harmless since they aren’t required for the main workflow to succeed, but in practice, the runners are so slow to assign and run that they break the build.
---
<!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `___` with appropriate data: -->
- [ ] `./mach build -d` does not report any errors
- [ ] `./mach test-tidy` does not report any errors
- [ ] These changes fix #___ (GitHub issue number if applicable)
<!-- Either: -->
- [ ] There are tests for these changes OR
- [x] These changes do not require tests because they affect the CI configuration
Simplify Python code for running WPT tests
Combine `run.py` and `update.py` into `servowpt.py` in order to allow them to share code. Import them directly into the mach script to avoid having to call `compile` and `exec` on the code. This makes it clearer how they are executed. In addition, move all of the setup into `setupwpt.py` to avoid differences between tests executed via mach and not. Finally, be more ambitious when detecting the build to use. If none was specified, try to use the one that exists between "release" and "debug."
<!-- Please describe your changes on the following line: -->
---
<!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `___` with appropriate data: -->
- [x] `./mach build -d` does not report any errors
- [x] `./mach test-tidy` does not report any errors
- [x] These changes do not require tests because they only change a small script behavior.
<!-- Also, please make sure that "Allow edits from maintainers" checkbox is checked, so that we can help you if you get stuck somewhere along the way.-->
<!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. -->
For me this allows the WPT test
performance-timeline/tentative/include-frames-one-remote-child.sub.html
to match expected results. The wptserver is sending a 404 JSON response
because the URL that the test requests is not found.
Combine `run.py` and `update.py` into `servowpt.py` in order to allow
them to share code. Import them directly into the mach script to avoid
having to call `compile` and `exec` on the code. This makes it clearer
how they are executed. In addition, move all of the setup into
`setupwpt.py` to avoid differences between tests executed via mach and
not. Finally, be more ambitious when detecting the build to use. If none
was specified, try to use the one that exists between "release" and
"debug."
Raise an exception when dependencies fail to install. Also split the run
phase of the Linux bootstrap so that either of these failing commands
will cause the job to fail.
When turning DOM exceptions into `ErrorInfo` always try to stringify
the JavaScript value, even if it's an object that isn't a `DOMException`
or native exception. This means that exceptions that extend the `Error`
prototype are now stringified. The result is that test output for WPT
global assertion failures is more useful. For instance for the test
include-frames-from-child-same-origin-grandchild.sub.html:
Before:
```
uncaught exception: unknown (can't convert to string)
```
After:
```
uncaught exception: Error: assert_equals: expected 4 but got 3
```
CI: run WPT tests on macOS
This patch uncomments and fixes the mac-wpt job in the main workflow, with a few changes:
* we downgrade python3 and pip3 to 3.9, because inspect.getargspec was [removed in 3.11](https://docs.python.org/3/whatsnew/3.11.html#removed)
* we should apparently move to [inspect.getfullargspec](https://docs.python.org/3/library/inspect.html#inspect.getfullargspec)
* we download the real Servo artifact, rather than the fake Servo for testing
We also align the rest of the job (other than `--timeout-multiplier`) to be as close as possible to linux-wpt, based on the assumption that linux-wpt is more up to date. This includes:
* setting strategy.fail-fast to false
* adding a failure() condition to the “Archive logs” step
* adding the chunk id to log filenames
There are some failing WPT tests, so for now the job is not required to succeed.
Example run: <https://github.com/delan/servo/actions/runs/3837530905>
---
- [ ] ~~`./mach build -d` does not report any errors~~
- [ ] ~~`./mach test-tidy` does not report any errors~~
- [x] These changes fix#28284 (GitHub issue number if applicable)
<!-- Either: -->
- [ ] There are tests for these changes OR
- [x] These changes do not require tests because they affect the CI configuration
wpt: update README instructions about running tests manually
I wanted to run a single test many times in parallel to smoke out some timeouts, but this was surprisingly tricky. This involved running multiple instances of `mach test-wpt`, which in turn involved convincing wptrunner not to start a WPT server for each instance, which is not currently exposed as an option. I also eventually realised I needed to install a custom testharnessreport.js, but the instructions were very outdated, so most of the paths and commands etc had changed.
This patch adds a section about running `mach test-wpt` with an external WPT server, and updates the section about running tests manually.
---
<!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `___` with appropriate data: -->
- [ ] ~~`./mach build -d` does not report any errors~~
- [ ] ~~`./mach test-tidy` does not report any errors~~
- [ ] These changes fix #___ (GitHub issue number if applicable)
<!-- Either: -->
- [ ] There are tests for these changes OR
- [x] These changes do not require tests because they affect the wpt readme only
Fix intermittency when loading poster images
Wait until a poster image is cached to in order to unblock document load. If not, the document may continue loading before the image is ready to use, leading to intermittency in test output. Now load is unblocked when getting the ImageResponse from the cache, which allows the code to properly unblock the load when the entire load fails or succeeds.
This reveals several false passes in the `object-view-box` test suite which were very flaky.
<!-- Please describe your changes on the following line: -->
---
<!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `___` with appropriate data: -->
- [x] `./mach build -d` does not report any errors
- [x] `./mach test-tidy` does not report any errors
- [x] These changes fix#29204.
- [x] These changes fix#29188.
- [x] These changes fix#29179.
<!-- Either: -->
- [x] There are tests for these changes
<!-- Also, please make sure that "Allow edits from maintainers" checkbox is checked, so that we can help you if you get stuck somewhere along the way.-->
<!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. -->
Fix some build warnings
- Mark some instances of unused fields and variables as as allowed, when they are used for memory management.
- Remove the use of some deprecated function.s
Signed-off-by: Martin Robinson <mrobinson@igalia.com>
<!-- Please describe your changes on the following line: -->
---
<!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `___` with appropriate data: -->
- [x] `./mach build -d` does not report any errors
- [x] `./mach test-tidy` does not report any errors
- [x] These changes do not require tests because they do not change behavior.
<!-- Also, please make sure that "Allow edits from maintainers" checkbox is checked, so that we can help you if you get stuck somewhere along the way.-->
<!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. -->
- Mark some instances of unused fields and variables as as allowed,
when they are used for memory management.
- Remove the use of some deprecated function.s
Signed-off-by: Martin Robinson <mrobinson@igalia.com>
Wait until a poster image is cached to in order to unblock document load. If
not, the document may continue loading before the image is ready to use,
leading to intermittency in test output. Now load is unblocked when
getting the ImageResponse from the cache, which allows the code to
properly unblock the load when the entire load fails or succeeds.
This reveals several false passes in the `object-view-box` test suite
which were very flaky.
Fixes#29204.
Fixes#29188.
Fixes#29179.
Signed-off-by: Martin Robinson <mrobinson@igalia.com>
mach filter-intermittents: add progress and --json output mode
filter-intermittents takes a while, because it needs to look up each failure against the tracker api (or GitHub api), so it would be nice to know how long we’ll need to wait when running it interactively. The output is also pretty-printed in a format that’s not the easiest to analyse.
This patch adds some progress output (on stderr, one line with \\r), plus a --json output format as follows:
[{"test": "/path/to/foo", "output": "..."}, {"test": "/path/to/bar", "output": "..."}, ...]
---
<!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `___` with appropriate data: -->
- [ ] ~~`./mach build -d` does not report any errors~~
- [ ] ~~`./mach test-tidy` does not report any errors~~
- [ ] These changes fix #___ (GitHub issue number if applicable)
<!-- Either: -->
- [ ] There are tests for these changes OR
- [x] These changes do not require tests because they affect mach filter-intermittents only
CI: remove branch check steps that don’t actually do anything
f165e17ce2 (#28778) adds a step to each job of the main build that ostensibly bails out of the job, if the context branch is not `auto` or one of the `try` branches relevant for that platform. But a step that runs `exit 0` doesn’t really have any effect.
Since the main workflow already has `branches` limited to `auto` and the `try` branches, we can safely remove those steps without worrying about the main build running on dependabot branches etc. For example:
* [dependabot/cargo/nom-7.1.2](https://github.com/servo/servo/actions?query=branch%3Adependabot%2Fcargo%2Fnom-7.1.2) only has a run for the pull request workflow
* [this test build](https://github.com/delan/servo/actions/runs/3830596812/jobs/6518672884) shows that even if the branch check fails, the build continues
---
- [ ] ~~`./mach build -d` does not report any errors~~
- [ ] ~~`./mach test-tidy` does not report any errors~~
- [ ] ~~These changes fix #___ (GitHub issue number if applicable)~~
<!-- Either: -->
- [ ] There are tests for these changes OR
- [x] These changes do not require tests because they affect the CI configuration
Bump try-lock from 0.2.2 to 0.2.4
Bumps [try-lock](https://github.com/seanmonstar/try-lock) from 0.2.2 to 0.2.4.
<details>
<summary>Commits</summary>
<ul>
<li><a href="3ec20adaf7"><code>3ec20ad</code></a> v0.2.4</li>
<li><a href="531bfce134"><code>531bfce</code></a> Remove Send and Sync autotraits from the lock guard (<a href="https://github-redirect.dependabot.com/seanmonstar/try-lock/issues/8">#8</a>)</li>
<li><a href="643b0eceb7"><code>643b0ec</code></a> v0.2.3</li>
<li><a href="a0fb2a10b2"><code>a0fb2a1</code></a> Add GitHub Actions for CI (<a href="https://github-redirect.dependabot.com/seanmonstar/try-lock/issues/5">#5</a>)</li>
<li><a href="f9b9abf6f1"><code>f9b9abf</code></a> deprecate <code>try_lock_order</code>, introduce <code>try_lock_explicit[_unchecked]</code> (<a href="https://github-redirect.dependabot.com/seanmonstar/try-lock/issues/3">#3</a>)</li>
<li><a href="9f3ba4e37b"><code>9f3ba4e</code></a> make the crate no-std (<a href="https://github-redirect.dependabot.com/seanmonstar/try-lock/issues/4">#4</a>)</li>
<li>See full diff in <a href="https://github.com/seanmonstar/try-lock/compare/v0.2.2...v0.2.4">compare view</a></li>
</ul>
</details>
<br />
[](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)
Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`.
[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)
---
<details>
<summary>Dependabot commands and options</summary>
<br />
You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
- `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
</details>
Cancel main build if successful build already exists for commit
Homu pushes both the old and new commits for each merge, causing the main build to run twice for each commit.
This patch adds a “decision job” to the main build, which cancels the run if a successful main build already exists for the commit. The jobs that build Servo on each of the five platforms in turn block until that new job finishes.
---
- [ ] ~~`./mach build -d` does not report any errors~~
- [ ] ~~`./mach test-tidy` does not report any errors~~
- [x] These changes fix#28326
<!-- Either: -->
- [ ] There are tests for these changes OR
- [x] These changes do not require tests because they affect the CI configuration
Update truetype
- [x] `./mach build -d` does not report any errors
- [x] `./mach test-tidy` does not report any errors
- [x] There are tests for these changes