facecam-harness

Automated compatibility and stability testing. Produces machine-readable reports.

Usage

facecam-harness [--device /dev/video0] [--json] [-v] <command>

Commands

full

Runs the complete test suite:

$ facecam-harness full

  Running: device_detection ...
  [PASS] device_detection (45ms)
  Running: format_enumeration ...
  [PASS] format_enumeration (12ms)
  Running: control_enumeration ...
  [PASS] control_enumeration (8ms)
  Running: format_negotiation ...
  [PASS] format_negotiation (23ms)
  Running: open_close_cycles ...
  [PASS] open_close_cycles (1204ms)
  Running: control_roundtrip ...
  [PASS] control_roundtrip (15ms)
  Running: usb_topology ...
  [PASS] usb_topology (3ms)
  Running: kernel_modules ...
  [PASS] kernel_modules (1ms)

  8/8 passed, 0 failed

Individual Tests

facecam-harness formats                          # Format enumeration
facecam-harness open-close --cycles 50           # Open/close stability
facecam-harness controls                         # Control roundtrip
facecam-harness stream-stability --duration 300  # 5-minute soak test
facecam-harness recovery                         # USB reset test

report

List and view previous test reports:

facecam-harness report

Reports are saved to ~/.local/share/facecam/harness/harness-<timestamp>.json.

Test Matrix

The harness validates:

TestWhat it checks
device_detectionUSB enumeration finds Facecam with correct PID
format_enumerationV4L2 formats are listed, bogus ones flagged
control_enumerationAll expected controls are present
format_negotiationEach format can be set via VIDIOC_S_FMT
open_close_cyclesDevice survives N open/close cycles
control_roundtripSet/get control values match
usb_topologyDevice is on USB 3.0+
kernel_modulesuvcvideo loaded, v4l2loopback status
stream_stabilityDevice remains responsive over time
usb_recoveryUSB reset mechanism works

CI Integration

facecam-harness --json full > report.json
# Check exit code: 0 = all passed, 1 = failures