about summary refs log tree commit diff
path: root/src/tools/run-make-support
AgeCommit message (Collapse)AuthorLines
2024-06-12port symlinked-extern to rmakeOneirical-2/+21
2024-06-12rewrite pgo-branch-weights to rmakeOneirical-6/+170
2024-06-11run-make-support: update changelog许杰友 Jieyou Xu (Joe)-0/+16
2024-06-11run-make-support: bump version许杰友 Jieyou Xu (Joe)-1/+1
2024-06-11run-make-support: add #[must_use] annotations许杰友 Jieyou Xu (Joe)-0/+26
2024-06-11Add set_backtrace_level helper function to run_make_supportOneirical-0/+6
2024-06-11Auto merge of #125736 - Oneirical:run-make-file-management, r=jieyouxubors-14/+121
run-make-support: add wrapper for `fs` operations Suggested by #125728. The point of this wrapper is to stop silent fails caused by forgetting to `unwrap` `fs` functions. However, functions like `fs::read` which return something and get stored in a variable should cause a failure on their own if they are not unwrapped (as the `Result` will be stored in the variable, and something will be done on that `Result` that should have been done to its contents). Is it still pertinent to wrap `fs::read_to_string`, `fs::metadata` and so on? Closes: https://github.com/rust-lang/rust/issues/125728 try-job: x86_64-msvc try-job: i686-mingw
2024-06-11Implement fs wrapper for run_make_supportOneirical-14/+121
2024-06-11Auto merge of #126274 - jieyouxu:rollup-uj93sfm, r=jieyouxubors-0/+5
Rollup of 5 pull requests Successful merges: - #126186 (Migrate `run-make/multiple-emits` to `rmake.rs`) - #126236 (Delegation: fix ICE on recursive delegation) - #126254 (Remove ignore-cross-compile directive from ui/macros/proc_macro) - #126258 (Do not define opaque types when selecting impls) - #126265 (interpret: ensure we check bool/char for validity when they are used in a cast) r? `@ghost` `@rustbot` modify labels: rollup
2024-06-11Rollup merge of #126186 - GuillaumeGomez:migrate-run-make-multiple-emits, ↵许杰友 Jieyou Xu (Joe)-0/+5
r=jieyouxu Migrate `run-make/multiple-emits` to `rmake.rs` Part of https://github.com/rust-lang/rust/issues/121876. r? `@jieyouxu`
2024-06-11Add `path` function to `run-make-support`Guillaume Gomez-0/+5
2024-06-11Auto merge of #125752 - jieyouxu:kaboom, r=Kobzolbors-71/+271
run-make: arm command wrappers with drop bombs This PR is one in a series of cleanups to run-make tests and the run-make-support library. ### Summary It's easy to forget to actually executed constructed command wrappers, e.g. `rustc().input("foo.rs")` but forget the `run()`, so to help catch these mistakes, we arm command wrappers with drop bombs on construction to force them to be executed by test code. This PR also removes the `Deref`/`DerefMut` impl for our custom `Command` which derefs to `std::process::Command` because it can cause issues when trying to use a custom command: ```rs htmldocck().arg().run() ``` fails to compile because the `arg()` is resolved to `std::process::Command::arg`, which returns `&mut std::process::Command` that doesn't have a `run()` command. This PR also: - Removes `env_var` on the `impl_common_helper` macro that was wrongly named and is a footgun (no users). - Bumps the run-make-support library to version `0.1.0`. - Adds a changelog to the support library. ### Details Especially for command wrappers like `Rustc`, it's very easy to build up a command invocation but forget to actually execute it, e.g. by using `run()`. This commit adds "drop bombs" to command wrappers, which are armed on command wrapper construction, and only defused if the command is executed (through `run`, `run_fail`). If the test writer forgets to execute the command, the drop bomb will "explode" and panic with an error message. This is so that tests don't silently pass with constructed-but-not-executed command wrappers. This PR is best reviewed commit-by-commit. try-job: x86_64-msvc
2024-06-11run-make-support: add changelog许杰友 Jieyou Xu (Joe)-0/+67
2024-06-11run-make-support: bump version许杰友 Jieyou Xu (Joe)-1/+1
2024-06-11run-make-support: arm command with drop bombs许杰友 Jieyou Xu (Joe)-64/+137
- Update all command wrappers and command construction helpers with `#[track_caller]` where suitable to help the drop bomb panic message. - Remove `Deref`/`DerefMut` for `Command` because it was causing issues with resolving to `std::process::Command` in a method call chain.
2024-06-11run-make-support: add drop bomb module许杰友 Jieyou Xu (Joe)-0/+66
2024-06-11run-make-support: remove `env_var`许杰友 Jieyou Xu (Joe)-6/+0
This is incorrectly named (it's actually `env_clear`), and is itself a gigantic footgun: removing `TMPDIR` on Unix and `TMP`/`TEMP` on Windows basically wrecks anything that relies on `std::env::temp_dir` from functioning correctly. For example, this includes rustc's codegen.
2024-06-11Rollup merge of #126253 - Kobzol:run-make-assert-ref-self, r=jieyouxu许杰友 Jieyou Xu (Joe)-6/+6
Simplify assert matchers in `run-make-support` See [Zulip](https://rust-lang.zulipchat.com/#narrow/stream/421156-gsoc/topic/Project.3A.20Rewriting.20Makefile.20Tests.20Using.20Rust/near/443922302) for context. This should make it easier to use the matchers. r? `@jieyouxu`
2024-06-11Take `&self` in `CompletedProcess` assert matchersJakub Beránek-6/+6
2024-06-10migrate tests/run-make/llvm-outputs to use rmake.rsbinarycat-0/+7
part of #121876
2024-06-09Fix documentation for `impl_common_helpers` in `run-make-support`Jakub Beránek-14/+6
2024-06-08Migrate runmake tests away from custom commands and `command_output`Jakub Beránek-34/+90
2024-06-08Introduce a custom `Command` wrapper in `run-make-support`Jakub Beránek-122/+129
2024-06-08Auto merge of #126097 - Kobzol:runmake-change-cwd, r=jieyouxubors-43/+42
Change how runmake v2 tests are executed This PR makes execution of v2 runmake tests more sane, by executing each test in a temporary directory by default, rather than running it inside `tests/run-make`. This will have.. a lot of conflicts. Fixes: https://github.com/rust-lang/rust/issues/126080 Closes https://github.com/rust-lang/rust/issues/125726, because it removes `tmp_dir`, lol. r? `@jieyouxu` try-job: x86_64-msvc
2024-06-08Remove unnecessary functions and the last mention of TMPDIR from ↵Jakub Beránek-20/+1
`run-make-support`
2024-06-07Small refactoringJakub Beránek-9/+7
2024-06-07Remove all usages of `tmp_dir` from testsJakub Beránek-4/+7
2024-06-07Remove dependence on `tmp_dir`Jakub Beránek-18/+12
And also remove some environment variables passed to compilation of `rmake.rs`.
2024-06-07Fix `mixing-formats` run-make testJakub Beránek-3/+26
2024-06-07Rename `S` environment variable to `SOURCE_ROOT` in run-make testsJakub Beránek-1/+1
2024-06-06Do not use relative paths to Rust source root in run-make testsJakub Beránek-2/+3
2024-06-05Rollup merge of #125683 - Oneirical:patience-testing-test, r=jieyouxuJubilee-0/+6
Rewrite `suspicious-library`, `resolve-rename` and `incr-prev-body-beyond-eof` `run-make` tests in `rmake.rs` format Part of #121876 and the associated [Google Summer of Code project](https://blog.rust-lang.org/2024/05/01/gsoc-2024-selected-projects.html). Some oddly specific ignore flags in `incr-prev-body-beyond-eof`: ```rs // ignore-none // ignore-nvptx64-nvidia-cuda ``` it could be interesting to run a try job, but it seems there is no nvidia-cuda in the CI settings (`jobs.yml`). try-job: armhf-gnu
2024-06-04Create `run-make` `env_var` and `env_var_os` helpersGuillaume Gomez-34/+44
2024-06-03Auto merge of #125383 - Oneirical:bundle-them-up, r=jieyouxubors-2/+2
Rewrite `emit`, `mixing-formats` and `bare-outfile` `run-make` tests in `rmake.rs` format Part of #121876 and the associated [Google Summer of Code project](https://blog.rust-lang.org/2024/05/01/gsoc-2024-selected-projects.html). try-job: x86_64-msvc
2024-06-02Remove some allowed-makefilesOneirical-2/+2
2024-06-02Add `dynamic_lib_extension` and `read_dir` functions to `run-make-support` ↵Guillaume Gomez-12/+26
library
2024-06-01Add `Cc::output` methodGuillaume Gomez-0/+7
2024-05-30Rollup merge of #125723 - GuillaumeGomez:migrate-run-make-crate-data-smoke, ↵León Orell Valerian Liehr-2/+8
r=jieyouxu Migrate `run-make/crate-data-smoke` to `rmake.rs` Part of https://github.com/rust-lang/rust/issues/121876. r? ``@jieyouxu``
2024-05-29Add `run-make-support::rust_lib_name`Guillaume Gomez-1/+7
2024-05-29Migrate `run-make/crate-data-smoke` to `rmake.rs`Guillaume Gomez-1/+1
2024-05-29Convert run-make/windows-safeseh to rmakeChris Denton-0/+6
2024-05-29Rollup merge of #125639 - ChrisDenton:run-make-support-doc, r=onur-ozkan许杰友 Jieyou Xu (Joe)-3/+3
Support `./x doc run-make-support --open` Having easy access to the run-make-support documentation is invaluable when creating run-make tests using the new Rust recipes.
2024-05-28rewrite resolve-rename in rmakeOneirical-0/+6
2024-05-28Add `assert_not_contains` to `run-make-support` libraryGuillaume Gomez-0/+11
2024-05-28Fix run-make-support doc errorsChris Denton-3/+3
error: redundant explicit link target because label contains path that resolves to same destination
2024-05-27Add `Rustdoc::output_format`Guillaume Gomez-0/+7
2024-05-27Add file path in case it cannot be read in `Diff::actual_file`Guillaume Gomez-1/+4
2024-05-27Add `copy_dir_all` and `recursive_diff` functions to `run-make-support`Guillaume Gomez-0/+67
2024-05-22rewrite and rename `issue-24445` to rmakeOneirical-0/+8
2024-05-22Rewrite `core-no-oom-handling` as rmake.rsOneirical-1/+8