| Age | Commit message (Collapse) | Author | Lines |
|
compiletest: Add an experimental new executor to replace libtest
This PR adds a new "executor" to compiletest for running the list of collected tests, to eventually replace the current dependency on unstable libtest internals.
The new executor is currently inactive by default. It must be activated explicitly by passing `-n` or `--new-executor` to compiletest, e.g. `./x test ui -- -n`.
(After some amount of wider manual testing, the new executor will hopefully be made the default, and the libtest dependency can be removed. Contributors should not notice any change.)
The new executor is a stripped-down rewrite of the subset of libtest needed by compiletest.
# Supported functionality
- Specifying the number of concurrent tests with `RUST_TEST_THREADS`
- Filtering and skipping tests by name (substring or exact-match)
- Forcibly running ignored tests with `--ignored`
- Optional fail-fast with `--fail-fast`
- JSON output, compatible with bootstrap's parser for libtest output
- Running each test in its own thread
- Short backtraces that ignore the executor itself
- Slow test detection, with a hard-coded timeout of 60 seconds
- Capturing stdout/stderr, via `#![feature(internal_output_capture)]`
- Suppressing output capture with `--no-capture`
# Unsupported functionality
- Non-JSON output, as this is handled by bootstrap instead
- Separate code path for concurrency=1, as the concurrent path should handle this case naturally
- Fallback to running tests synchronously if new threads can't be spawned
- Special handling of hosts that don't support basic functionality like threads or timers
- Our ability to test *targets* should be unaffected
- Graceful handling of some edge cases that could occur in arbitrary user-written unit tests, but would represent bugs in compiletest
- Due to the current need for output capture, the new executor is still not entirely written in stable Rust
---
r? jieyouxu
|
|
|
|
|
|
`sym::dummy` also appears to work.
|
|
Again by using `Option<Symbol>` to represent "no name".
|
|
|
|
|
|
The new executor can be enabled by passing `--new-executor` or `-n` to
compiletest.
For example: `./x test ui -- -n`
|
|
|
|
|
|
|
|
Some `unwrap` uses here, but they are on paths involving item kinds that
are known to have an identifier.
|
|
Signed-off-by: Hayashi Mikihiro <34ttrweoewiwe28@gmail.com>
|
|
|
|
Ubuntu 25.04 has `llvm-20` packages that we can start testing with.
The `Dockerfile` is otherwise the same as the `llvm-18`/`19` runners.
|
|
To accurately reflect that RPITIT assoc items don't have a name. This
avoids the use of `kw::Empty` to mean "no name", which is error prone.
Helps with #137978.
|
|
Because all the other similar methods are on `AssocItem`.
|
|
From `hir::AssocItem`.
|
|
|
|
Miri subtree update
r? `@ghost`
Fixes build failures on macOS
|
|
opt-dist: use executable-extension for host llvm-profdata
because it's used for target llvm-profdata too
r? Kobzol
|
|
Improve wording of post-merge report
Slight changes to improve the rendered output e.g. [here](https://github.com/rust-lang/rust/pull/139241#issuecomment-2801733750) if only doctest changes were found.
r? `@marcoieni`
|
|
use `realpath` in `bootstrap.py` when creating build-dir
Fixes #139800
r? `@jieyouxu`
My use case for `./build` being a symlink is this: my "default" ~~partition~~ btrfs subvolume is snapshotted/backed up. I don't want to backup target-likes, so I move them to a special subvolume which isn't backed up. `./build` is a symlink into that subvolume. (`build.build-dir` configuration is not fully sufficient, it is still nice to be able to check build files with `ls ./build` or call tools from there)
|
|
Do not perform PGO on Linux CI
|
|
|
|
refactor: editor for `destructure_struct_binding`
|
|
|
|
refactor: migrate `expand_rest_pattern` to editor
|
|
Distribute x64 and aarch64 Linux builds with PGO optimizations
|
|
|
|
this avoids crashes when `./build` is a symlink to a non-existent
directory.
|
|
optional
|
|
fix(ast): return correct types for `make::expr_*` methods
|
|
add normalizeDriveLetter
|
|
ci: cancel parallel jobs if test fails
|
|
fix: Prevent panics when there is a cyclic dependency between closures
|
|
|
|
|
|
Rollup of 9 pull requests
Successful merges:
- #138336 (Improve `-Z crate-attr` diagnostics)
- #139636 (Encode dep node edge count as u32 instead of usize)
- #139666 (cleanup `mir_borrowck`)
- #139695 (compiletest: consistently use `camino::{Utf8Path,Utf8PathBuf}` throughout)
- #139699 (Proactively update coroutine drop shim's phase to account for later passes applied during shim query)
- #139718 (enforce unsafe attributes in pre-2024 editions by default)
- #139722 (Move some things to rustc_type_ir)
- #139760 (UI tests: migrate remaining compile time `error-pattern`s to line annotations when possible)
- #139776 (Switch attrs to `diagnostic::on_unimplemented`)
r? `@ghost`
`@rustbot` modify labels: rollup
|
|
Coding conventions chapter cleaning
|
|
- use correct code block markers
- add missing title
- rustfmt can now use edition setting in its config
... and this is set in Rust repo
- reduce visual noise
- needless repetition
- convention is to start sentence with upper case
- sembr
- whitespace
- semi-heading not adding much value
- fix grammar
|
|
`hir::AssocItem` currently has a boolean `fn_has_self_parameter` field,
which is misplaced, because it's only relevant for associated fns, not
for associated consts or types. This commit moves it (and renames it) to
the `AssocKind::Fn` variant, where it belongs.
This requires introducing a new C-style enum, `AssocTag`, which is like
`AssocKind` but without the fields. This is because `AssocKind` values
are passed to various functions like `find_by_ident_and_kind` to
indicate what kind of associated item should be searched for, and having
to specify `has_self` isn't relevant there.
New methods:
- Predicates `AssocItem::is_fn` and `AssocItem::is_method`.
- `AssocItem::as_tag` which converts `AssocItem::kind` to `AssocTag`.
Removed `find_by_name_and_kinds`, which is unused.
`AssocItem::descr` can now distinguish between methods and associated
functions, which slightly improves some error messages.
|
|
To avoid unnecessary interning.
|
|
We didn't include them in the sorted closures list, therefore didn't analyze them, then failed to find them.
|
|
compiletest: consistently use `camino::{Utf8Path,Utf8PathBuf}` throughout
compiletest already practically assumes UTF-8 paths everywhere. Use `camino`'s `{Utf8Path,Utf8PathBuf}` consistently throughout compiletest to enforce UTF-8 path assumptions.
r? ```@Kobzol``` (or compiler/bootstrap)
|
|
nnethercote:rm-Nonterminal-and-TokenKind-Interpolated, r=petrochenkov
Remove `Nonterminal` and `TokenKind::Interpolated`
A third attempt at this; the first attempt was #96724 and the second was #114647.
r? `@ghost`
|
|
|
|
|
|
|
|
Remove old references to the HIR map.
|