Uh oh!
There was an error while loading. Please reload this page.
Rustdoc gui tests - #79979
Conversation
GuillaumeGomez
commented
Dec 12, 2020
Also: weird CI failure... |
jyn514
commented
Dec 12, 2020
I think either a README in the directory they're in, or in the dev-guide would be a good place. Possibly one could link to the other. |
Uh oh!
There was an error while loading. Please reload this page.
Mark-Simulacrum
commented
Dec 12, 2020
I am still a little uncertain about the approach here of needing a JS out-of-tree dependency expected to be installed through nodejs/npm; I definitely think this cannot land without some amount of published documentation on how to update these tests. I am a bit worried that it's going to be a significant increase in the overhead for contributors to rustdoc (needing a JS toolchain installed to test things locally), but I could be wrong about that. Ultimately that's a T-rustdoc decision, I suppose. The comment I left should hopefully fix CI. |
GuillaumeGomez
commented
Dec 12, 2020
We can clone the framework too. I don't have much preference for a solution, just thought that it might be simpler to use |
Mark-Simulacrum
commented
Dec 12, 2020
Even cloning the framework presumably doesn't decouple us from needing the JS toolchain though? I think that's my primary concern. If it's just nodejs that's not too bad, but I'm a bit worried about running npm install mid-build. |
Then let's go for a submodule. Like that at least we'll know what's going on and no need for npm. |
GuillaumeGomez
commented
Dec 14, 2020
To make things a bit simpler to track down, I made the
In case only the second condition isn't respected, a warning is displayed. The last commit is the CI update. I took the changes mostly from #70533 but we'll still need to have @Mark-Simulacrum to confirm them. :) So once everything else has been validated, I'll add the documentation. |
Mark-Simulacrum
commented
Dec 14, 2020
If we're going to require npm anyway I see no reason for the submodule I think? We probably want to put the lockfile in git though... |
GuillaumeGomez
commented
Dec 14, 2020
That's the thing: either we put a lockfile in rust repository, or we keep the submodule and use its own lockfile. One way or another, it's fine by me. Maybe you have an opinion @jyn514 ? |
Mark-Simulacrum
commented
Dec 14, 2020
I have several requirements:
It's up to the rustdoc team whether you think this requirement is a reasonable ask of contributors - it seems like a high bar to me, but maybe editing these tests is rare and not too worrisome. I will take a look at this PR's implementation soon. |
GuillaumeGomez
commented
Dec 15, 2020
These tests are mostly for me. To be more precise: I spend most of my time fixing GUI issues and I'd that to slow down quite a lot. So unless someone is changing the front-end, they don't need to run this test suite, and even if they do, I'm pretty sure in most cases there won't be an issue (but if there is one, the CI will tell us, finally!). |
7610ca1 to
1aedddeCompare
This comment has been minimized.
This comment has been minimized.
jyn514
commented
Dec 15, 2020
@GuillaumeGomez that's not how testing works, though. CI can fail on anyone's changes, not just yours. The scenario is someone does make changes and either needs to add a new test or an existing test fails. That said, I think if we print "run |
GuillaumeGomez
commented
Dec 15, 2020
I maybe badly tried to explain my point of view. The idea was "if you broke the GUI tests, you very likely know how npm works". 😄 |
GuillaumeGomez
commented
Dec 15, 2020
@Mark-Simulacrum I might need help for the CI scripts update (not too sure what to change here without breaking everything...). So whenever you have time, it'd be super appreciated! :) |
Mark-Simulacrum
commented
Dec 23, 2020
I think this is still adding a submodule which seems like the wrong approach. I would expect us to use browser-ui-test just like we expect e.g. a C compiler to be installed to run this test. I presume that it can be readily installed by contributors via npm or so? |
GuillaumeGomez
commented
Dec 23, 2020
Hmmm... Well, it doesn't hurt to have |
GuillaumeGomez
commented
Feb 21, 2021
Commits squashed, @bors: r=Mark-Simulacrum |
bors
commented
Feb 21, 2021
📌 Commit 20f2497 has been approved by |
bors
commented
Feb 21, 2021
⌛ Testing commit 20f2497 with merge f8297b6ad3ae48ff88b8cdd31dcc8fbe34355050... |
bors
commented
Feb 21, 2021
💔 Test failed - checks-actions |
rust-log-analyzer
commented
Feb 21, 2021
GuillaumeGomez
commented
Feb 21, 2021
There is no failure apparently? Well, let's rety... @bors: retry |
bors
commented
Feb 21, 2021
⌛ Testing commit 20f2497 with merge 9d32bf0a81931e6e833eb0155aa5f067e7b7b3f6... |
bors
commented
Feb 21, 2021
💥 Test timed out |
rust-log-analyzer
commented
Feb 22, 2021
ehuss
commented
Feb 22, 2021
@bors retry |
bors
commented
Feb 22, 2021
bors
commented
Feb 22, 2021
☀️ Test successful - checks-actions |
| !/src/test/run-make/thumb-none-qemu/example/.cargo | ||
| no_llvm_build | ||
| **node_modules | ||
| **package-lock.json |
There was a problem hiding this comment.
I don't think this is valid syntax. At least I can't find it in man gitignore and ripgrep complains about it:
rust/.gitignore: line 55: error parsing glob '**node_modules': invalid use of **; must be one path component
rust/.gitignore: line 56: error parsing glob '**package-lock.json': invalid use of **; must be one path component
There was a problem hiding this comment.
** is to look for all subfolders, whatever the level.
There was a problem hiding this comment.
I believe that would be **/node_modules
There was a problem hiding this comment.
It works for me as is but don't hesitate to send an update.
This is a reopening of #70533.
For this first version, there will be no screenshot comparison. Also, a big change compared to the previous version: the tests are now hosted in the rust repository directly. Since there is no image, it's pretty lightweight to say the least.
So now, only remains the nodejs script to run the tests and the tests themselves. Just one thing is missing: where should I put the documentation for these tests? I'm not sure where would be the best place for that. The doc will contain important information like the documentation of the framework used and how to install it (
npm install browser-ui-test, but still needs to be put somewhere so no one is lost).We'd also need to install the package when running the CI too. For now, it runs as long as we have nodejs installed, but I think we don't it to run in all nodejs targets?
cc @jyn514
r? @Mark-Simulacrum