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

compiletest: Only trim the end of process output #113189

Merged
merged 1 commit into from
Jul 1, 2023

Conversation

Zalathar
Copy link
Contributor

As of #94196, compiletest automatically trims process stderr/stdout output before printing it, to make failure info more compact.

This causes the first line of run-coverage output to be displayed incorrectly, because it uses leading whitespace to align line numbers.

Trimming only the end of the output string should still have the intended effect (e.g. removing trailing newlines), without causing problems for output that deliberately uses leading whitespace on the first line.

Before

--- stdout -------------------------------
1|      1|fn main() { //
    2|      1|    let num = 9;
    3|      1|    while num >= 10 {
    4|      0|    }
    5|      1|}
------------------------------------------
stderr: none

After

--- stdout -------------------------------
    1|      1|fn main() { //
    2|      1|    let num = 9;
    3|      1|    while num >= 10 {
    4|      0|    }
    5|      1|}
------------------------------------------
stderr: none

@rustbot
Copy link
Collaborator

rustbot commented Jun 30, 2023

r? @ozkanonur

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

@rustbot rustbot added A-testsuite Area: The testsuite used to check the correctness of rustc 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 30, 2023
@onur-ozkan
Copy link
Member

@bors r+ rollup

@bors
Copy link
Contributor

bors commented Jun 30, 2023

📌 Commit 115cfda has been approved by ozkanonur

It is now in the queue for this repository.

@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 Jun 30, 2023
bors added a commit to rust-lang-ci/rust that referenced this pull request Jun 30, 2023
…iaskrgr

Rollup of 8 pull requests

Successful merges:

 - rust-lang#113072 (str docs: remove "Basic usage" text where not useful)
 - rust-lang#113153 (make HashMap::or_insert_with example more simple)
 - rust-lang#113185 (Set `channel = nightly` in dist profile)
 - rust-lang#113186 (document that the panic in collect_intra_doc_links is load-bearing)
 - rust-lang#113187 (No need to distinguish `LocalTy` from `Ty`)
 - rust-lang#113189 (compiletest: Only trim the end of process output)
 - rust-lang#113191 (Update browser-ui-test version and improve GUI test)
 - rust-lang#113206 (User may want to skip tidy check sometimes)

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit 00efc94 into rust-lang:master Jul 1, 2023
@rustbot rustbot added this to the 1.72.0 milestone Jul 1, 2023
@Zalathar Zalathar deleted the trim-end branch July 1, 2023 01:28
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 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
Development

Successfully merging this pull request may close these issues.

4 participants