mirror of
https://github.com/microsoft/onefuzz.git
synced 2025-06-11 17:51:33 +00:00
Fix build checks
This commit is contained in:
@ -60,7 +60,7 @@ impl GetExpand for Config {
|
||||
.output_dir(&self.analysis.local_path)
|
||||
.set_optional(self.tools.clone().map(|t| t.local_path), Expand::tools_dir)
|
||||
.set_optional_ref(&self.reports, |expand, reports| {
|
||||
expand.reports_dir(&reports.local_path.as_path())
|
||||
expand.reports_dir(reports.local_path.as_path())
|
||||
})
|
||||
.set_optional_ref(&self.crashes, |expand, crashes| {
|
||||
expand
|
||||
@ -350,7 +350,7 @@ mod tests {
|
||||
let params = config.get_expand_fields();
|
||||
|
||||
for (param, expected) in params.iter() {
|
||||
let evaluated = expand.evaluate_value(format!("{}", param.get_string())).unwrap();
|
||||
let evaluated = expand.evaluate_value(param.get_string()).unwrap();
|
||||
assert_eq!(evaluated, *expected, "placeholder {} did not match expected value", param.get_string());
|
||||
}
|
||||
}
|
||||
|
@ -454,7 +454,7 @@ mod tests {
|
||||
let params = config.get_expand_fields();
|
||||
|
||||
for (param, expected) in params.iter() {
|
||||
let evaluated = expand.evaluate_value(format!("{}", param.get_string())).unwrap();
|
||||
let evaluated = expand.evaluate_value(param.get_string()).unwrap();
|
||||
assert_eq!(evaluated, *expected);
|
||||
}
|
||||
}
|
||||
|
@ -515,7 +515,7 @@ mod tests {
|
||||
let params = config.get_expand_fields();
|
||||
|
||||
for (param, expected) in params.iter() {
|
||||
let evaluated = expand.evaluate_value(format!("{}", param.get_string())).unwrap();
|
||||
let evaluated = expand.evaluate_value(param.get_string()).unwrap();
|
||||
assert_eq!(evaluated, *expected, "placeholder {} did not match expected value", param.get_string());
|
||||
}
|
||||
}
|
||||
|
@ -644,7 +644,7 @@ mod tests {
|
||||
let params = config.get_expand_fields();
|
||||
|
||||
for (param, expected) in params.iter() {
|
||||
let evaluated = expand.evaluate_value(format!("{}", param.get_string())).unwrap();
|
||||
let evaluated = expand.evaluate_value(param.get_string()).unwrap();
|
||||
assert_eq!(evaluated, *expected, "placeholder {} did not match expected value", param.get_string());
|
||||
}
|
||||
}
|
||||
|
@ -287,7 +287,7 @@ mod tests {
|
||||
let params = config.get_expand_fields();
|
||||
|
||||
for (param, expected) in params.iter() {
|
||||
let evaluated = expand.evaluate_value(format!("{}", param.get_string())).unwrap();
|
||||
let evaluated = expand.evaluate_value(param.get_string()).unwrap();
|
||||
assert_eq!(evaluated, *expected, "placeholder {} did not match expected value", param.get_string());
|
||||
}
|
||||
}
|
||||
|
@ -74,7 +74,7 @@ impl GetExpand for SupervisorConfig {
|
||||
expand.input_marker(input_marker)
|
||||
})
|
||||
.set_optional_ref(&self.target_options, |expand, target_options| {
|
||||
expand.target_options(&target_options)
|
||||
expand.target_options(target_options)
|
||||
})
|
||||
.set_optional_ref(&self.tools, |expand, tools| {
|
||||
expand.tools_dir(&tools.local_path)
|
||||
@ -301,7 +301,7 @@ async fn start_supervisor(
|
||||
expand.crashdumps(&crashdumps.local_path)
|
||||
})
|
||||
.set_optional_ref(&target_exe, |expand, target_exe| {
|
||||
expand.target_exe(&target_exe)
|
||||
expand.target_exe(target_exe)
|
||||
});
|
||||
|
||||
let supervisor_path = expand.evaluate_value(&config.supervisor_exe)?;
|
||||
@ -360,7 +360,7 @@ mod tests {
|
||||
if let Some(target_exe) = &self.target_exe {
|
||||
params.push((
|
||||
PlaceHolder::TargetExe,
|
||||
dunce::canonicalize(&target_exe)
|
||||
dunce::canonicalize(target_exe)
|
||||
.unwrap()
|
||||
.to_string_lossy()
|
||||
.to_string(),
|
||||
@ -431,7 +431,7 @@ mod tests {
|
||||
let params = config.get_expand_fields();
|
||||
|
||||
for (param, expected) in params.iter() {
|
||||
let evaluated = expand.evaluate_value(format!("{}", param.get_string())).unwrap();
|
||||
let evaluated = expand.evaluate_value(param.get_string()).unwrap();
|
||||
assert_eq!(evaluated, *expected, "placeholder {} did not match expected value", param.get_string());
|
||||
}
|
||||
}
|
||||
|
@ -244,7 +244,7 @@ mod tests {
|
||||
let params = config.get_expand_fields();
|
||||
|
||||
for (param, expected) in params.iter() {
|
||||
let evaluated = expand.evaluate_value(format!("{}", param.get_string())).unwrap();
|
||||
let evaluated = expand.evaluate_value(param.get_string()).unwrap();
|
||||
assert_eq!(evaluated, *expected, "placeholder {} did not match expected value", param.get_string());
|
||||
}
|
||||
}
|
||||
|
@ -60,7 +60,7 @@ pub struct Config {
|
||||
}
|
||||
|
||||
impl GetExpand for Config {
|
||||
fn get_expand<'a>(&'a self) -> Result<Expand<'a>> {
|
||||
fn get_expand(&self) -> Result<Expand<'_>> {
|
||||
let tools_dir = self.tools.local_path.to_string_lossy().into_owned();
|
||||
|
||||
Ok(self
|
||||
@ -70,7 +70,7 @@ impl GetExpand for Config {
|
||||
.target_options(&self.target_options)
|
||||
.tools_dir(tools_dir)
|
||||
.set_optional_ref(&self.reports, |expand, reports| {
|
||||
expand.reports_dir(&reports.local_path.as_path())
|
||||
expand.reports_dir(reports.local_path.as_path())
|
||||
})
|
||||
.set_optional_ref(&self.crashes, |expand, crashes| {
|
||||
expand
|
||||
@ -359,7 +359,7 @@ mod tests {
|
||||
let params = config.get_expand_fields();
|
||||
|
||||
for (param, expected) in params.iter() {
|
||||
let evaluated = expand.evaluate_value(format!("{}", param.get_string())).unwrap();
|
||||
let evaluated = expand.evaluate_value(param.get_string()).unwrap();
|
||||
assert_eq!(evaluated, *expected, "placeholder {} did not match expected value", param.get_string());
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user