about summary refs log tree commit diff
path: root/src/tools/tidy
AgeCommit message (Collapse)AuthorLines
2024-05-06Auto merge of #124753 - GuillaumeGomez:migrate-rustdoc-determinism, r=jieyouxubors-2/+0
Migrate `run-make/rustdoc-error-lines` to new `rmake.rs` Part of https://github.com/rust-lang/rust/issues/121876. There was a weird naming inconsistency with `input`/`output`. A few tests write `.arg("-o").arg(path)` and the `output` method was actually the command output. So instead, I renamed the original `output` into `command_output` so that I could create the `output` method with the expected effect (and updated the tests to use it too). EDIT: The first two commits come from https://github.com/rust-lang/rust/pull/124711. Some weird things happened recently pparently. ^^' r? `@jieyouxu`
2024-05-06Auto merge of #124497 - rytheo:move-std-tests-to-library, r=workingjubileebors-1/+0
Move some stdlib tests from `tests/ui` to `library/std/tests` Related to #99417
2024-05-06Migrate `run-make/rustdoc-error-lines` to `rmake.rs`Guillaume Gomez-1/+0
2024-05-05Migrate `run-make/doctests-runtool` to rmakeGuillaume Gomez-1/+0
2024-05-04Rollup merge of #124698 - JoverZhang:test-rustdoc-determinism, r=jieyouxuMatthias Krüger-1/+0
Rewrite `rustdoc-determinism` test in Rust Rewrite the `rustdoc-determinism` test from #121876. r? `@jieyouxu`
2024-05-04Rewrite `rustdoc-determinism` test in RustJover Zhang-1/+0
2024-05-03Migrate `run-make/doctests-keep-binaries` to new `rmake.rs` formatGuillaume Gomez-1/+0
2024-05-03run-make: port stdin-rustc to Rust-based rmake.rsUrgau-1/+0
2024-05-01Auto merge of #121564 - ojeda:rustc-jobserver, r=ehussbors-1/+3
rustc: document the jobserver Explicitly document that the jobserver may be used by `rustc`, as well as recommend the `+` indicator for integration of `rustc` into GNU Make. In particular, show the warning to increase the chances that this document is found when searching for solutions online. In addition, add a note about the issue with GNU Make 4.3 since it is important that users realize they should do this even if they do not expect parallelism from `rustc`. Finally, show how to workaround the issue of `$(shell ...)` calls in recursive Make (which e.g. was needed for the Linux kernel). The GNU Make 4.4 case under `--jobserver-style=pipe` is not added since it got fixed after Rust 1.76.0 already (i.e. `rustc` will not warn if it finds the negative file descriptors). From: https://github.com/rust-lang/rust/issues/120515 Cc: `@petrochenkov` `@belovdv` `@weihanglo` `@bjorn3` --- v2: To be able to use tab characters for the Make examples, add `<!-- ignore-tidy-{check} -->` support to `tidy`. v3: Added "Integration with build systems" section to hold the GNU Make one. Added "by clearing the `MAKEFLAGS` variable". Added "aforementioned" so that it is clear we are talking about the warning above. v4: Added CMake subsection. Added a note that `rustc` may be affected by other flags, e.g. `CARGO_MAKEFLAGS`. v5: Added that `rustc` will choose the number of jobs if a jobserver is not passed.
2024-04-30Rollup merge of #124280 - beetrees:repr128-test-rmake, r=jieyouxu许杰友 Jieyou Xu (Joe)-1/+0
Port repr128-dwarf run-make test to rmake This PR ports the repr128-dwarf run-make test to rmake, using the `gimli` crate instead of the `llvm-dwarfdump` command. Note that this PR changes `rmake.rs` files to be compiled with the 2021 edition (previously no edition was passed to `rustc`, meaning they were compiled with the 2015 edition). This means that `panic!("{variable}")` will now work as expected in `rmake.rs` files (there's already a usage in the [wasm-symbols-not-exported test](https://github.com/rust-lang/rust/blob/aca749eefceaed0cda19a7ec5e472fce9387bc00/tests/run-make/wasm-symbols-not-exported/rmake.rs#L34) that this will fix). Tracking issue: #121876
2024-04-30Port repr128-dwarf run-make test to rmakebeetrees-1/+0
2024-04-29Rollup merge of #124475 - GKFX:more-dependency-pruning, r=oli-obk许杰友 Jieyou Xu (Joe)-46/+24
Remove direct dependencies on lazy_static, once_cell and byteorder The relevant functionality of all three crates is now available and stable in the standard library, i.e. `std::sync::OnceLock` and `{integer}::to_le_bytes`. I think waiting for `LazyLock` (#109736) would give marginally more concise code, but not by much.
2024-04-28Run tidy on testsRyan Lowe-1/+0
2024-04-28Port print-cfg run-make to Rust-based rmake.rsUrgau-1/+0
2024-04-28Remove direct dependencies on lazy_static, once_cell and byteorderGeorge Bateman-46/+24
The functionality of all three crates is now available in the standard library.
2024-04-26Rollup merge of #124383 - Urgau:port-print-native-static-libs, r=jieyouxuJacob Pratt-1/+0
Port run-make `--print=native-static-libs` to rmake.rs This PR port the run-make `--print=native-static-libs` test to rmake.rs The dedup was really awful in the `Makefile`, I'm glad to finally have a proper dedup detection for this. Related to https://github.com/rust-lang/rust/issues/121876 r? `@jieyouxu`
2024-04-26Port run-make `--print=native-static-libs` to rmake.rsUrgau-1/+0
2024-04-25hir typeck: look into nested goalslcnr-1/+0
uses a `ProofTreeVisitor` to look into nested goals when looking at the pending obligations during hir typeck. Used by closure signature inference, coercion, and for async functions.
2024-04-25Rollup merge of #124257 - JoverZhang:rmake-diff, r=jieyouxuMatthias Krüger-1/+0
Rewrite the `no-input-file.stderr` test in Rust and support diff Rewrite the `no-input-file.stderr` test from #121876. Use the `similar` lib to replace the `diff` command.
2024-04-25Rewrite `no-input-file.stderr` test in Rust and support diffJover Zhang-1/+0
2024-04-25Rollup merge of #124333 - Urgau:better-bad-print, r=fmeaseMatthias Krüger-1/+0
Improve diagnostic for unknown `--print` request This PR improves the diagnostic when encountering a unknown `--print` request. It also moves the run-make test to a simple UI test.
2024-04-24Improve diagnostic for unknown --print requestUrgau-1/+0
2024-04-23Update allowed cg_clif depsbjorn3-0/+1
2024-04-21Move some testsCaio-35/+35
2024-04-19Auto merge of #115253 - donno2048:patch-1, r=albertlarsan68bors-7/+73
Implement `PROBLEMATIC_CONSTS` generalization You forgot that `A≈4`, `B≈8`, and `E≈3` and some more constants. The new `PROBLEMATIC_CONSTS` was generated using this code: ```py from functools import reduce def generate_problems(consts: list, letter_digit: dict): for const in consts: problem = reduce(lambda string, rep: string.replace(*reversed(rep)), ['%X' % const, *letter_digit.items()]) indexes = [index for index, c in enumerate(problem) if c in letter_digit.keys()] for i in range(1 << len(indexes)): yield int(''.join(letter_digit[c] if index in indexes and (i >> indexes.index(index)) & 1 else c for index, c in enumerate(problem)), 0x10) problems = generate_problems( [ # Old PROBLEMATIC_CONSTS: 184594741, 2880289470, 2881141438, 2965027518, 2976579765, 3203381950, 3405691582, 3405697037, 3735927486, 3735932941, 4027431614, 4276992702, # More of my own: 195934910, 252707358, 762133, 179681982, 173390526 ], { 'A': '4', 'B': '8', 'E': '3', } ) # print(list(problems)) # won't use that to print formatted from itertools import islice while len(cur_problems := list(islice(problems, 8))): print(' ', end='') print(*cur_problems, sep=', ', end='') print(',') ```
2024-04-17allow the tests to pass tidyElisha Hollander-4/+4
2024-04-17add testsElisha Hollander-0/+17
2024-04-17fix valueElisha Hollander-1/+1
2024-04-17configure for testingElisha Hollander-1/+4
2024-04-17format style.rsElisha Hollander-2/+2
2024-04-17separate regex generationElisha Hollander-7/+7
2024-04-17use a function to generate the regexElisha Hollander-8/+12
mainly for testing
2024-04-16restore line-breakElisha Hollander-1/+1
2024-04-16default to no testingElisha Hollander-0/+1
2024-04-16use `FxHashMap` Elisha Hollander-2/+4
* add `rustc-hash` to cargo manifest * use `FxHashMap`
2024-04-16use one `use` for `std`Elisha Hollander-2/+1
2024-04-16refactorElisha Hollander-17/+20
2024-04-16revert using regexElisha Hollander-11/+41
2024-04-16use regex to check for problemsElisha Hollander-41/+11
2024-04-16remove redundant whitespaceElisha Hollander-1/+1
2024-04-16formatElisha Hollander-22/+28
2024-04-16restore original constsElisha Hollander-1/+1
Co-authored-by: David Tolnay <dtolnay@gmail.com>
2024-04-16use `generate_problems`Elisha Hollander-136/+40
2024-04-16format style.rsElisha Hollander-13/+12
2024-04-16add more `PROBLEMATIC_CONSTS`Elisha Hollander-2/+130
2024-04-15port `rust-lld-custom-target` test to rmakeRémy Rakic-1/+0
also make sure that rust-lld can be disabled via linker features, even when enabled by default by the target spec
2024-04-15port `rust-lld` test to rmakeRémy Rakic-1/+0
also check that turning off the linker feature does not use lld
2024-04-15Auto merge of #122997 - matthiaskrgr:compiletest_ices, r=oli-obkbors-0/+20
compiletest ice tracking see https://rust-lang.zulipchat.com/#narrow/stream/131828-t-compiler/topic/where.20to.20mass-add.20known.20ices.20.2F.20merging.20glacier.20into.20rust/near/429082963 This will allow us to sunset most of https://github.com/rust-lang/glacier The rustc ices will be tracked directly inside the rust testsuite There are a couple of .sh tests remaining that I have not ported over yet. This adds `tests/crashes`, a file inside this directory MUST ice, otherwise it is considered test-fail. This will be used to track ICEs from glacier and the bugtracker. When someones pr accidentally fixes one of these ICEs, they can move the test from `crashes` into `ui` for example. I also added a new tidy lint that warns when a test inside `tests/crashes` does not have a `//@ known-bug: ` line the env var `COMPILETEST_VERBOSE_CRASHES` can be set to get exit code, stderr and stdout of a crash-test to aid debugging/adding tests.
2024-04-14tidy: add tidy check agains \.rs files inside tests/crashes that are missing ↵Matthias Krüger-0/+20
"//@ known-bug: "
2024-04-14Rollup merge of #123889 - onur-ozkan:improve-tidy, r=Mark-SimulacrumMatthias Krüger-9/+24
reduce tidy overheads in run-make checks This change makes tidy to handle run-make checks with a single iteration, avoiding the need for multiple iterations and copying.