Skip to content

Commit

Permalink
Auto merge of rust-lang#3199 - Jefffrey:fix-doc-and-script, r=RalfJung
Browse files Browse the repository at this point in the history
Fix miri script target dir and update doc link

Fix ui_test doc link in `CONTRIBUTING.md`

Explicitly set `--target-dir` in `miri` script when building to expected location

- I have `build.target-dir` cargo config set to be some other location so miri script was erroring out since compiled binary was not in expected location
  • Loading branch information
bors committed Dec 10, 2023
2 parents 92ab9d6 + 8907858 commit 7d0994c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/tools/miri/CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ to run the other checks while ignoring the ui output, use `MIRI_SKIP_UI_CHECKS=1

For more info on how to configure ui tests see [the documentation on the ui test crate][ui_test]

[ui_test]: ui_test/README.md
[ui_test]: https://github.com/oli-obk/ui_test/blob/main/README.md

### Testing `cargo miri`

Expand Down
5 changes: 3 additions & 2 deletions src/tools/miri/miri
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,6 @@
set -e
# Instead of doing just `cargo run --manifest-path .. $@`, we invoke miri-script binary directly. Invoking `cargo run` goes through
# rustup (that sets it's own environmental variables), which is undesirable.
cargo build $CARGO_EXTRA_FLAGS -q --manifest-path "$(dirname "$0")"/miri-script/Cargo.toml
"$(dirname "$0")"/miri-script/target/debug/miri-script "$@"
MIRI_SCRIPT_TARGET_DIR="$(dirname "$0")"/miri-script/target
cargo build $CARGO_EXTRA_FLAGS -q --target-dir "$MIRI_SCRIPT_TARGET_DIR" --manifest-path "$(dirname "$0")"/miri-script/Cargo.toml
"$MIRI_SCRIPT_TARGET_DIR"/debug/miri-script "$@"

0 comments on commit 7d0994c

Please sign in to comment.