Commit Graph

129 Commits

Author SHA1 Message Date
Ralf Jung
f6badf037e rustup 2022-08-01 09:27:34 -04:00
Aleksei Trifonov
01a6109925 Fix formatting 2022-07-29 14:42:42 +03:00
Aleksei Trifonov
38e7bcf7f1 Use cargo_metadata in cargo-miri 2022-07-29 05:25:59 +03:00
bors
a719c05816 Auto merge of #2426 - saethlin:unix-exec, r=RalfJung
Use real exec on cfg(unix) targets

Closes https://github.com/rust-lang/miri/issues/2421

The standard library has a platform extension trait that lets us get the behavior we want on cfg(unix), so why not use it?

I tried this out and it produces the correct behavior in concert with nextest.
2022-07-28 22:05:42 +00:00
Ben Kimock
622613f957 Use real exec on cfg(unix) targets
When cargo-miri is executed as a cargo test runner or rustdoc runtool,
external tools expect what they launch as the runner/runtool to be the
process actually running the test. But in the implementation, we launch
the Miri interpreter as a subprocess using std::process::Command. This
tends to confuse other tools (like nextest) and users (like the author).
What we really want is to call POSIX exec so that the cargo-miri process
becomes the interpreter.

So this implements just that; we call execve via a cfg(unix) extension
trait. Windows has no such mechanism, but it also doesn't have POSIX
signals, which is the primary tripping hazard this change fixes.
2022-07-26 23:34:20 -04:00
Ralf Jung
9406b6da68 fmt 2022-07-24 13:58:14 -04:00
Ralf Jung
d905901d65 make miri a better RUSTC by default inside cargo-miri
this requires a change in sysroot handling: miri driver now requires
MIRI_SYSROOT to be set when it is in 'target' mode, rather than relying on
`--sysroot` always being present.
2022-07-24 13:30:32 -04:00
bors
8fdb720329 Auto merge of #2430 - RalfJung:no-global-wrapper, r=RalfJung
attempt to overwrite globally set build.rustc-wrapper

Hopefully fixes https://github.com/rust-lang/miri/issues/2429
2022-07-24 00:35:28 +00:00
Ralf Jung
7267e0d4c5 attempt to test RUSTC and RUSTC_WRAPPER shenanigans on CI 2022-07-23 20:23:38 -04:00
Ralf Jung
25b11f6424 attempt to overwrite globally set build.rustc-wrapper 2022-07-23 19:22:02 -04:00
Ralf Jung
b93fcd99e8 avoid spurious 'Preparing a sysroot for Miri...' in 'cargo miri setup --print-sysroot'
also clean up sysroot building printing logic a bit
2022-07-23 18:04:06 -04:00
Ralf Jung
e14df05370 set runner for all targets via 'all()' 2022-07-23 17:46:02 -04:00
Ralf Jung
dd01870657 cargo-miri: use '--config target.runner' rather than the TARGET_RUNNER env vars 2022-07-23 17:36:42 -04:00
Ralf Jung
0c5392f435 now test-cargo-miri will actually work even without a hot cache :D 2022-07-23 14:35:17 -04:00
Ralf Jung
6c0398da7d don't dump xargo output onto users of 'cargo miri test' 2022-07-23 12:47:26 -04:00
Ralf Jung
83cbbd7bce support MIRI_HOST_SYSROOT env var for stage 0 builds
Together with a patch on the rustc side, this makes './x.py test src/tools/miri --stage 0' work again. :)
2022-07-22 08:35:12 -04:00
Ralf Jung
fb428dfee3 avoid redundant setting of env vars in phase_runner 2022-07-21 17:06:33 -04:00
Ralf Jung
7c99f90271 cargo-miri: clean up phase dispatching a bit 2022-07-21 17:06:32 -04:00
Ralf Jung
309413717f cargo-miri debugging improvements 2022-07-21 14:08:07 -04:00
Ralf Jung
bb52965b73 make the find_miri returned path actually exist 2022-07-21 10:36:55 -04:00
Ralf Jung
0a9feb3c9f some more debug output 2022-07-21 10:04:16 -04:00
Ralf Jung
929712c49c reduce chance of RUSTC collisions 2022-07-21 09:36:59 -04:00
Ralf Jung
800273c1d9 cargo-miri: set RUSTC to us 2022-07-21 09:20:46 -04:00
Rain
88ad9ca906 [cargo-miri] support nextest
Add the ability to run the `list` and `run` nextest commands, which
enable per-test isolation.
2022-07-20 18:44:20 -07:00
bors
7975391808 Auto merge of #2402 - RalfJung:cargo-target, r=RalfJung
cargo-miri: reorder --target to after the user-defined commands

This should help with https://github.com/rust-lang/miri/pull/2398.
2022-07-20 19:47:48 +00:00
Ralf Jung
c81cfe240a cargo-miri: reorder --target to after the user-defined commands 2022-07-20 15:47:09 -04:00
Oli Scherer
ab6fb9d2aa Allow tests to have dependencies 2022-07-20 15:54:35 +00:00
Ralf Jung
e12a721d84 no need for an exhaustive enum of subcommands 2022-07-20 07:42:56 -04:00
Ralf Jung
9dba78a76b show a better error when running Miri with the wrong sysroot 2022-07-19 14:14:20 -04:00
Ralf Jung
56fefe19bf cargo-miri: write the Xargo project files atomically 2022-07-18 20:19:02 -04:00
Oli Scherer
a9f9d48b1a Support no-std targets and test it in CI 2022-06-30 12:51:22 +00:00
Ralf Jung
6f7c0c0a2a revert --color=always changes 2022-06-29 10:14:26 -04:00
Ralf Jung
fed0e16397 don't assert the same thing twice 2022-06-25 20:02:03 -04:00
Ben Kimock
da6a78012a Actually pass through the request for --color=always 2022-06-24 23:08:18 -04:00
Ralf Jung
0eb8e60ed0 avoid setting both RUSTC and RUSTC_WRAPPER 2022-06-22 10:02:33 -07:00
Ben Kimock
6cd74ee9c7 Pass --color=always through cargo-miri 2022-06-20 11:02:56 -04:00
Ralf Jung
cca3dea379 update and move cargo-miri operational description 2022-06-07 13:59:47 -04:00
Ralf Jung
3d30aece83 clippy: cargo-miri 2022-06-04 13:37:37 -04:00
Ralf Jung
61265f5f19 fmt 2022-06-01 06:42:11 -04:00
Ralf Jung
81d661f134 bump xargo version, and tweak xargo caching 2022-06-01 06:28:27 -04:00
Ralf Jung
9a448744a2 different strategy for normalizing Rust stdlib path 2022-05-31 18:37:32 -04:00
Oli Scherer
f1756c3ddd Add a custom ui test runner and move all tests to it 2022-05-25 13:31:26 +00:00
Ben Kimock
65125df1cd Consider the cargo workspace when checking if a frame is local 2022-03-18 16:28:13 -04:00
Ralf Jung
e51810df2c add and document MIRI_LIB_SRC env var to set the source from which Miri builds the standard library 2021-12-23 16:04:09 +01:00
Ralf Jung
b44f7ea079 require xargo 0.3.23 2021-12-16 15:20:58 +01:00
Ralf Jung
a15539e911 run rustdoc with the miri cfg flag 2021-11-14 12:19:58 -05:00
Smitty
5aecd2811e One character aliases for cargo-miri run/test
The main `cargo` command supports `cargo r` as an alias for
`cargo run`, and `cargo t` as an alias for `cargo test`. This adds
support to them in cargo-miri for consistency.
2021-09-11 12:00:59 -04:00
Ralf Jung
cffa1d325c fmt cargo-miri 2021-07-11 14:27:07 +02:00
hyd-dev
e3fca9b3f1
Import std::process::self 2021-07-02 16:39:43 +08:00
hyd-dev
08236912a7
Improve doc comment 2021-06-27 23:10:09 +08:00