compiletest does not support taking the disjunction/union of multiple "only" directives
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 119k
- Forks
- 16.1k
- PR merge metrics
- PR metrics pending
Description
Say I want to run a particular test (or a particular revision) on all x86 targets -- 32bit and 64bit. Currently, there's no good way to do that: only-x86 and only-x86_64 select one of these cases, respectively, but I can't say "either one". If I use multiple only annotations, that takes the intersection, i.e. they all have to apply -- which makes sense as semantics, but is not helpful here. So instead what I usually do is have a separate 32bit and 64bit revision, and make them identical, but that can have significant overhead -- in particular for FileCheck tests where one cannot say "this annotation is active in the following two revisions".
I think the biggest problem here is coming up with a good syntax.^^ Ideally, we'd have a concept of an "only annotation", so e.g. instead of only-x86 we'd use something like only: x86 . Then it would be easy to say that only: a b c means that at least one of the conditions a, b, c must be satisfied.
Cc @jieyouxu
(not sure whom else to ping for compiletest things)
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by locating compiletest's handling of the existing only-x86 and only-x86_64 directives. Review how multiple only annotations are parsed and combined, then define and implement syntax for disjunctive conditions. Done means one test or revision can target either 32-bit or 64-bit x86 without duplicating revisions, with coverage for the new behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- compilers, testing-qa
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 30/100