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

run-make-support: tidy up support library #123699

Merged
merged 4 commits into from
Apr 14, 2024
Merged

Conversation

jieyouxu
Copy link
Member

@jieyouxu jieyouxu commented Apr 9, 2024

  • Make handle_failed_output take &Command instead of having the caller keep doing format!("{:#?}", s).
  • Introduce a helper macro for implementing common command wrappers, such as arg, args, run, run_fail.
    • Use the helper macro on existing command wrappers and remove manual copy-pasta'd implementations.

@rustbot
Copy link
Collaborator

rustbot commented Apr 9, 2024

r? @Mark-Simulacrum

rustbot has assigned @Mark-Simulacrum.
They will have a look at your PR within the next two weeks and either review your PR or reassign to another reviewer.

Use r? to explicitly pick a reviewer

@rustbot rustbot added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Apr 9, 2024
@rust-log-analyzer

This comment has been minimized.

@jieyouxu
Copy link
Member Author

jieyouxu commented Apr 9, 2024

@rustbot author

@rustbot rustbot 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 Apr 9, 2024
@jieyouxu
Copy link
Member Author

jieyouxu commented Apr 9, 2024

@rustbot ready

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Apr 9, 2024
@bors

This comment was marked as resolved.

@bors
Copy link
Contributor

bors commented Apr 12, 2024

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

@Mark-Simulacrum
Copy link
Member

r=me with a rebase

@Mark-Simulacrum Mark-Simulacrum 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 Apr 13, 2024
Add a helper macro for adding common methods to command wrappers. Common
methods include helpers that delegate to `Command` and running methods.

- `arg` and `args` (delegates to `Command`)
- `env`, `env_remove` and `env_clear` (delegates to `Command`)
- `output`, `run` and `run_fail`

This helps to avoid needing to copy-pasta / reimplement these common
methods on a new command wrapper, which hopefully reduces the friction
for run-make test writers wanting to introduce new command wrappers.
Removes the manual copy-pasta'd implementation of common methods.
@jieyouxu
Copy link
Member Author

Rebased and fixed the merge conflict.
@bors r=Mark-Simulacrum rollup

@bors
Copy link
Contributor

bors commented Apr 13, 2024

📌 Commit a67a119 has been approved by Mark-Simulacrum

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-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Apr 13, 2024
matthiaskrgr added a commit to matthiaskrgr/rust that referenced this pull request Apr 14, 2024
…mulacrum

run-make-support: tidy up support library

- Make `handle_failed_output` take `&Command` instead of having the caller keep doing `format!("{:#?}", s)`.
- Introduce a helper macro for implementing common command wrappers, such as `arg`, `args`, `run`, `run_fail`.
    - Use the helper macro on existing command wrappers and remove manual copy-pasta'd implementations.
bors added a commit to rust-lang-ci/rust that referenced this pull request Apr 14, 2024
…iaskrgr

Rollup of 9 pull requests

Successful merges:

 - rust-lang#123651 (Thread local updates for idiomatic examples)
 - rust-lang#123699 (run-make-support: tidy up support library)
 - rust-lang#123779 (OpenBSD fix long socket addresses)
 - rust-lang#123803 (Fix `VecDeque::shrink_to` UB when `handle_alloc_error` unwinds.)
 - rust-lang#123875 (Doc: replace x with y for hexa-decimal fmt)
 - rust-lang#123879 (Add missing `unsafe` to some internal `std` functions)
 - rust-lang#123889 (reduce tidy overheads in run-make checks)
 - rust-lang#123898 (Generic associated consts: Check regions earlier when comparing impl with trait item def)
 - rust-lang#123902 (compiletest: Update rustfix to 0.8.1)

r? `@ghost`
`@rustbot` modify labels: rollup
bors added a commit to rust-lang-ci/rust that referenced this pull request Apr 14, 2024
…iaskrgr

Rollup of 8 pull requests

Successful merges:

 - rust-lang#123651 (Thread local updates for idiomatic examples)
 - rust-lang#123699 (run-make-support: tidy up support library)
 - rust-lang#123779 (OpenBSD fix long socket addresses)
 - rust-lang#123875 (Doc: replace x with y for hexa-decimal fmt)
 - rust-lang#123879 (Add missing `unsafe` to some internal `std` functions)
 - rust-lang#123889 (reduce tidy overheads in run-make checks)
 - rust-lang#123898 (Generic associated consts: Check regions earlier when comparing impl with trait item def)
 - rust-lang#123902 (compiletest: Update rustfix to 0.8.1)

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit bd4f67c into rust-lang:master Apr 14, 2024
11 checks passed
@rustbot rustbot added this to the 1.79.0 milestone Apr 14, 2024
rust-timer added a commit to rust-lang-ci/rust that referenced this pull request Apr 14, 2024
Rollup merge of rust-lang#123699 - jieyouxu:rmake-refactor, r=Mark-Simulacrum

run-make-support: tidy up support library

- Make `handle_failed_output` take `&Command` instead of having the caller keep doing `format!("{:#?}", s)`.
- Introduce a helper macro for implementing common command wrappers, such as `arg`, `args`, `run`, `run_fail`.
    - Use the helper macro on existing command wrappers and remove manual copy-pasta'd implementations.
matthiaskrgr added a commit to matthiaskrgr/rust that referenced this pull request Apr 19, 2024
run-make: refactor out command wrappers for `clang` and `llvm-readobj`

This PR is rebased on top of rust-lang#123699.

This PR is a follow up to rust-lang#123612 to refactor out command wrappers into the support library for `llvm-readobj` and `clang`.

r? ghost
matthiaskrgr added a commit to matthiaskrgr/rust that referenced this pull request Apr 19, 2024
run-make: refactor out command wrappers for `clang` and `llvm-readobj`

This PR is rebased on top of rust-lang#123699.

This PR is a follow up to rust-lang#123612 to refactor out command wrappers into the support library for `llvm-readobj` and `clang`.

r? ghost
rust-timer added a commit to rust-lang-ci/rust that referenced this pull request Apr 19, 2024
Rollup merge of rust-lang#123729 - jieyouxu:rmake-refactor-2, r=oli-obk

run-make: refactor out command wrappers for `clang` and `llvm-readobj`

This PR is rebased on top of rust-lang#123699.

This PR is a follow up to rust-lang#123612 to refactor out command wrappers into the support library for `llvm-readobj` and `clang`.

r? ghost
@jieyouxu jieyouxu deleted the rmake-refactor branch May 1, 2024 19:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants