1
0

Add video group from host

Signed-off-by: James Ketrenos <james.p.ketrenos@intel.com>
This commit is contained in:
James Ketrenos 2019-12-18 14:33:16 -08:00
parent fa52c35027
commit 9d7b325a9d

View File

@ -20,22 +20,33 @@ RELEASE_INFO=${RELEASE_INFO:-N/A}
docker pull ${REGISTRY_URL}/${CONTAINER}:${TAG}
echo "Downloading test content"
function fail {
>&2 echo "$*"
exit -1
}
VIDEO=$(getent group video | sed -E 's,^video:[^:]*:([^:]*):.*$,\1,')
cat << EOF
Running test with video GID as ${VIDEO}
-------------------------------------------------------------------------------
EOF
echo -e "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 ||
fail "Unable to download test content."
chmod -R 777 $(pwd)/media
docker run \
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 docker"
test || fail "Unable to execute 'test' on image."