Skip to content

compiletest does not support taking the disjunction/union of multiple "only" directives #137144

Open
@RalfJung

Description

@RalfJung

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)

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-compiletestArea: The compiletest test runnerC-enhancementCategory: An issue proposing an enhancement or a PR with one.E-hardCall for participation: Hard difficulty. Experience needed to fix: A lot.T-bootstrapRelevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap)T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions