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

Incorrect folder name is printed for each test #76

Closed
RalfJung opened this issue Sep 16, 2017 · 14 comments · Fixed by #77
Closed

Incorrect folder name is printed for each test #76

RalfJung opened this issue Sep 16, 2017 · 14 comments · Fixed by #77

Comments

@RalfJung
Copy link
Contributor

In miri, we have a folder compile-fail-fullmir for compile-fail tests that need a different setup than those in compile-fail. This reveals that compiletest prints the wrong path to the file that it is testing:

## Running compile-fail tests in tests/compile-fail-fullmir against miri for target x86_64-unknown-linux-gnu

running 1 test
test [compile-fail] compile-fail/undefined_byte_read.rs ... ok

This says the file name is compile-fail/undefined_byte_read.rs while it really is compile-fail-fullmir/undefined_byte_read.rs. compiletest seems to use the suite name when printing the folder name, which is not in general correct.

I tried to fix this myself, but unfortunately I could not even find the place in the code that does this printing...

@RalfJung
Copy link
Contributor Author

Ah, I think I found it -- in make_test_name.

@laumann
Copy link
Collaborator

laumann commented Sep 16, 2017

That does seem to be a bug... The assumption is that the config.mode is also the name of the directory. Is compile-fail-fullmir available in Config somewhere?

@laumann
Copy link
Collaborator

laumann commented Sep 16, 2017

Would it be src_base?

@RalfJung
Copy link
Contributor Author

@laumann Yes it is in src_base. I am working on a PR for rustc.

@laumann
Copy link
Collaborator

laumann commented Sep 16, 2017

Nice :-) Just submit a PR here as well, or ping me when it's in, then I'll replicate it here and release a new version

@laumann
Copy link
Collaborator

laumann commented Sep 16, 2017

Looking at miri, you might want to update to compiletest 0.3.0 - it might cause some breakage though as the update changed the type of some fields in Config

@RalfJung
Copy link
Contributor Author

Well I guess I'll see and fix that breakage as I update to the version that fixes this. ;)

@laumann
Copy link
Collaborator

laumann commented Sep 16, 2017

Yeah ok :-) I was just thinking that 0.3.0 is much closer to the current rustc/compiletest, the 0.2 series was getting behind a bit.

TimNN added a commit to TimNN/rust that referenced this issue Sep 17, 2017
…crum

compiletest: print the correct basename of the src dir

See <Manishearth/compiletest-rs#76>.

Fixes rust-lang#40712
TimNN added a commit to TimNN/rust that referenced this issue Sep 17, 2017
…crum

compiletest: print the correct basename of the src dir

See <Manishearth/compiletest-rs#76>.

Fixes rust-lang#40712
TimNN added a commit to TimNN/rust that referenced this issue Sep 17, 2017
…crum

compiletest: print the correct basename of the src dir

See <Manishearth/compiletest-rs#76>.

Fixes rust-lang#40712
@RalfJung
Copy link
Contributor Author

The upstream rustc PR has been merged.

@laumann
Copy link
Collaborator

laumann commented Sep 17, 2017

Nice!

laumann pushed a commit that referenced this issue Sep 17, 2017
laumann pushed a commit that referenced this issue Sep 17, 2017
@RalfJung
Copy link
Contributor Author

Any chance of a release with this fix? :D

@laumann
Copy link
Collaborator

laumann commented Sep 19, 2017

Yeah, sure thing :-)

@laumann
Copy link
Collaborator

laumann commented Sep 19, 2017

0.3.1 is out

@RalfJung
Copy link
Contributor Author

Thanks, that was fast. :-)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants