Module selftest

Source
Expand description

simple-editor --selftest [dir] — headless end-to-end check (debug builds print to the console). Generates synthetic media with ffmpeg (solid colour segments + two sine audio streams), then verifies: probe → project layout; video decode at known times (colour & seek accuracy) for both backends; audio decode RMS; compositor (blend/opacity/text layer); mixer; waveform peaks; export (mp4) → ffprobe duration; lossless cut; xmeml is well-formed. Prints PASS/FAIL lines, returns 0 on success.

Round 3 adds headless checks that need no GL context: shape rasterising, the effect stack on the CPU, the mixer’s bus graph with a filter, an xmeml export imported back, the pre-render cache and markers / labels / paste-attributes.

Every step runs under catch_unwind, so a panic in one module is reported (FAIL — or SKIP when the module is still an unimplemented stub) and the remaining steps still run.

Macros§

check 🔒

Statics§

PANIC_AT 🔒
Last panic message + location, recorded by the quiet panic hook and printed in the FAIL line.

Functions§

bname 🔒
ff 🔒
Run ffmpeg with -y -v error + args; Err = last stderr text.
ffprobe_duration 🔒
is_green 🔒
is_red 🔒
near 🔒
px 🔒
rms 🔒
run
step 🔒
Run one step. A todo!() in a module that is not written yet is reported as SKIP (it is a gap, not a defect); everything else — a returned error or any other panic — is a FAIL.
wait_done 🔒
Poll until the worker finishes; Err on timeout, on a reported error, or when the worker thread vanished without finishing (its Arc clone dropped → nothing can ever set done).

Type Aliases§

R 🔒