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

compiletest: revision-dependent compile-flags are space-sensitive #69183

Closed
RalfJung opened this issue Feb 15, 2020 · 0 comments · Fixed by #69205
Closed

compiletest: revision-dependent compile-flags are space-sensitive #69183

RalfJung opened this issue Feb 15, 2020 · 0 comments · Fixed by #69205
Labels
A-testsuite Area: The testsuite used to check the correctness of rustc C-bug Category: This is a bug.

Comments

@RalfJung
Copy link
Member

I saw some tests use syntax like [rev_name]compile-flags: ... to compile the same code with different flags for better coverage, so I wanted to use that as well. But some double-checking showed that the flags did not actually seem to have any effect. And indeed, the following test passes, when really it should fail because one revision has bad flags:

// revisions: a b
// [a]compile-flags: -D not_a_lint

// build-pass

fn main() {}

It took me a bit to realize that I made the mistake of writing // [a]compile-flags: instead of //[a]compile-flags:. This is quite surprising because compiletest flag parsing is not very space-sensitive elsewhere (e.g., //compile-flags and // compile-flags both work).

@jonas-schievink jonas-schievink added A-testsuite Area: The testsuite used to check the correctness of rustc C-bug Category: This is a bug. labels Feb 15, 2020
JohnTitor added a commit to JohnTitor/rust that referenced this issue Feb 16, 2020
…-Simulacrum

Allow whitespaces in revision flags

Allow whitespaces in revision flags, like `// [foo]`.

Fixes rust-lang#69183
@bors bors closed this as completed in bea18c7 Feb 18, 2020
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-bug Category: This is a bug.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants