Skip to content

Commit

Permalink
Fishy --dep fix, things were fishy before, too
Browse files Browse the repository at this point in the history
  • Loading branch information
oli-obk committed Sep 11, 2024
1 parent 044a9dc commit 6f9ca49
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 11 deletions.
11 changes: 7 additions & 4 deletions miri-script/src/commands.rs
Original file line number Diff line number Diff line change
Expand Up @@ -499,9 +499,12 @@ impl Command {
let mut early_flags = Vec::<OsString>::new();

// Add target, edition to flags.
if let Some(target) = &target {
early_flags.push("--target".into());
early_flags.push(target.into());
// For `--dep` we need to set the env var instead of passing the flag.
if !dep {
if let Some(target) = &target {
early_flags.push("--target".into());
early_flags.push(target.into());
}
}
if verbose {
early_flags.push("--verbose".into());
Expand Down Expand Up @@ -534,7 +537,7 @@ impl Command {
cmd.set_quiet(!verbose);
// Add Miri flags
let mut cmd = cmd.args(&miri_flags).args(&seed_flag).args(&early_flags).args(&flags);
// For `--dep` we also need to set the env var.
// For `--dep` we need to set the env var instead of passing the flag.
if dep {
if let Some(target) = &target {
cmd = cmd.env("MIRI_TEST_TARGET", target);
Expand Down
9 changes: 2 additions & 7 deletions tests/ui.rs
Original file line number Diff line number Diff line change
Expand Up @@ -106,13 +106,8 @@ fn miri_config(target: &str, path: &str, mode: Mode, with_dependencies: bool) ->
.map(Spanned::dummy)
.into();

config.comment_defaults.base().require_annotations = Spanned::dummy(match mode {
Mode::Pass => false,
Mode::Fail => true,
Mode::RunDep => false,
Mode::Panic => false,
})
.into();
config.comment_defaults.base().require_annotations =
Spanned::dummy(matches!(mode, Mode::Fail)).into();

config.comment_defaults.base().normalize_stderr =
stderr_filters().iter().map(|(m, p)| (m.clone(), p.to_vec())).collect();
Expand Down

0 comments on commit 6f9ca49

Please sign in to comment.