mirror of
https://github.com/trezor/trezor-firmware.git
synced 2024-11-16 04:29:08 +00:00
4264e87319
This enables to run device tests against an actual device connected to our CI. It uses https://github.com/mmahut/tpmb to enter bootloader and then it uploads a debug firmware to the device. The debug mode is the used to "click" the buttons but we might improve this and actually use the hardware buttons instead.
21 lines
616 B
Bash
Executable File
21 lines
616 B
Bash
Executable File
#!/usr/bin/env bash
|
|
if [ $# -ne 2 ]
|
|
then
|
|
echo "Usage: $0 commit_id [start|stop]"
|
|
fi
|
|
|
|
OUTPUTFILE=video_$1_$(date +%s).mp4
|
|
INPUTDEVICE=/dev/video0
|
|
|
|
if [ "$2" == "start" ]; then
|
|
echo "[software/video] Starting record to $OUTPUTFILE"
|
|
ffmpeg -loglevel panic -f oss -f video4linux2 -i $INPUTDEVICE \
|
|
-vf "drawtext=font=Dejavu Sans: \
|
|
text='$1 | %{localtime} | %{pts}': x=(w-tw)/2: y=h-(2*lh): fontcolor=white: box=1: boxcolor=0x00000000@1: fontsize=15" $OUTPUTFILE &
|
|
export VPID=$!
|
|
elif [ "$2" == "stop" ]; then
|
|
echo "[software/video] Stopping the recording of $OUTPUTFILE"
|
|
pkill ffmpeg
|
|
sync
|
|
fi
|