Skip to content

Commit 2aeb232

Browse files
committed
Auto merge of #2969 - oli-obk:run-dep, r=RalfJung
Stop parsing ui_test annotations in `run-dep` mode fixes #2967
2 parents 17e55fc + bf96df4 commit 2aeb232

File tree

4 files changed

+11
-10
lines changed

4 files changed

+11
-10
lines changed

Cargo.lock

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ libloading = "0.7"
3636

3737
[dev-dependencies]
3838
colored = "2"
39-
ui_test = "0.11.6"
39+
ui_test = "0.11.7"
4040
rustc_version = "0.4"
4141
# Features chosen to match those required by env_logger, to avoid rebuilds
4242
regex = { version = "1.5.5", default-features = false, features = ["perf", "std"] }

miri

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -325,6 +325,7 @@ run|run-dep)
325325
MIRIFLAGS="$MIRIFLAGS --target $MIRI_TEST_TARGET"
326326
fi
327327

328+
CARGO="$CARGO --quiet"
328329
# First build and get a sysroot.
329330
$CARGO build $CARGO_EXTRA_FLAGS --manifest-path "$MIRIDIR"/Cargo.toml
330331
find_sysroot

tests/compiletest.rs

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -275,13 +275,13 @@ fn main() -> Result<()> {
275275
fn run_dep_mode(target: String, mut args: impl Iterator<Item = OsString>) -> Result<()> {
276276
let path = args.next().expect("./miri run-dep must be followed by a file name");
277277
let mut config = test_config(&target, "", Mode::Yolo, /* with dependencies */ true);
278-
config.program.args.remove(0); // remove the `--error-format=json` argument
279-
config.program.args.push("--color".into());
280-
config.program.args.push("always".into());
281-
let mut cmd = ui_test::test_command(config, Path::new(&path))?;
282-
// Separate the arguments to the `cargo miri` invocation from
283-
// the arguments to the interpreted prog
284-
cmd.arg("--");
278+
config.program.args.clear(); // We want to give the user full control over flags
279+
config.build_dependencies_and_link_them()?;
280+
281+
let mut cmd = config.program.build(&config.out_dir);
282+
283+
cmd.arg(path);
284+
285285
cmd.args(args);
286286
if cmd.spawn()?.wait()?.success() { Ok(()) } else { std::process::exit(1) }
287287
}

0 commit comments

Comments
 (0)