Skip to content

Commit

Permalink
Update to not run infverif for samples
Browse files Browse the repository at this point in the history
  • Loading branch information
NateD-MSFT committed Apr 26, 2024
1 parent f760c30 commit b6e2951
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
1 change: 1 addition & 0 deletions crates/wdk-build/rust-driver-makefile.toml
Original file line number Diff line number Diff line change
Expand Up @@ -184,6 +184,7 @@ args = [
[tasks.infverif]
private = true
dependencies = ["stampinf"]
condition = { env_not_set = ["WDK_INF_NEW_VERSION"] }
command = "infverif"
args = [
"/v",
Expand Down
7 changes: 6 additions & 1 deletion crates/wdk-build/src/cargo_make.rs
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ const WDK_VERSION_ENV_VAR: &str = "WDK_VER";
const SAMPLE_ENV_VAR: &str = "WDK_INFVERIF_SAMPLE_FLAG";
/// The first WDK version with the new InfVerif behavior.
const WDK_INF_NEW_VERSION: i32 = 25798;
const WDK_INF_NEW_VERSION_FLAG: &str = "WDK_INF_NEW_VERSION";

/// The name of the environment variable that cargo-make uses during `cargo
/// build` and `cargo test` commands
Expand Down Expand Up @@ -533,7 +534,11 @@ pub fn set_sample_infverif<S: AsRef<str>>(version: S) -> Result<(), ConfigError>
false => "/msft",
};
std::env::set_var(&SAMPLE_ENV_VAR, &sample_flag);
forward_env_var_to_cargo_make(SAMPLE_ENV_VAR);
forward_env_var_to_cargo_make(&SAMPLE_ENV_VAR);
if version > WDK_INF_NEW_VERSION {
std::env::set_var(&WDK_INF_NEW_VERSION_FLAG, "true");
forward_env_var_to_cargo_make(&WDK_INF_NEW_VERSION_FLAG);
}
return Ok(());
}

Expand Down

0 comments on commit b6e2951

Please sign in to comment.