compiletest: Deduplicate --check-prefix flags#134415
compiletest: Deduplicate --check-prefix flags#134415tgross35 wants to merge 1 commit intorust-lang:masterfrom
--check-prefix flags#134415Conversation
Currently having a revision named like `MSVC` causes errors because it gets passed via `--check-prefix` twice; once from the revision name and once from the default `msvc_or_not` value that compiletest sets. Fix this by deduplicating revision names before passing the arguments.
|
r? @onur-ozkan rustbot has assigned @onur-ozkan. Use |
|
Some changes occurred in src/tools/compiletest cc @jieyouxu |
|
I noticed this when working on #134290, having a revision named r? @jieyouxu |
|
... That seems slightly cursed, I'll have to do some digging and look at this tmrw. |
|
For reference the failure was here #134290 (comment). I never ran the whole suite locally but That PR includes this one's commit for now. |
|
EDIT: yes, I'm just blind, the if self.config.target.contains("msvc") { "MSVC" } else { "NONMSVC" };Which AFAIK is probably based on the host. I would probably say that we might not want to set these FileCheck prefixes automatically, even at the cost of a few more lines in the codegen tests, because this behavior is really not straightforward. |
|
FWIW these automatic FileCheck prefixes predate me; I was just the person who most recently tried to clean up the code for setting them. Getting rid of this implicit behaviour should be doable. I've looked into doing so in the past, but never got around to actually filing a PR. |
|
Yeah I realized that now, as I somehow completely missed the @tgross35 I think we should not paper over the underlying issue that |
|
Sounds reasonable, thanks for putting up a fix! I’ll try it later today. |
Currently having a revision named like
MSVCcauses errors because it gets passed via--check-prefixtwice; once from the revision name and once from the defaultmsvc_or_notvalue that compiletest sets. Fix this by deduplicating revision names before passing the arguments.