Skip to content

armgit / Cap

Public Imported from GitHub
0

Open source Loom alternative. Beautiful, shareable screen recordings.

test(cap-test): register av-step suites in CLI

Richie McIlroydca48a3a0c3d
diff --git a/crates/cap-test/src/main.rs b/crates/cap-test/src/main.rs
index c92ff0f77..4f6e4dbbd 100644
--- a/crates/cap-test/src/main.rs
+++ b/crates/cap-test/src/main.rs
@@ -291,11 +291,13 @@ async fn cmd_suite(
}
"sync" => suites::run_sync_suite(&hardware, duration).await?,
"av-alignment" => suites::run_av_alignment_suite(&hardware, duration).await?,
+ "av-step" => suites::run_av_step_suite(&hardware, duration).await?,
+ "av-step-instant" => suites::run_av_step_instant_suite(&hardware, duration).await?,
"drift" => suites::run_drift_suite(&hardware, duration).await?,
"kill9-crash-test" | "kill9" => suites::run_kill9_crash_suite(&hardware, duration).await?,
_ => {
anyhow::bail!(
- "Unknown suite: {}. Available: recording, encoding, playback, performance, sync, av-alignment, drift, kill9-crash-test",
+ "Unknown suite: {}. Available: recording, encoding, playback, performance, sync, av-alignment, av-step, av-step-instant, drift, kill9-crash-test",
name
);
}
diff --git a/crates/cap-test/src/suites/av_alignment.rs b/crates/cap-test/src/suites/av_alignment.rs
index db3bae26b..995d63dca 100644
--- a/crates/cap-test/src/suites/av_alignment.rs
+++ b/crates/cap-test/src/suites/av_alignment.rs
@@ -144,6 +144,7 @@ async fn run_single_measurement(
target_fps,
duration: Duration::from_secs(duration_secs),
include_mic: true,
+ include_camera: false,
include_system_audio: true,
fragmented: true,
};
diff --git a/crates/cap-test/src/suites/drift.rs b/crates/cap-test/src/suites/drift.rs
index 9829f9806..c7f72b5f5 100644
--- a/crates/cap-test/src/suites/drift.rs
+++ b/crates/cap-test/src/suites/drift.rs
@@ -158,6 +158,7 @@ async fn run_drift_measurement(
target_fps,
duration: Duration::from_secs(duration_secs),
include_mic: true,
+ include_camera: false,
include_system_audio: false,
fragmented: true,
};
diff --git a/crates/cap-test/src/suites/kill9.rs b/crates/cap-test/src/suites/kill9.rs
index 3c640e1f3..b6ecb8fb9 100644
--- a/crates/cap-test/src/suites/kill9.rs
+++ b/crates/cap-test/src/suites/kill9.rs
@@ -307,6 +307,7 @@ pub async fn run_record_harness(args: RecordHarnessArgs) -> Result<()> {
target_fps: args.fps,
duration: Duration::from_secs(args.max_duration_secs),
include_mic: args.include_mic,
+ include_camera: false,
include_system_audio: args.include_system_audio,
fragmented: true,
};
diff --git a/crates/cap-test/src/suites/mod.rs b/crates/cap-test/src/suites/mod.rs
index 9cf3f0561..1118d7eba 100644
--- a/crates/cap-test/src/suites/mod.rs
+++ b/crates/cap-test/src/suites/mod.rs
@@ -1,4 +1,5 @@
mod av_alignment;
+mod av_step;
mod drift;
mod encoding;
pub mod ffprobe_ext;
@@ -64,6 +65,20 @@ pub async fn run_drift_suite(hardware: &DiscoveredHardware, duration: u64) -> Re
drift::run_suite(hardware, duration).await
}
+pub async fn run_av_step_suite(
+ hardware: &DiscoveredHardware,
+ duration: u64,
+) -> Result<TestResults> {
+ av_step::run_suite(hardware, duration, av_step::RecordMode::Studio).await
+}
+
+pub async fn run_av_step_instant_suite(
+ hardware: &DiscoveredHardware,
+ duration: u64,
+) -> Result<TestResults> {
+ av_step::run_suite(hardware, duration, av_step::RecordMode::Instant).await
+}
+
pub async fn run_kill9_crash_suite(
hardware: &DiscoveredHardware,
duration: u64,