about summary refs log tree commit diff
path: root/src/tools/miri/tests
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2023-07-07 14:05:25 +0000
committerbors <bors@rust-lang.org>2023-07-07 14:05:25 +0000
commit2323ecbd4be4552a2065f160a173a700c93ba47d (patch)
tree57da340f85b7b15c2a0553eb30fda79851ec9acb /src/tools/miri/tests
parentfa6cf3f0f92e8536da894941881c953cb2284105 (diff)
parentc6f5b5f557e9df51822c27c82543ca371224ac6d (diff)
downloadrust-2323ecbd4be4552a2065f160a173a700c93ba47d.tar.gz
rust-2323ecbd4be4552a2065f160a173a700c93ba47d.zip
Auto merge of #2969 - oli-obk:run-dep, r=RalfJung
Stop parsing ui_test annotations in `run-dep` mode

fixes #2967
Diffstat (limited to 'src/tools/miri/tests')
-rw-r--r--src/tools/miri/tests/compiletest.rs14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/tools/miri/tests/compiletest.rs b/src/tools/miri/tests/compiletest.rs
index e07bb3c6efb..59143550253 100644
--- a/src/tools/miri/tests/compiletest.rs
+++ b/src/tools/miri/tests/compiletest.rs
@@ -275,13 +275,13 @@ fn main() -> 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 mut config = test_config(&target, "", Mode::Yolo, /* with dependencies */ true);
-    config.program.args.remove(0); // remove the `--error-format=json` argument
-    config.program.args.push("--color".into());
-    config.program.args.push("always".into());
-    let mut cmd = ui_test::test_command(config, Path::new(&path))?;
-    // Separate the arguments to the `cargo miri` invocation from
-    // the arguments to the interpreted prog
-    cmd.arg("--");
+    config.program.args.clear(); // We want to give the user full control over flags
+    config.build_dependencies_and_link_them()?;
+
+    let mut cmd = config.program.build(&config.out_dir);
+
+    cmd.arg(path);
+
     cmd.args(args);
     if cmd.spawn()?.wait()?.success() { Ok(()) } else { std::process::exit(1) }
 }