Skip to content

armgit / Cap

Public Imported from GitHub
0

Open source Loom alternative. Beautiful, shareable screen recordings.

test(verify): opt-in 30-minute Studio and Instant soak recordings

Richie McIlroy2d3b660503eb
diff --git a/.github/workflows/verify-recording.yml b/.github/workflows/verify-recording.yml
index 28a0af887..58159a2e7 100644
--- a/.github/workflows/verify-recording.yml
+++ b/.github/workflows/verify-recording.yml
@@ -51,6 +51,9 @@ on:
type: choice
options: [blacksmith, hosted, both]
default: blacksmith
+ soak_secs:
+ description: "Adds the recording/soak/* cases at this length (seconds, at most 1800); set case_filter to recording/soak/* to run only them"
+ default: ""
schedule:
- cron: "41 3 * * *"
pull_request:
@@ -149,13 +152,14 @@ jobs:
matrix:
runner: ${{ fromJSON(needs.scope.outputs.runners) }}
runs-on: ${{ matrix.runner }}
- timeout-minutes: 45
+ timeout-minutes: ${{ inputs.soak_secs != '' && 180 || 45 }}
env:
CAP_VERIFY_CAPTURE: display
CAP_VERIFY_REQUIRE_CAPTURE: "1"
CAP_VERIFY_TIER: ${{ needs.scope.outputs.tier }}
CAP_VERIFY_REPEAT: ${{ inputs.repeat || (github.event_name == 'schedule' && '3') || '1' }}
CAP_VERIFY_CASE: ${{ inputs.case_filter || '' }}
+ CAP_VERIFY_SOAK_SECS: ${{ inputs.soak_secs || '' }}
CAP_VERIFY_KEEP: ${{ inputs.keep_artifacts && '1' || '' }}
CAP_VERIFY_SCRATCH: ${{ github.workspace }}/verify-scratch
CAP_VERIFY_REPORT_DIR: ${{ github.workspace }}/verify-report
diff --git a/crates/verify/tests/recording.rs b/crates/verify/tests/recording.rs
index 33c4a3a16..639c99c84 100644
--- a/crates/verify/tests/recording.rs
+++ b/crates/verify/tests/recording.rs
@@ -114,7 +114,7 @@ struct Spec {
}
fn specs() -> Vec<Spec> {
- vec![
+ let mut specs = vec![
Spec {
id: "recording/studio-screen/fragmented",
tier: Tier::Fast,
@@ -289,6 +289,55 @@ fn specs() -> Vec<Spec> {
mic: true,
system_audio: true,
},
+ ];
+ specs.extend(soak_specs());
+ specs
+}
+
+/// `CAP_VERIFY_SOAK_SECS=<seconds>` adds a long Studio recording with a
+/// camera and a long Instant recording, for drift, frame loss and memory over
+/// a real session length (up to 30 minutes: past that the microphone's
+/// marker indices run out). Run them with `CAP_VERIFY_TIER=full` and
+/// `CAP_VERIFY_CASE='recording/soak/*'`.
+fn soak_specs() -> Vec<Spec> {
+ let Some(seconds) = std::env::var("CAP_VERIFY_SOAK_SECS")
+ .ok()
+ .and_then(|v| v.parse::<f64>().ok())
+ .filter(|&s| s > 0.0)
+ else {
+ return vec![];
+ };
+ let seconds = seconds.min(1800.0);
+ vec![
+ Spec {
+ id: "recording/soak/studio-camera",
+ tier: Tier::Full,
+ mode: Mode::Studio {
+ fragmented: true,
+ camera: true,
+ },
+ seconds,
+ stimulus_fps: STIMULUS_FPS_30,
+ holds: vec![(seconds / 3.0, 3.0), (2.0 * seconds / 3.0, 10.0)],
+ camera_drops_at: vec![],
+ gated: true,
+ mic_delay: 0.0,
+ mic: true,
+ system_audio: true,
+ },
+ Spec {
+ id: "recording/soak/instant",
+ tier: Tier::Full,
+ mode: Mode::Instant,
+ seconds,
+ stimulus_fps: STIMULUS_FPS_30,
+ holds: vec![(seconds / 2.0, 5.0)],
+ camera_drops_at: vec![],
+ gated: true,
+ mic_delay: 0.0,
+ mic: true,
+ system_audio: true,
+ },
]
}