Skip to content
Open
28 changes: 16 additions & 12 deletions crates/cargo-wdk/src/actions/build/package_task.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
use std::{
ffi::{CStr, CString},
marker::PhantomData,
ops::RangeFrom,
ops::RangeInclusive,
path::{Path, PathBuf},
result::Result,
};
Expand Down Expand Up @@ -43,9 +43,9 @@ pub enum SignMode {
},
}

// FIXME: This range is inclusive of 25798. Update with range end after /sample
// flag is added to InfVerif CLI
const MISSING_SAMPLE_FLAG_WDK_BUILD_NUMBER_RANGE: RangeFrom<u32> = 25798..;
// InfVerif in WDK builds in this range is bugged and does not contain the
// /samples flag.
const MISSING_SAMPLE_FLAG_WDK_BUILD_NUMBER_RANGE: RangeInclusive<u32> = 25798..=26100;
Comment thread
svasista-ms marked this conversation as resolved.
const WDR_TEST_CERT_STORE: &str = "WDRTestCertStore";
const WDR_LOCAL_TEST_CERT: &str = "WDRLocalTestCert";
const STAMPINF_VERSION_ENV_VAR: &str = "STAMPINF_VERSION";
Expand Down Expand Up @@ -544,15 +544,19 @@ impl<'a> PackageTask<'a> {
fn run_infverif(&self) -> Result<(), PackageTaskError> {
let additional_args = if self.sample_class {
let wdk_build_number = self.wdk_build.detect_wdk_build_number()?;
if MISSING_SAMPLE_FLAG_WDK_BUILD_NUMBER_RANGE.contains(&wdk_build_number) {
debug!(
"InfVerif in WDK Build {wdk_build_number} is bugged and does not contain the \
/samples flag."
);
warn!("InfVerif skipped for samples class. WDK Build: {wdk_build_number}");
return Ok(());
match wdk_build_number {
n if MISSING_SAMPLE_FLAG_WDK_BUILD_NUMBER_RANGE.contains(&n) => {
debug!(
"InfVerif in WDK Build {wdk_build_number} is bugged and does not contain \
the /samples flag."
Comment on lines +550 to +551

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shouldn't this be "buggy" instead of "bugged"? Or does "bugged" have some other mearning in this specific context?

If you change this to "buggy" also make the same change in the comment above.

);
warn!("InfVerif skipped for samples class. WDK Build: {wdk_build_number}");
return Ok(());
}
// Use the `/samples` flag after the range and the `/msft` flag before the range
n if n > *MISSING_SAMPLE_FLAG_WDK_BUILD_NUMBER_RANGE.end() => "/samples",
_ => "/msft",
}
"/msft"
} else {
""
};
Expand Down
Loading
Loading