6

implement stdout streaming in `render_tests::Renderer` by ozkanonur · Pull Reque...

 1 year ago
source link: https://github.com/rust-lang/rust/pull/112541
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
neoserver,ios ssh client

implement stdout streaming in render_tests::Renderer #112541

Merged

Conversation

Member

This way, we can show the test dot characters on the console immediately, without having to wait for the entire line to finish.

cc @GuillaumeGomez

Collaborator

r? @clubby789

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

rustbot

added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap)

labels

Jun 12, 2023

ozkanonur

changed the title replace render_tests::try_run_test with Builder::run

replace render_tests::try_run_test with Builder::run for rustdoc-gui tests

Jun 12, 2023

ozkanonur

marked this pull request as draft

June 12, 2023 09:22

ozkanonur

added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author.

and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties.

labels

Jun 12, 2023

Member

Author

Will keep this draft for now. I want to look into render_tests::try_run_test and see if I should fix this there.

Thanks for looking into it in any case!

ozkanonur reacted with heart emoji

ozkanonur

changed the title replace render_tests::try_run_test with Builder::run for rustdoc-gui tests

implement stdout streaming in render_tests::Renderer

Jun 12, 2023

Member

Author

I want to look into render_tests::try_run_test and see if I should fix this there.

Yeap, this is much better. Could be useful for other use cases too.

@rustbot ready

rustbot

removed the S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. label

Jun 12, 2023

ozkanonur

marked this pull request as ready for review

June 12, 2023 10:01

rustbot

added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label

Jun 12, 2023

Contributor

@bors r+

Contributor

pushpin Commit 6c966dc has been approved by clubby789

It is now in the queue for this repository.

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

Jun 12, 2023

Contributor

This way, we can show the test dot characters on the console immediately, without having to wait for the entire line to finish.

But this already works that way, why change anything?

python x.py --stage=1 --jobs=4 test tests/ui/
[cut]
Check compiletest suite=ui mode=ui (x86_64-pc-windows-msvc -> x86_64-pc-windows-msvc)

running 15130 tests
iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii    88/15130
iiiiiiiiiiiiiiiiiiiiiiiiiiii............................................................   176/15130
.......iiiiiiiiiiiiiii.....................i..................i....i....................   264/15130
........................................................................................   352/15130
........................................................................................   440/15130
......

Not for rustdoc-gui.

Member

Author

This way, we can show the test dot characters on the console immediately, without having to wait for the entire line to finish.

But this already works that way, why change anything?

python x.py --stage=1 --jobs=4 test tests/ui/
[cut]
Check compiletest suite=ui mode=ui (x86_64-pc-windows-msvc -> x86_64-pc-windows-msvc)

running 15130 tests
iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii    88/15130
iiiiiiiiiiiiiiiiiiiiiiiiiiii............................................................   176/15130
.......iiiiiiiiiiiiiii.....................i..................i....i....................   264/15130
........................................................................................   352/15130
........................................................................................   440/15130
......

this reads the stdout line by line

Contributor

Ok, in that case what command didn't worked that way before?

All of them (well at least all rustdoc test suites and test/ui).

Contributor

All of them (well at least all rustdoc test suites and test/ui).

In my case, dots printed one by one and digits printed when dots reach right side, that's why i asked about that change.

rustdoc-gui got migrated recently to a rust test runner and after that change, the dots are only displayed when the line is complete. It's not a problem in itself but it's not great compared to how it was working previously.

Member

Author

All of them (well at least all rustdoc test suites and test/ui).

In my case, dots printed one by one and digits printed when dots reach right side, that's why i asked about that change.

What is your HEAD ref? Do you have src/tools/rustdoc-gui-test tool in your tree ?

After the rustdoc-gui-test tool, we started using render_test::try_run_tests which reads/writes stdout line by line.

Contributor

What is your HEAD ref? Do you have src/tools/rustdoc-gui-test tool in your tree ?

head is 34d64ab, src/tools/rustdoc-gui-test exist
works on fd0a331. I'll try to clean all and rebuild.

Member

Author

What is your HEAD ref? Do you have src/tools/rustdoc-gui-test tool in your tree ?

head is 34d64ab, src/tools/rustdoc-gui-test exist

Hmm. By looking to the code, I don't know why it works on your side :)

Contributor

fd0a331:

python x.py clean
python x.py --stage=1 --jobs=4 test tests/ui/

Still the same, dots perfectly printed one by one.

tests

Member

Author

Still the same, dots perfectly printed one by one.

try x test rustdoc-gui

Contributor

Still the same, dots perfectly printed one by one.

try x test rustdoc-gui

Ughh, under windows here multiple issues which prevents this run. Fixed some of them, but looks like browser-ui-test still broken in some way.

Contributor

hourglass Testing commit 6c966dc with merge b963a57...

Contributor

Ok, it print dots for ./x.ps1 test rustdoc-gui all at once, but for other tests it already worked.

Contributor

sunny Test successful - checks-actions
Approved by: clubby789
Pushing b963a57 to master...

bors

added the merged-by-bors This PR was explicitly merged by bors label

Jun 12, 2023

bors

merged commit b963a57 into

rust-lang:master

Jun 12, 2023

12 checks passed

Collaborator

Finished benchmarking commit (b963a57): comparison URL.

Overall result: no relevant changes - no action needed

@rustbot label: -perf-regression

Instruction count

This benchmark run did not return any relevant results for this metric.

Max RSS (memory usage)

Results

Cycles

This benchmark run did not return any relevant results for this metric.

Binary size

This benchmark run did not return any relevant results for this metric.

Bootstrap: 647.661s -> 649.999s (0.36%)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

clubby789

clubby789 left review comments
Labels
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-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap)
Projects

None yet

Milestone

1.72.0

Development

Successfully merging this pull request may close these issues.

None yet

7 participants

About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK