test(oak-render): make frame-path and worker-bin tests platform-neutral
Windows CI exposed two assertions that assumed POSIX paths:
frame_filename was checked with ends_with("/450") (separator is '\\'
there) and the OAK_WORKER_BIN override used /bin/sh, which never exists
on Windows so the sibling probe legitimately won. Compare the last path
component and point the override at the test executable instead.
This commit is contained in:
@@ -1147,7 +1147,13 @@ mod tests {
|
||||
let mut with_tb = tb_cache();
|
||||
with_tb.validate(TimeRange::new(Rational::new(0, 1), Rational::new(16, 1)));
|
||||
let name = with_tb.frame_filename(Rational::new(15, 1)).expect("cached");
|
||||
assert!(name.ends_with("/450"), "{name}");
|
||||
assert_eq!(
|
||||
std::path::Path::new(&name)
|
||||
.file_name()
|
||||
.and_then(|n| n.to_str()),
|
||||
Some("450"),
|
||||
"{name}"
|
||||
);
|
||||
|
||||
let path = PlaybackCache::frame_cache_path(
|
||||
"/cache",
|
||||
@@ -1180,7 +1186,13 @@ mod tests {
|
||||
c.set_saving_enabled(false);
|
||||
c.validate(TimeRange::new(Rational::new(0, 1), Rational::new(4, 1)));
|
||||
let name = c.frame_filename(Rational::new(1, 2)).expect("cached");
|
||||
assert!(name.ends_with("/1"), "{name}");
|
||||
assert_eq!(
|
||||
std::path::Path::new(&name)
|
||||
.file_name()
|
||||
.and_then(|n| n.to_str()),
|
||||
Some("1"),
|
||||
"{name}"
|
||||
);
|
||||
assert!(name.contains(c.uuid()), "{name}");
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user