feat #14740: updater and release scripts

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This commit is contained in:
hauke
2026-11-06 11:37:57 +01:00
co-authored by Claude Opus 5.5
parent 345dd01147
commit 74511d791a
15 changed files with 1157 additions and 10 deletions
+32
View File
@@ -616,6 +616,15 @@ impl AppState {
lock(&self.processing).remove(&id);
}
/// Whether a recording runs or starts, or a call is being processed (or
/// its remote jobs cleaned up). An update must not be installed then:
/// the installer ends the app.
pub fn recording_or_processing(&self) -> bool {
self.devices_busy.load(Ordering::SeqCst)
|| lock(&self.current).is_some()
|| !lock(&self.processing).is_empty()
}
/// Records both configured devices into a temporary directory for five
/// seconds and returns the peak level of each track.
pub fn test_devices(&self) -> Result<DeviceLevels, String> {
@@ -999,6 +1008,29 @@ mod tests {
assert_eq!(f.state.claim_processing(id, false), Ok(()));
}
#[test]
fn an_update_waits_while_a_call_is_processed() {
let f = fixture();
let (id, _, _) = finished_call(&f, "a");
assert!(!f.state.recording_or_processing());
f.state.claim_processing(id, false).unwrap();
assert!(f.state.recording_or_processing());
f.state.release_processing(id);
assert!(!f.state.recording_or_processing());
}
#[test]
fn an_update_waits_while_a_recording_starts() {
let f = fixture();
let claim = f
.state
.claim_devices("Es läuft bereits eine Aufnahme")
.unwrap();
assert!(f.state.recording_or_processing());
drop(claim);
assert!(!f.state.recording_or_processing());
}
#[test]
fn done_and_recording_calls_are_not_processed() {
let f = fixture();