Files
fluster-tests/fluster.sh
T
2026-03-02 13:10:33 +02:00

58 lines
1.2 KiB
Bash
Executable File

#!/bin/sh
if [ "$1" = "" ]
then
echo "Usage: $0 machine [decoder]..."
exit 1
fi
if [ -d /sys/bus/platform/drivers/qcom-iris ] && [ "$(find /sys/bus/platform/drivers/qcom-iris -name "*.video-codec")" != "" ]
then
DRV=iris
elif [ -d /sys/bus/platform/drivers/qcom-venus ] && [ "$(find /sys/bus/platform/drivers/qcom-venus -name "*.video-codec")" != "" ]
then
DRV=venus
else
echo "$0: can't detect video driver, check that the device is bound"
exit 2
fi
MACHINE="$1"
SKIPFILE="$(dirname $0)/${DRV}-${MACHINE}-skip.txt"
if [ -r "${SKIPFILE}" ]
then
SKIPS="-sv $(cat "${SKIPFILE}")"
else
SKIPS=""
fi
SUMMARY="$DRV-$MACHINE.md"
# Default to system locaion
if [ -r fluster.py ]
then
echo "Generating $SUMMARY using fluster from the current location"
FLUSTER=./fluster.py
elif [ "$(which fluster)" != "" ]
then
echo "Generating $SUMMARY using system-wide fluster"
FLUSTER=fluster
else
echo "Couldn't find fluster"
exit 3
fi
DEFAULT_DECODERS=""
for codec in VP9 H.264 H.265
do
DEFAULT_DECODERS="${DEFAULT_DECODERS} FFmpeg-${codec}-v4l2m2m GStreamer-${codec}-V4L2-Gst1.0"
done
# Skip the machine
shift
set -x
exec ${FLUSTER} r -j 1 -s -so "${SUMMARY}" ${SKIPS} -d ${@:-${DEFAULT_DECODERS}}