Merge pull request #324 from iannitram/fix/gate-on-windows-and-rust-1.95
Make cargo xtask ci pass on Windows, and on Rust 1.95
This commit is contained in:
commit
cd1ddff0c0
|
|
@ -1148,7 +1148,10 @@ mod save_tests {
|
|||
open_session(&mut missing, &path("A/A.scraft")).unwrap();
|
||||
save_session(&mut missing, &path("B/Moved.scraft")).unwrap();
|
||||
let mut r = Engine::default();
|
||||
assert_eq!(open_session(&mut r, &path("B/Moved.scraft")).unwrap(), vec![dir.join("A/Audio Files/Audio 1_02.wav").display().to_string()]);
|
||||
assert_eq!(
|
||||
open_session(&mut r, &path("B/Moved.scraft")).unwrap(),
|
||||
vec![dir.join("A").join("Audio Files/Audio 1_02.wav").display().to_string()]
|
||||
);
|
||||
let _ = std::fs::remove_dir_all(&dir);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1392,10 +1392,8 @@ impl SampleEntry {
|
|||
CodecConfig::Aac(c) => {
|
||||
b.leaf(b"esds", &esds_payload(0x40, &c.asc, c.max_bitrate, c.avg_bitrate, c.buffer_size));
|
||||
}
|
||||
CodecConfig::Mp3 => {
|
||||
if format == *b"mp4a" {
|
||||
b.leaf(b"esds", &esds_payload(0x6B, &[], 0, 0, 0));
|
||||
}
|
||||
CodecConfig::Mp3 if format == *b"mp4a" => {
|
||||
b.leaf(b"esds", &esds_payload(0x6B, &[], 0, 0, 0));
|
||||
}
|
||||
CodecConfig::Alac { cookie } => {
|
||||
let m = b.start_full(b"alac", 0, 0);
|
||||
|
|
|
|||
|
|
@ -294,11 +294,13 @@ mod tests {
|
|||
let _ = std::fs::remove_dir_all(&d);
|
||||
}
|
||||
|
||||
// Unix only: the test points a ".vst3" at a system library through a symlink.
|
||||
#[cfg(unix)]
|
||||
#[test]
|
||||
fn a_real_library_without_the_vst3_export_is_rejected() {
|
||||
// A system library loads fine but has no `GetPluginFactory`.
|
||||
// (macOS system libraries live only in the dyld shared cache, not as files.)
|
||||
let lib = if cfg!(target_os = "macos") || cfg!(windows) {
|
||||
let lib = if cfg!(target_os = "macos") {
|
||||
None
|
||||
} else {
|
||||
["/lib/x86_64-linux-gnu/libz.so.1", "/usr/lib/libz.so.1", "/lib64/libz.so.1"].iter().map(PathBuf::from).find(|p| p.exists())
|
||||
|
|
@ -308,12 +310,9 @@ mod tests {
|
|||
let _ = std::fs::remove_dir_all(&d);
|
||||
std::fs::create_dir_all(&d).unwrap();
|
||||
// Point a single-file ".vst3" at it via a symlink (no copying of binaries).
|
||||
#[cfg(unix)]
|
||||
{
|
||||
std::os::unix::fs::symlink(&lib, d.join("z.vst3")).unwrap();
|
||||
let e = load_bundle(&d.join("z.vst3")).unwrap_err();
|
||||
assert!(e.to_string().contains("not a VST3 plugin"), "{e}");
|
||||
}
|
||||
std::os::unix::fs::symlink(&lib, d.join("z.vst3")).unwrap();
|
||||
let e = load_bundle(&d.join("z.vst3")).unwrap_err();
|
||||
assert!(e.to_string().contains("not a VST3 plugin"), "{e}");
|
||||
let _ = std::fs::remove_dir_all(&d);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -52,7 +52,7 @@ fn audio_bus(bus: *mut BusInfo, dir: BusDirection, name: &str) {
|
|||
b.channelCount = 2;
|
||||
copy_c16(name, &mut b.name);
|
||||
b.busType = BusTypes_::kMain as BusType;
|
||||
b.flags = BusInfo_::BusFlags_::kDefaultActive;
|
||||
b.flags = BusInfo_::BusFlags_::kDefaultActive as u32;
|
||||
}
|
||||
|
||||
unsafe fn channels<'a>(bus: &AudioBusBuffers, frames: usize) -> Vec<&'a mut [f32]> {
|
||||
|
|
@ -461,7 +461,7 @@ impl IComponentTrait for Synth {
|
|||
b.channelCount = 16;
|
||||
copy_c16("Notes", &mut b.name);
|
||||
b.busType = BusTypes_::kMain as BusType;
|
||||
b.flags = BusInfo_::BusFlags_::kDefaultActive;
|
||||
b.flags = BusInfo_::BusFlags_::kDefaultActive as u32;
|
||||
return kResultOk;
|
||||
}
|
||||
kInvalidArgument
|
||||
|
|
|
|||
|
|
@ -38,7 +38,13 @@ fn main() {
|
|||
assert!(up_front.status.success(), "shutdown before exit: {:?}\n{}", up_front.status, String::from_utf8_lossy(&up_front.stderr));
|
||||
let too_late = run("exit-handler");
|
||||
let err = String::from_utf8_lossy(&too_late.stderr);
|
||||
assert_eq!(too_late.status.code(), Some(3), "the exit handler alone comes too late: {err}");
|
||||
assert!(err.contains("module exit after the process exit tore down state"), "{err}");
|
||||
if cfg!(windows) {
|
||||
// Windows runs the executable's exit handlers before a DLL's own, so the fixture's late
|
||||
// state is still there when the host's exit handler runs its module exit.
|
||||
assert!(too_late.status.success(), "the exit handler alone: {:?}\n{err}", too_late.status);
|
||||
} else {
|
||||
assert_eq!(too_late.status.code(), Some(3), "the exit handler alone comes too late: {err}");
|
||||
assert!(err.contains("module exit after the process exit tore down state"), "{err}");
|
||||
}
|
||||
println!("module_exit_shutdown: ok");
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue