diff --git a/scripts/test-image.sh b/scripts/test-image.sh index c314bc3..4a352db 100755 --- a/scripts/test-image.sh +++ b/scripts/test-image.sh @@ -25,17 +25,21 @@ function fail { exit -1 } -VIDEO=$(getent group video | sed -E 's,^video:[^:]*:([^:]*):.*$,\1,') +VIDEO=$(getent group video | sed -E 's,^video:[^:]*:([^:]*):.*$,\1,') +RENDER=$(getent group render | sed -E 's,^render:[^:]*:([^:]*):.*$,\1,') cat << EOF -Running test with video GID as ${VIDEO} +Running test with: + +video group : ${VIDEO} +render group: ${RENDER} ------------------------------------------------------------------------------- EOF -echo -e "Downloading test content: " +echo -n "Downloading test content: " mkdir $(pwd)/media wget -q -O $(pwd)/media/AUD_MW_E.264 \ https://fate-suite.libav.org/h264-conformance/AUD_MW_E.264 || @@ -43,10 +47,12 @@ wget -q -O $(pwd)/media/AUD_MW_E.264 \ chmod -R 777 $(pwd)/media || fail "Unable to set permissions" echo "done" -docker run --group-add ${VIDEO} \ - --rm \ - --device=/dev/dri \ - -e QSV_DEVICE=${QSV_DEVICE:-/dev/dri/renderD128} \ - --volume $(pwd)/media:/media \ - ${REGISTRY_URL}/${CONTAINER}:${TAG} \ - test || fail "Unable to execute 'test' on image." +docker run \ + --group-add ${VIDEO} \ + --group-add ${RENDER} \ + --rm \ + --device=/dev/dri \ + -e QSV_DEVICE=${QSV_DEVICE:-/dev/dri/renderD128} \ + --volume $(pwd)/media:/media \ + ${REGISTRY_URL}/${CONTAINER}:${TAG} \ + test || fail "Unable to execute 'test' on image."