Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Test headers should have "only-<platform>", like "ignore-<platform>" #33581

Closed
ruscur opened this issue May 12, 2016 · 1 comment · Fixed by #47487
Closed

Test headers should have "only-<platform>", like "ignore-<platform>" #33581

ruscur opened this issue May 12, 2016 · 1 comment · Fixed by #47487
Labels
A-testsuite Area: The testsuite used to check the correctness of rustc C-enhancement Category: An issue proposing an enhancement or a PR with one.

Comments

@ruscur
Copy link

ruscur commented May 12, 2016

The test system as it stands is very unsuitable for multiple architectures. For example, anything with an asm macro that is expected to error cannot be adapted to support other architectures, since you could have different asm macros for each target_arch, but the test system checks for an error in each implementation.

The only way to work around this is to make a separate test file and ignore irrelevant architectures, however if any arch-specific test would have to ignore literally everything else, which is not only ugly but also will cause failures for any new architectures in the future.

This is especially obvious in tests like compile-fail/asm-in-bad-modifier.rs, where any unsupported architecture will fail the test since it compiles successfully.

I think a fundamental rework of the test directives (i.e. //~ ERROR) would have to be a significant undertaking, but adding a //only-x86_64 (only probably isn't the best keyword, since you might want //only-x86_64 //only-x86) would make things a lot easier. An x86-only test has "//ignore-android", but that will still cause failures on non-Android ARM platforms, right? The current system is very fragile and needs some change.

@sanxiyn sanxiyn added the A-testsuite Area: The testsuite used to check the correctness of rustc label May 13, 2016
@Mark-Simulacrum Mark-Simulacrum added the C-enhancement Category: An issue proposing an enhancement or a PR with one. label Jul 25, 2017
@Pulkit07
Copy link
Contributor

I came here from #47459. I am going to try fix this.

Pulkit07 added a commit to Pulkit07/rust that referenced this issue Jan 16, 2018
This patch implements "only-<platforms>" for tests headers using which one can
specify just the platforms on which the test should run rather than listing all
the platforms to ignore using "ignore-<platforms>".

This is a fix for issues rust-lang#33581 and rust-lang#47459.
kennytm added a commit to kennytm/rust that referenced this issue Jan 17, 2018
implement "only-<platforms>" for test headers

This patch implements "only-<platforms>" for tests headers using which one can
specify just the platforms on which the test should run rather than listing all
the platforms to ignore using "ignore-<platforms>".

This fixes rust-lang#33581 and fixes rust-lang#47459.
kennytm added a commit to kennytm/rust that referenced this issue Jan 17, 2018
implement "only-<platforms>" for test headers

This patch implements "only-<platforms>" for tests headers using which one can
specify just the platforms on which the test should run rather than listing all
the platforms to ignore using "ignore-<platforms>".

This fixes rust-lang#33581 and fixes rust-lang#47459.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-testsuite Area: The testsuite used to check the correctness of rustc C-enhancement Category: An issue proposing an enhancement or a PR with one.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants