about summary refs log tree commit diff
path: root/src/tools/miri/cargo-miri/src
AgeCommit message (Collapse)AuthorLines
2025-09-01improve output for 'cargo miri test --help'Ralf Jung-12/+27
2025-07-23CI: add windows-arm runnerRalf Jung-4/+4
2025-07-19move and update test dependenciesRalf Jung-3/+4
2025-07-01Update `cfg(bootstrap)`Josh Stone-5/+0
2025-06-24Avoid exporting panic_unwind as stdlib cargo featurebjorn3-1/+1
There is already panic-unwind to enable it.
2025-05-30cargo-miri: recognize --verbose alongside -vRalf Jung-1/+1
2025-05-18attempt to make doctests work properly with old and new cargoRalf Jung-2/+5
2025-05-17exlicitly pass -Zdoctest-xcompile to avoid cargo version behavior differencesRalf Jung-0/+2
2025-05-17fix for doctest-xcompile stabilizationRalf Jung-19/+24
2025-05-17fix clippy lintsRalf Jung-5/+3
2025-04-25Rollup merge of #137096 - ehuss:stabilize-doctest-xcompile, r=fmeaseMatthias Krüger-6/+6
Stabilize flags for doctest cross compilation This makes the following changes in preparation for supporting doctest cross-compiling in cargo: - Renames `--runtool` and `--runtool-arg` to `--test-runtool` and `--test-runtool-arg` to maintain consistency with other `--test-*` arguments. - Stabilizes the `--test-runtool` and `--test-runtool-arg`. These are needed in order to support cargo's `target.runner` option which specifies a runner to execute a cross-compiled doctest (for example, qemu). - Stabilizes the `--enable-per-target-ignores` flag by removing it and making it unconditionally enabled. This makes it possible to disable a doctest on a per-target basis, which I think will be helpful for rolling out this feature. These changes were suggested in https://rust-lang.zulipchat.com/#narrow/channel/266220-t-rustdoc/topic/stabilizing.20doctest.20xcompile/near/409281127 The intent is to stabilize the doctest-xcompile feature in cargo. This will help ensure that for projects that do cross-compile testing that their doctests are also covered. Currently there is a somewhat surprising behavior that they are ignored. Closes https://github.com/rust-lang/rust/issues/64245 try-job: x86_64-msvc-1
2025-03-27Rename `--runtool` and `--runtool-arg`Eric Huss-6/+6
This renames `--runtool` and `--runtool-arg` to `--test-runtool` and `--test-runtool-arg` to maintain consistency with other `--test-*` arguments.
2025-03-20Merge from rustcThe Miri Cronjob Bot-1/+1
2025-03-17replace config.toml to bootstrap.toml in src:toolsbit-aloo-1/+1
2025-03-02clippyRalf Jung-1/+1
2024-12-23remove many-seeds mode from cargo-miriRalf Jung-178/+94
2024-11-25attempt to fix miri failing to create file when under weird powershell ↵asquared31415-5/+8
configurations
2024-10-04clippyRalf Jung-1/+0
2024-09-29let rustfmt format importsRalf Jung-1/+2
2024-09-26clippyRalf Jung-0/+2
2024-08-10miri-script: use --remap-path-prefix to print errors relative to the right rootRalf Jung-5/+2
2024-07-30cargo-miri: better error when we seem to run inside bootstrap but something ↵Ralf Jung-1/+4
is wrong
2024-07-04Run tests for all specified targetsKonstantinos Andrikopoulos-8/+18
Currently cargo-miri uses the first target specified in the command line. However, when multiple targets are specified in a `cargo build` invocation, cargo will build for all of them. Miri should match this behaviour to reduce surprises. Fixes: #3460
2024-06-17tell people how to set miri flagsRalf Jung-0/+6
2024-06-13document --many-seeds; set the default range to 0..64Ralf Jung-1/+3
2024-06-13cargo miri: add support for '--many-seeds' to run the program / tests many ↵Ralf Jung-84/+152
times with different seeds
2024-05-28Fix "local crate" detectionPaul Gey-11/+9
`PackageId` is an opaque identifier whose internal format is subject to change, so looking up the names of local crates by ID is more robust than parsing the ID. Resolves #3643.
2024-05-26avoid using macro_useRalf Jung-5/+5
2024-05-19Rollup merge of #125286 - RalfJung:miri-sync, r=RalfJungMatthias Krüger-43/+44
Miri subtree update r? `@ghost`
2024-05-19properly print error in 'cargo miri setup --print-sysroot'Ralf Jung-39/+26
2024-05-18Fix typos (taking into account review comments)blyxyas-1/+1
2024-05-12Don't print unnecessary sysroot messagesBen Kimock-18/+32
2024-05-01fix usage example for `--print-sysroot`Paul Gey-1/+1
2024-05-01Don’t print `Preparing a sysroot` when `-q`/`--quiet` is passedPaul Gey-3/+8
2024-04-16avoid passing --sysroot twice in bootstrapRalf Jung-5/+8
2024-04-15Auto merge of #3411 - RalfJung:sysroot, r=RalfJungbors-7/+16
Handle Miri sysroot entirely outside the Miri driver (Extracted from https://github.com/rust-lang/miri/pull/3409) This entirely moves the responsibility of setting miri-sysroot to whatever *invokes* the Miri driver. cargo-miri knows whether it is inside rustdoc or not and can adjust accordingly. I previously avoided doing that because there are a bunch of places that are invoking the driver (cargo-miri, the ui test suite, `./miri run`, `./x.py run miri`) and they all need to be adjusted now. But it is also somewhat less fragile as we usually have more information there -- and we can just decide that `./miri run file.rs --sysroot path` is not supported. The advantage of this is that the driver is reasonably clean and doesn't need magic environment variables like MIRI_SYSROOT, and we don't have to fight rustc_driver to use a different default sysroot. Everything is done in cargo-miri (and the other much simpler driver wrappers) where it can hopefully be debugged much better.
2024-04-08set --sysroot outside the driver rather than messing with the arguments ↵Ralf Jung-7/+16
passed to the driver
2024-04-06MIRI_REPLACE_LIBRS_IF_NOT_TEST: also apply to crates.io cratesRalf Jung-7/+2
2024-04-05Revert "remove miri jobserver workaround"belovdv-0/+7
This reverts commit af81ab762888eb04d01e9ad5269df5202d6a38b8.
2024-04-05Auto merge of #123317 - RalfJung:test-in-miri, r=m-ou-se,saethlin,onur-ozkanbors-7/+46
Support running library tests in Miri This adds a new bootstrap subcommand `./x.py miri` which can test libraries in Miri. This is in preparation for eventually doing that as part of bors CI, but this PR only adds the infrastructure, and doesn't enable it yet. `@rust-lang/bootstrap` should this be `x.py test --miri library/core` or `x.py miri library/core`? The flag has the advantage that we don't have to copy all the arguments from `Subcommand::Test`. It has the disadvantage that most test steps just ignore `--miri` and still run tests the regular way. For clippy you went the route of making it a separate subcommand. ~~I went with a flag now as that seemed easier, but I can change this.~~ I made it a new subcommand. Note however that the regular cargo invocation would be `cargo miri test ...`, so `x.py` is still going to be different in that the `test` is omitted. That said, we could also make it `./x.py miri-test` to make that difference smaller -- that's in fact more consistent with the internal name of the command when bootstrap invokes cargo. `@rust-lang/libs` ~~unfortunately this PR does some unholy things to the `lib.rs` files of our library crates.~~ `@m-ou-se` found a way that entirely avoids library-level hacks, except for some new small `lib.miri.rs` files that hopefully you will never have to touch. There's a new hack in cargo-miri but there it is in good company...
2024-04-04remove miri jobserver workaroundbelovdv-7/+0
2024-04-03add 'x.py miri', and make it work for 'library/{core,alloc,std}'Ralf Jung-7/+46
2024-04-01Auto merge of #123192 - RalfJung:bootstrap-test-miri, r=onur-ozkanbors-6/+10
Refactor the way bootstrap invokes `cargo miri` Instead of basically doing `cargo run --manifest-path=<cargo-miri's manifest> -- miri`, let's invoke the `cargo-miri` binary directly. That means less indirections, and also makes it easier to e.g. run the libcore test suite in Miri. (But there are still other issues with that.) Also also adjusted Miri's stage numbering so that it is consistent with rustc/rustdoc. This also makes `./x.py test miri` honor `--no-doc`. And this fixes https://github.com/rust-lang/rust/issues/123177 by moving where we handle parallel_compiler.
2024-03-31cargo-miri: better debug output; reorder a comment to make it less confusingRalf Jung-6/+10
2024-03-29Merge from rustcThe Miri Cronjob Bot-3/+7
2024-03-26Rollup merge of #123055 - onur-ozkan:miri-rustdoc, r=RalfJungMatthias Krüger-3/+7
enable cargo miri test doctests This was the cleanest solution that came to my mind so far. cc `@RalfJung` Resolves #123028
2024-03-26avoid mutating the global environmentRalf Jung-11/+6
2024-03-26cargo-miri: clean up info_query treatment a bit, and update comment about RUSTCRalf Jung-30/+31
2024-03-26enable cargo miri test doctestsonur-ozkan-3/+7
Signed-off-by: onur-ozkan <work@onurozkan.dev>
2024-03-26we have to ignore RUSTC_WORKSPACE_WRAPPER as wellRalf Jung-0/+7