Add video group from host
Signed-off-by: James Ketrenos <james.p.ketrenos@intel.com>
This commit is contained in:
parent
fa52c35027
commit
9d7b325a9d
@ -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 \
|
||||
--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"
|
||||
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."
|
||||
|
Loading…
x
Reference in New Issue
Block a user