run-make-support: tidy up support library#123699
Merged
bors merged 4 commits intorust-lang:masterfrom Apr 14, 2024
Merged
Conversation
Collaborator
|
rustbot has assigned @Mark-Simulacrum. Use |
This comment has been minimized.
This comment has been minimized.
Member
Author
|
@rustbot author |
7ab8d73 to
45c48c3
Compare
Member
Author
|
@rustbot ready |
This comment was marked as resolved.
This comment was marked as resolved.
fbstj
reviewed
Apr 10, 2024
45c48c3 to
c69b5b7
Compare
Collaborator
|
☔ The latest upstream changes (presumably #123838) made this pull request unmergeable. Please resolve the merge conflicts. |
Member
|
r=me with a rebase |
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.
c69b5b7 to
a67a119
Compare
Member
Author
|
Rebased and fixed the merge conflict. |
Collaborator
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
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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
handle_failed_outputtake&Commandinstead of having the caller keep doingformat!("{:#?}", s).arg,args,run,run_fail.