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

Add a custom Command wrapper to run-make-support #126121

Merged
merged 2 commits into from
Jun 8, 2024

Conversation

Kobzol
Copy link
Contributor

@Kobzol Kobzol commented Jun 7, 2024

This should make it easier to make sure that we check process exit codes, and it should also make checking of stdout/stderr less verbose and more explicit in run-make tests. I prefer the run()/run_fail().assert(...) style to something like run_fail_assert_exit_code, because the former is more composable.

Regarding #125747, I'm not sure if we really need a custom trait, I think that we can get far enough with just Deref on the Cc/Clang/Rustc/Rustdoc/... structs. But now that these structs don't even need command_output anymore, I think that they are fine-ish as they are with the macro.

Related issues: #125617, #125747

Fixes: #125617 (because command_output is no longer a public method)

r? @jieyouxu

@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 7, 2024
@rustbot
Copy link
Collaborator

rustbot commented Jun 7, 2024

Some changes occurred in src/tools/compiletest

cc @jieyouxu

Some changes occurred in run-make tests.

cc @jieyouxu

The run-make-support library was changed

cc @jieyouxu

Copy link
Member

@jieyouxu jieyouxu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks very nice to me in general! Just a couple of suggestion and nits (non-blocking).

src/tools/run-make-support/src/command.rs Outdated Show resolved Hide resolved
src/tools/run-make-support/src/command.rs Outdated Show resolved Hide resolved
src/tools/run-make-support/src/command.rs Outdated Show resolved Hide resolved
@rust-log-analyzer

This comment has been minimized.

@jieyouxu
Copy link
Member

jieyouxu commented Jun 7, 2024

Thanks, r=me after CI is green.

@Kobzol
Copy link
Contributor Author

Kobzol commented Jun 7, 2024

Thanks! Need to wait for #126097 first though.

@bors
Copy link
Contributor

bors commented Jun 7, 2024

☔ The latest upstream changes (presumably #126134) made this pull request unmergeable. Please resolve the merge conflicts.

@Kobzol
Copy link
Contributor Author

Kobzol commented Jun 8, 2024

@bors r=jieyouxu rollup=never

@bors
Copy link
Contributor

bors commented Jun 8, 2024

📌 Commit 0a190e8 has been approved by jieyouxu

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 8, 2024
@bors
Copy link
Contributor

bors commented Jun 8, 2024

⌛ Testing commit 0a190e8 with merge f21554f...

@bors
Copy link
Contributor

bors commented Jun 8, 2024

☀️ Test successful - checks-actions
Approved by: jieyouxu
Pushing f21554f to master...

@bors bors added the merged-by-bors This PR was explicitly merged by bors. label Jun 8, 2024
@bors bors merged commit f21554f into rust-lang:master Jun 8, 2024
7 checks passed
@rustbot rustbot added this to the 1.81.0 milestone Jun 8, 2024
@rust-timer
Copy link
Collaborator

Finished benchmarking commit (f21554f): 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 (primary -2.3%)

This is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.

mean range count
Regressions ❌
(primary)
- - 0
Regressions ❌
(secondary)
- - 0
Improvements ✅
(primary)
-2.3% [-2.3%, -2.3%] 1
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) -2.3% [-2.3%, -2.3%] 1

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: missing data
Artifact size: 319.74 MiB -> 319.76 MiB (0.00%)

@Kobzol Kobzol deleted the runmake-cmd-wrapper branch June 9, 2024 06:26
jieyouxu added a commit to jieyouxu/rust that referenced this pull request Jun 9, 2024
…youxu

Fix documentation for `impl_common_helpers` in `run-make-support`

Forgot to do this in rust-lang#126121.

`@bors` rollup

r? `@jieyouxu`
jieyouxu added a commit to jieyouxu/rust that referenced this pull request Jun 9, 2024
…youxu

Fix documentation for `impl_common_helpers` in `run-make-support`

Forgot to do this in rust-lang#126121.

`@bors` rollup

r? `@jieyouxu`
rust-timer added a commit to rust-lang-ci/rust that referenced this pull request Jun 9, 2024
Rollup merge of rust-lang#126188 - Kobzol:runmake-command-docs, r=jieyouxu

Fix documentation for `impl_common_helpers` in `run-make-support`

Forgot to do this in rust-lang#126121.

`@bors` rollup

r? `@jieyouxu`
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 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
Status: Done
Development

Successfully merging this pull request may close these issues.

Audit usage of command_output methods in rmake.rs tests
6 participants