add LEGACY LINKER conditional for test runs

This commit is contained in:
Luke Boswell 2024-08-18 16:27:30 +10:00
parent 93a4c58798
commit 0e917be911
No known key found for this signature in database
GPG key ID: F6DB3C9DB47377B0
2 changed files with 70 additions and 15 deletions

View file

@ -63,7 +63,7 @@ impl Out {
}
pub fn assert_nonzero_exit(&self) {
assert_eq!(self.status.success(), false);
assert!(!self.status.success());
}
/// Assert that the command succeeded and that there are no unexpected errors in the stderr.
@ -225,6 +225,16 @@ impl Run {
self
}
pub fn add_arg_if<S>(mut self, arg: S, enabled: bool) -> Self
where
S: Into<OsString>,
{
if enabled {
self.args.push(arg.into());
}
self
}
pub fn get_args(&self) -> impl Iterator<Item = &OsStr> {
self.args.iter().map(Deref::deref)
}