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

Don't abort rustdoc tests if tidy isn't installed #79370

Merged
merged 3 commits into from
Dec 12, 2020

Conversation

jyn514
Copy link
Member

@jyn514 jyn514 commented Nov 24, 2020

Follow-up to #78752.

Before:

Check compiletest suite=rustdoc mode=rustdoc (x86_64-unknown-linux-gnu -> x86_64-unknown-linux-gnu)

running 396 tests
..................................................2020-11-23T12:12:37.735649Z ERROR compiletest::runtest: fatal error, panic: "failed to run tidy - is it installed? - No such file or directory (os error 2)"
F................................................. 100/396
.................................................................................................... 200/396
.................................................................................................... 300/396
...............................i...............2020-11-23T12:15:00.271271Z ERROR compiletest::runtest: fatal error, panic: "failed to run tidy - is it installed? - No such file or directory (os error 2)"
F................................................

After:

Check compiletest suite=rustdoc mode=rustdoc (x86_64-unknown-linux-gnu -> x86_64-unknown-linux-gnu)

running 4 tests
.FFF
failures:

---- [rustdoc] rustdoc/fn-pointer-arg-name.rs stdout ----

error: htmldocck failed!
status: exit code: 1
command: "/usr/bin/python" "/home/joshua/rustc/src/etc/htmldocck.py" "/home/joshua/rustc/build/x86_64-unknown-linux-gnu/test/rustdoc/fn-pointer-arg-name" "/home/joshua/rustc/src/test/rustdoc/fn-pointer-arg-name.rs"
stdout:
------------------------------------------

------------------------------------------
stderr:
------------------------------------------
4: @has check failed
	`XPATH PATTERN` did not match
	// @has - '//*[@class="rust fn"]' 'pub fn f(callback: fn(len: usize, foo: u32))'

Encountered 1 errors

------------------------------------------

info: generating a diff against nightly rustdoc
failed to run tidy - is it installed? - Permission denied (os error 13)
failed to run tidy - is it installed? - Permission denied (os error 13)
 # a diff without running `tidy`

r? @GuillaumeGomez

@jyn514 jyn514 added A-testsuite Area: The testsuite used to check the correctness of rustc T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue. A-contributor-roadblock Area: Makes things more difficult for new contributors to rust itself labels Nov 24, 2020
@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Nov 24, 2020
@jyn514
Copy link
Member Author

jyn514 commented Nov 26, 2020

I also changed this to ignore .css files, like you suggested on Zulip.

@bors

This comment has been minimized.

Before:

```
Check compiletest suite=rustdoc mode=rustdoc (x86_64-unknown-linux-gnu -> x86_64-unknown-linux-gnu)

running 396 tests
..................................................2020-11-23T12:12:37.735649Z ERROR compiletest::runtest: fatal error, panic: "failed to run tidy - is it installed? - No such file or directory (os error 2)"
F................................................. 100/396
.................................................................................................... 200/396
.................................................................................................... 300/396
...............................i...............2020-11-23T12:15:00.271271Z ERROR compiletest::runtest: fatal error, panic: "failed to run tidy - is it installed? - No such file or directory (os error 2)"
F................................................
```

After:

```
Check compiletest suite=rustdoc mode=rustdoc (x86_64-unknown-linux-gnu -> x86_64-unknown-linux-gnu)

running 4 tests
.FFF
failures:

---- [rustdoc] rustdoc/fn-pointer-arg-name.rs stdout ----

error: htmldocck failed!
status: exit code: 1
command: "/usr/bin/python" "/home/joshua/rustc/src/etc/htmldocck.py" "/home/joshua/rustc/build/x86_64-unknown-linux-gnu/test/rustdoc/fn-pointer-arg-name" "/home/joshua/rustc/src/test/rustdoc/fn-pointer-arg-name.rs"
stdout:
------------------------------------------

------------------------------------------
stderr:
------------------------------------------
4: @Has check failed
	`XPATH PATTERN` did not match
	// @Has - '//*[@Class="rust fn"]' 'pub fn f(callback: fn(len: usize, foo: u32))'

Encountered 1 errors

------------------------------------------

info: generating a diff against nightly rustdoc
failed to run tidy - is it installed? - Permission denied (os error 13)
failed to run tidy - is it installed? - Permission denied (os error 13)
 # a diff without running `tidy`
```
These are always static and never autogenerated, so the diffs aren't
useful.
@jyn514
Copy link
Member Author

jyn514 commented Dec 12, 2020

@bors r=GuillaumeGomez

@bors
Copy link
Contributor

bors commented Dec 12, 2020

📌 Commit f9b97a8 has been approved by GuillaumeGomez

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Dec 12, 2020
@bors
Copy link
Contributor

bors commented Dec 12, 2020

⌛ Testing commit f9b97a8 with merge 4c5c4aa...

@bors
Copy link
Contributor

bors commented Dec 12, 2020

☀️ Test successful - checks-actions
Approved by: GuillaumeGomez
Pushing 4c5c4aa to master...

@bors bors added the merged-by-bors This PR was explicitly merged by bors. label Dec 12, 2020
@bors bors merged commit 4c5c4aa into rust-lang:master Dec 12, 2020
@rustbot rustbot added this to the 1.50.0 milestone Dec 12, 2020
@jyn514 jyn514 deleted the tidy-error branch December 12, 2020 17:25
@petrochenkov
Copy link
Contributor

petrochenkov commented Jan 24, 2021

@jyn514
After these PRs I see this spam in x.py output:

thread 'main' panicked at 'need path to cargo', src\tools\tidy\src\main.rs:15:48
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

As I understand compiletest wants to run some third-party tool called tidy (with tidy --version), but it actually runs the rustbuild's tidy which doesn't support such command line use.

(Also this expensive probing happens unconditionally when running any test, even it is not related to rustdoc.)

@smmalis37
Copy link
Contributor

Also seeing this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-contributor-roadblock Area: Makes things more difficult for new contributors to rust itself A-testsuite Area: The testsuite used to check the correctness of rustc merged-by-bors This PR was explicitly merged by bors. S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants