pub fn tiff_eds_path_if_available() -> Option<std::path::PathBuf> {
let path = std::path::Path::new(env!("CARGO_MANIFEST_DIR")).join("tiff-collection.eds");
let metadata = std::fs::metadata(&path).ok()?;
if metadata.len() < 4096 {
return None;
}
Some(path)
}
macro_rules! require_tiff_eds {
() => {
match crate::test_utils::tiff_eds_path_if_available() {
Some(p) => p,
None => {
eprintln!(
"Skipping {}: tiff-collection.eds not available (git-lfs not fetched?)",
module_path!()
);
return;
}
}
};
}
pub(crate) use require_tiff_eds;