Skip to content

Commit

Permalink
Small fix in build for dynamic rustyrts
Browse files Browse the repository at this point in the history
  • Loading branch information
hundsdor committed Jun 25, 2024
1 parent 92909bd commit 6035bdc
Show file tree
Hide file tree
Showing 5 changed files with 713 additions and 708 deletions.
4 changes: 2 additions & 2 deletions src/lab.rs
Original file line number Diff line number Diff line change
Expand Up @@ -248,7 +248,7 @@ fn test_scenario(
create_dir_all(Path::new(&(target_dir.clone() + "/.rts_dynamic"))).unwrap();

Some(vec![
("RUSTC_WRAPPER", rustyrts_bin),
("RUSTC", rustyrts_bin),
("CARGO_TARGET_DIR", target_dir),
("RUSTYRTS_ONLY_INSTRUMENTATION", "true".to_string()),
])
Expand Down Expand Up @@ -307,7 +307,7 @@ fn test_scenario(
create_dir_all(Path::new(&(target_dir.clone() + "/.rts_dynamic"))).unwrap();

Some(vec![
("RUSTC_WRAPPER", rustyrts_bin),
("RUSTC", rustyrts_bin),
("CARGO_TARGET_DIR", target_dir),
("RUSTYRTS_ONLY_INSTRUMENTATION", "true".to_string()),
])
Expand Down
9 changes: 7 additions & 2 deletions src/options.rs
Original file line number Diff line number Diff line change
Expand Up @@ -186,14 +186,19 @@ impl Options {
);

let json_args = if args.json {
vec!["-Zunstable-options", "--format=json", "--report-time"]
let mut vec = Vec::new();
if !args.cargo_test_args.iter().any(|s| s == "--") {
vec.push("--");
}
vec.extend_from_slice(&["-Zunstable-options", "--format=json", "--report-time"]);
vec
} else {
Vec::new()
};

let gitignore = {
match args.test_tool {
Some(TestTool::Dynamic) | Some(TestTool::Static) => false,
Some(TestTool::Dynamic | TestTool::Static) => false,
_ => args.gitignore,
}
};
Expand Down
Loading

0 comments on commit 6035bdc

Please sign in to comment.