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

relax rustdoc tests #4451

Merged
merged 1 commit into from
Aug 30, 2017
Merged

Conversation

steveklabnik
Copy link
Member

This was asserting on the output directly, rather than just what it contains.

In rust-lang/rust#44138 we are adding deprecations, and so it
breaks these tests.

@rust-highfive
Copy link

r? @alexcrichton

(rust_highfive has picked a reviewer for you, use r? to override)

tests/rustdoc.rs Outdated
.with_stderr_contains("[RUNNING] `rustdoc --crate-name foo src[/]lib.rs")
.with_stderr_contains(&format!("-o {}[/]target[/]doc", p.root()))
.with_stderr_contains(&format("-L dependency={dir}[/]target[/]debug[/]deps`", p.root()))
.with_stderr_contains("[FINISHED] dev [unoptimized + debuginfo] target(s) in [..]"))
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this test case doesn't need to change, right?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yeah, I just changed them all for consistency. I can un-do that if you'd prefer.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah I'd personally prefer to keep the exhaustive output checks, and if we use --cfg, a non-deprecated flag, I think that'll be ok?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's see what bors says :)

tests/rustdoc.rs Outdated
.with_stderr_contains(&format!("-o {}[/]target[/]doc", p.root().display()))
.with_stderr_contains("--no-defaults")
.with_stderr_contains(&format!("-L dependency={}[/]target[/]debug[/]deps`", p.root().display()))
.with_stderr_contains("[FINISHED] dev [unoptimized + debuginfo] target(s) in [..]"));
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could this instead just change to testing something like passing the --cfg flag? (along with tests below)

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sure

@steveklabnik
Copy link
Member Author

I am having trouble getting some tests to run locally at the moment, so I'd like to see this pass, try rust-lang/rust#44138 with it, and then only r+ it after both things have run to ensure that this does actually fix the upstream issue.

@alexcrichton
Copy link
Member

Hm what's the output of cargo test --test rustdoc?

I think these'll need to change the test assertions as well which look to still be using --no-defaults instead of --cfg foo

@steveklabnik
Copy link
Member Author

Ah it's not that, it's the stdlib tests.

And yeah, you're right, my bad. Ugh.

In rust-lang/rust#44138 we are adding deprecations, and so it
breaks these tests.
@alexcrichton
Copy link
Member

@bors: r+

@bors
Copy link
Contributor

bors commented Aug 30, 2017

📌 Commit b1e8298 has been approved by alexcrichton

@bors
Copy link
Contributor

bors commented Aug 30, 2017

⌛ Testing commit b1e8298 with merge 62f800f...

bors added a commit that referenced this pull request Aug 30, 2017
relax rustdoc tests

This was asserting on the output directly, rather than just what it contains.

In rust-lang/rust#44138 we are adding deprecations, and so it
breaks these tests.
@bors
Copy link
Contributor

bors commented Aug 30, 2017

☀️ Test successful - status-appveyor, status-travis
Approved by: alexcrichton
Pushing 62f800f to master...

@bors bors merged commit b1e8298 into rust-lang:master Aug 30, 2017
@steveklabnik steveklabnik deleted the relax-rustdoc-tests branch August 30, 2017 18:31
steveklabnik added a commit to steveklabnik/rust that referenced this pull request Oct 17, 2017
@ehuss ehuss added this to the 1.22.0 milestone Feb 6, 2022
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 this pull request may close these issues.

5 participants