Fix running servoshell and unit tests through a symlink#30537
Merged
delan merged 5 commits intoservo:masterfrom Oct 18, 2023
Merged
Fix running servoshell and unit tests through a symlink#30537delan merged 5 commits intoservo:masterfrom
delan merged 5 commits intoservo:masterfrom
Conversation
mrobinson
approved these changes
Oct 11, 2023
Member
mrobinson
left a comment
There was a problem hiding this comment.
Looks good with one small suggestion before landing.
3 tasks
Member
Author
|
I had to rework the logic to fix breakages in unit tests and the macOS package smoketest, but as a result the changes are now less invasive and we no longer change the behaviour of nightly releases. #30509 will simplify this even further by baking in the resources for unit tests, it’s just we can’t do that in this patch. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Servo relies on several external files in /resources/, and the loading of these resources is delegated to the embedder. In this repo, libsimpleservo compiles them in with include_bytes!(), while the other three (servoshell, gstplugin, and unit tests) try to read them from the filesystem at runtime.
Our current logic for searching for the resources directory tries to accommodate both local dev in this repo (../../resources relative to servo, or a further ancestor in the case of unit tests) and nightly builds (resources relative to servo, or Resources relative to a further ancestor in the case of macOS):
But this fails if target is symlinked to another filesystem, like I recently did to exclude it from my backups:
This patch adds (or replaces those with, for unit tests) a few steps as follows:
The new logic:
./mach build -ddoes not report any errors./mach test-tidydoes not report any errors