compiletest: avoid invoking rustc with absolute paths.
#330
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).