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

rustdoc-gui test suite not run on CI? #84550

Closed
GuillaumeGomez opened this issue Apr 25, 2021 · 17 comments
Closed

rustdoc-gui test suite not run on CI? #84550

GuillaumeGomez opened this issue Apr 25, 2021 · 17 comments
Labels
A-testsuite Area: The testsuite used to check the correctness of rustc C-bug Category: This is a bug. T-infra Relevant to the infrastructure team, 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

@GuillaumeGomez
Copy link
Member

It seems like the rustdoc-gui test suite isn't run on CI because it fails when run locally (as it should) because recent changes modified DOM, making the nojs-attr-pos fail.

cc @Mark-Simulacrum

@GuillaumeGomez GuillaumeGomez added A-testsuite Area: The testsuite used to check the correctness of rustc T-infra Relevant to the infrastructure team, which will review and decide on the PR/issue. labels Apr 25, 2021
@jyn514
Copy link
Member

jyn514 commented Apr 25, 2021

@GuillaumeGomez this happens because you never installed node in the CI environment:

Set({"src/test/rustdoc-gui"}) not skipped for "bootstrap::test::RustdocGUI" -- not in ["src/tools/tidy"]
Set({"src/tools/rustdoc-themes"}) not skipped for "bootstrap::test::RustdocTheme" -- not in ["src/tools/tidy"]
No nodejs found, skipping "src/test/rustdoc-gui" tests

This makes me even more certain that both this testsuite and #84480 should be run unconditionally in CI.

@jyn514 jyn514 added T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue. C-bug Category: This is a bug. labels Apr 25, 2021
@GuillaumeGomez
Copy link
Member Author

@jyn514
Copy link
Member

jyn514 commented Apr 25, 2021

That only runs on x86_64-gnu-aux, which I think isn't run on PRs. I can't find any mentions of it at all except this one:

- name: x86_64-gnu-aux
<<: *job-linux-xl

Which job do you think it runs on?

@GuillaumeGomez
Copy link
Member Author

GuillaumeGomez commented Apr 25, 2021

The one that is run by github actions (one of the 3 "checks" that is run when you open a PR).

@jyn514
Copy link
Member

jyn514 commented Apr 25, 2021

No, none of those jobs are x86_64-gnu-aux. You need to move it to job-linux-xl or x86_64-gnu-llvm-10 if you want it to run on PRs.

@jyn514
Copy link
Member

jyn514 commented Apr 25, 2021

And again, I really think this is the wrong approach and it should be run unconditionally. Otherwise it will break again in the future.

@GuillaumeGomez
Copy link
Member Author

I agree with you. The problem here is that installing puppeteer is quite tricky (because it requires a specific chrome instance). And I have no idea how to handle node/npm install on non-linux targets.

@jyn514
Copy link
Member

jyn514 commented Apr 25, 2021

Ok, can you instead add an assert to bootstrap that makes sure the tests aren't skipped on any linux platform? That should be easier than trying to get this to work on all tier 1 targets.

@Mark-Simulacrum
Copy link
Member

Please don't do that, we're explicitly requesting it on one of the builders, so we can simply avoid marking the job as default and change the nodejs conditional to a requirement.

@GuillaumeGomez
Copy link
Member Author

@Mark-Simulacrum Any tip/example on how to do that?

@jyn514
Copy link
Member

jyn514 commented Apr 25, 2021

@GuillaumeGomez toggle this constant:

const DEFAULT: bool = true;

and give a hard error here:

rust/src/bootstrap/test.rs

Lines 797 to 800 in 58bdb08

println!(
"warning: rustdoc-gui test suite cannot be run because npm `browser-ui-test` \
dependency is missing",
);

@jyn514
Copy link
Member

jyn514 commented Apr 25, 2021

Actually it might even be nicer to leave DEFAULT on but add a default_condition that npm is installed - @Mark-Simulacrum how does that sound?

rust/src/bootstrap/test.rs

Lines 775 to 777 in 58bdb08

fn should_run(run: ShouldRun<'_>) -> ShouldRun<'_> {
run.path("src/test/rustdoc-gui")
}

@Mark-Simulacrum
Copy link
Member

That seems reasonable too.

@GuillaumeGomez
Copy link
Member Author

Ok, gonna send a PR for it tomorrow then!

bors added a commit to rust-lang-ci/rust that referenced this issue Apr 27, 2021
…fault, r=jsha

Open impl blocks by default

Fixes rust-lang#84558.
Part of rust-lang#84422.

As you can see on https://doc.rust-lang.org/nightly/nightly-rustc/rustc_middle/ty/context/struct.TyCtxt.html, impl blocks are currently not open by default whereas they should.

I also realized that a test was outdated so I removed it and opened rust-lang#84550 because it seems like the rustdoc-gui test suite isn't run on CI...

cc `@jyn514`
r? `@jsha`
bors added a commit to rust-lang-ci/rust that referenced this issue May 30, 2021
…st-suite-run, r=Mark-Simulacrum

Enforce rustdoc-gui test-suite run

Part of rust-lang#84550
@dns2utf8
Copy link
Contributor

Quick question: Is it documented already that node with some version is one of the optional requirements?

@GuillaumeGomez
Copy link
Member Author

I didn't put a requirement for the node version. And it's in the README in src/test/rustdoc-gui. :)

@jyn514
Copy link
Member

jyn514 commented May 30, 2021

This was fixed by #84586.

@jyn514 jyn514 closed this as completed May 30, 2021
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. T-infra Relevant to the infrastructure team, 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

No branches or pull requests

4 participants