compiletest: avoid invoking rustc with absolute paths.#330
Merged
eddyb merged 1 commit intoRust-GPU:mainfrom Jul 11, 2025
Merged
compiletest: avoid invoking rustc with absolute paths.#330eddyb merged 1 commit intoRust-GPU:mainfrom
rustc with absolute paths.#330eddyb merged 1 commit intoRust-GPU:mainfrom
Conversation
15b9980 to
76fa146
Compare
69e9b65 to
8133ac2
Compare
Firestar99
approved these changes
Jul 11, 2025
Member
Firestar99
left a comment
There was a problem hiding this comment.
Works!
Eventually we should maybe have a default set of normalize-stderr-test that just applies to all tests, instead of pasting them everywhere.
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.
This PR makes the
compiletestsrunner change its current working dir totests/compiletests/, allowing the source paths, that thecompiletestcrate invokesrustcwith, to always be relative e.g.ui/foo/bar.rs.Among other things, this should help with @Firestar99 not being able to get the
ui/spirv-attr/invalid-target.rstest to pass, because the JSON output is slightly too long and gets abbreviated with a big<<<<<< SKIPPED 1026 BYTES >>>>>>in the middle, due to harcoded limits in thecompiletestcrate itself.This also cleans up the
$OPSTRING_FILENAMEhack used by disassembly tests, but I'm worried that will break on Windows again, so I'm opening this as a draft to see what that situation is like.(I do think that the main reason for that hack was that the replacement of the test base path w/
$DIRwouldn't kick in on Windows, but that's a much bigger issue for absolute paths, than for relative ones, so it might be easier to work around it now)EDIT: the situation is predictable enough that I added a
"ui/dis/" -> "$DIR"normalization rule to the impacted tests (by that point,compiletesthad already replaced all\\with/, so even if its own$DIRreplacement failed, it should at least predictably result in paths likeui/dis/even on Windows).