Auto merge of #2969 - oli-obk:run-dep, r=RalfJung
Stop parsing ui_test annotations in `run-dep` mode fixes #2967
This commit is contained in:
commit
2323ecbd4b
@ -842,9 +842,9 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "ui_test"
|
name = "ui_test"
|
||||||
version = "0.11.6"
|
version = "0.11.7"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "24a2e70adc9d18b9b4dd80ea57aeec447103c6fbb354a07c080adad451c645e1"
|
checksum = "c21899b59f53717dfad29e4f46e5b21a200a1b6888ab86532a07cfc8b48dd78c"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"bstr",
|
"bstr",
|
||||||
"cargo-platform",
|
"cargo-platform",
|
||||||
|
@ -36,7 +36,7 @@ libloading = "0.7"
|
|||||||
|
|
||||||
[dev-dependencies]
|
[dev-dependencies]
|
||||||
colored = "2"
|
colored = "2"
|
||||||
ui_test = "0.11.6"
|
ui_test = "0.11.7"
|
||||||
rustc_version = "0.4"
|
rustc_version = "0.4"
|
||||||
# Features chosen to match those required by env_logger, to avoid rebuilds
|
# Features chosen to match those required by env_logger, to avoid rebuilds
|
||||||
regex = { version = "1.5.5", default-features = false, features = ["perf", "std"] }
|
regex = { version = "1.5.5", default-features = false, features = ["perf", "std"] }
|
||||||
|
@ -325,6 +325,7 @@ run|run-dep)
|
|||||||
MIRIFLAGS="$MIRIFLAGS --target $MIRI_TEST_TARGET"
|
MIRIFLAGS="$MIRIFLAGS --target $MIRI_TEST_TARGET"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
CARGO="$CARGO --quiet"
|
||||||
# First build and get a sysroot.
|
# First build and get a sysroot.
|
||||||
$CARGO build $CARGO_EXTRA_FLAGS --manifest-path "$MIRIDIR"/Cargo.toml
|
$CARGO build $CARGO_EXTRA_FLAGS --manifest-path "$MIRIDIR"/Cargo.toml
|
||||||
find_sysroot
|
find_sysroot
|
||||||
|
@ -275,13 +275,13 @@ fn main() -> Result<()> {
|
|||||||
fn run_dep_mode(target: String, mut args: impl Iterator<Item = OsString>) -> Result<()> {
|
fn run_dep_mode(target: String, mut args: impl Iterator<Item = OsString>) -> Result<()> {
|
||||||
let path = args.next().expect("./miri run-dep must be followed by a file name");
|
let path = args.next().expect("./miri run-dep must be followed by a file name");
|
||||||
let mut config = test_config(&target, "", Mode::Yolo, /* with dependencies */ true);
|
let mut config = test_config(&target, "", Mode::Yolo, /* with dependencies */ true);
|
||||||
config.program.args.remove(0); // remove the `--error-format=json` argument
|
config.program.args.clear(); // We want to give the user full control over flags
|
||||||
config.program.args.push("--color".into());
|
config.build_dependencies_and_link_them()?;
|
||||||
config.program.args.push("always".into());
|
|
||||||
let mut cmd = ui_test::test_command(config, Path::new(&path))?;
|
let mut cmd = config.program.build(&config.out_dir);
|
||||||
// Separate the arguments to the `cargo miri` invocation from
|
|
||||||
// the arguments to the interpreted prog
|
cmd.arg(path);
|
||||||
cmd.arg("--");
|
|
||||||
cmd.args(args);
|
cmd.args(args);
|
||||||
if cmd.spawn()?.wait()?.success() { Ok(()) } else { std::process::exit(1) }
|
if cmd.spawn()?.wait()?.success() { Ok(()) } else { std::process::exit(1) }
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user