Skip to content

Rustdoc unit tests not being run by Rustbuild #44237

New issue

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

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

Already on GitHub? # to your account

Closed
nrc opened this issue Sep 1, 2017 · 7 comments · Fixed by #44259 or #49090
Closed

Rustdoc unit tests not being run by Rustbuild #44237

nrc opened this issue Sep 1, 2017 · 7 comments · Fixed by #44259 or #49090
Assignees
Labels
A-docs Area: Documentation for any part of the project, including the compiler, standard library, and tools C-bug Category: This is a bug. T-dev-tools Relevant to the dev-tools subteam, which will review and decide on the PR/issue. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue.

Comments

@nrc
Copy link
Member

nrc commented Sep 1, 2017

As far as we could tell.

Currently, running cargo test in src/librustdoc seems to work, but there are some failures:

   Doc-tests rustdoc

running 3 tests
test clean/simplify.rs - clean::simplify (line 24) ... FAILED
test clean/simplify.rs - clean::simplify (line 20) ... FAILED
test html/markdown.rs - html::markdown (line 18) ... FAILED

failures:

---- clean/simplify.rs - clean::simplify (line 24) stdout ----
	error: expected expression, found keyword `where`
 --> clean/simplify.rs:2:1
  |
2 | where T: Trait, <T as Trait>::Foo = Bar
  | ^^^^^

thread 'rustc' panicked at 'couldn't compile the test', /checkout/src/librustdoc/test.rs:280:12

---- clean/simplify.rs - clean::simplify (line 20) stdout ----
	error: expected expression, found keyword `where`
 --> clean/simplify.rs:2:1
  |
2 | where T: Trait<Foo=Bar>
  | ^^^^^

thread 'rustc' panicked at 'couldn't compile the test', /checkout/src/librustdoc/test.rs:280:12
note: Run with `RUST_BACKTRACE=1` for a backtrace.

---- html/markdown.rs - html::markdown (line 18) stdout ----
	error[E0061]: this function takes 2 parameters but 1 parameter was supplied
 --> html/markdown.rs:6:35
  |
6 | let html = format!("{}", Markdown(s));
  |                                   ^ expected 2 parameters

thread 'rustc' panicked at 'couldn't compile the test', /checkout/src/librustdoc/test.rs:280:12


failures:
    clean/simplify.rs - clean::simplify (line 20)
    clean/simplify.rs - clean::simplify (line 24)
    html/markdown.rs - html::markdown (line 18)

test result: FAILED. 0 passed; 3 failed; 0 ignored; 0 measured; 0 filtered out
@nrc nrc added A-build T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue. T-dev-tools Relevant to the dev-tools subteam, which will review and decide on the PR/issue. A-docs Area: Documentation for any part of the project, including the compiler, standard library, and tools labels Sep 1, 2017
@Mark-Simulacrum
Copy link
Member

Seems like more of an infrastructure team problem. Assigning myself, will hopefully have time before Monday.

@Mark-Simulacrum Mark-Simulacrum self-assigned this Sep 1, 2017
@shepmaster shepmaster added the C-bug Category: This is a bug. label Sep 1, 2017
Mark-Simulacrum added a commit to Mark-Simulacrum/rust that referenced this issue Sep 2, 2017
This includes rust-lang/cargo#4447 which fixes
a bug in Cargo that is needed to fix
rust-lang#44237.
bors added a commit that referenced this issue Sep 2, 2017
Update cargo

This includes rust-lang/cargo#4447 which fixes a bug in Cargo that is needed to fix #44237.

r? @alexcrichton
@Mark-Simulacrum
Copy link
Member

Not yet fixed, just a preliminary patch....

@frewsxcv
Copy link
Member

frewsxcv commented Sep 9, 2017

This will be fixed by #44274 ?

@Mark-Simulacrum
Copy link
Member

It should be, yes.

@frewsxcv
Copy link
Member

Presumably fixed by #44274.

@QuietMisdreavus
Copy link
Member

QuietMisdreavus commented Mar 16, 2018

At some point, this regressed and src/librustdoc is no longer tested by bootstrap. x.py test -h -v no longer lists src/librustdoc, and the only mention of rustdoc in a recent Travis log is when it's running the tests in src/tools/rustdoc for compiletest.

@QuietMisdreavus
Copy link
Member

Turns out that a refactor in #48105 caused the new CrateRustdoc test spec to get hidden. I've opened #49090 to re-enable it.

bors added a commit that referenced this issue Mar 17, 2018
…ulacrum

re-enable testing librustdoc

This was originally put in in #44274, but #48105 accidentally hid it. This change puts librustdoc unit/doc tests back in the main test listing.

fixes #44237 (again)
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
A-docs Area: Documentation for any part of the project, including the compiler, standard library, and tools C-bug Category: This is a bug. T-dev-tools Relevant to the dev-tools subteam, which will review and decide on the PR/issue. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants