From 09ab6062ead0a4260ecb8be0d48389e5cf674650 Mon Sep 17 00:00:00 2001 From: James Ketrenos Date: Tue, 28 Jan 2020 11:42:07 -0800 Subject: [PATCH] Set data permissions and output some additional log info during test run Signed-off-by: James Ketrenos --- assets/commands/decode | 2 +- assets/commands/test | 7 ++++++- scripts/test-image.sh | 2 ++ 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/assets/commands/decode b/assets/commands/decode index ed2e38d..de59d77 100755 --- a/assets/commands/decode +++ b/assets/commands/decode @@ -79,7 +79,7 @@ QSV_DEVICE=${QSV_DEVICE:-/dev/dri/renderD128} [ ! -e /data/"${arguments[0]}" ] && { cat << EOF -Error: '${arguments[0]}' not found. +Error: '/data/${arguments[0]}' not found. Was the volume /data mounted when launching the container? diff --git a/assets/commands/test b/assets/commands/test index 100c2b9..48e1dd6 100755 --- a/assets/commands/test +++ b/assets/commands/test @@ -70,7 +70,7 @@ QSV_DEVICE=${QSV_DEVICE:-/dev/dri/renderD128} [ ! -d /data/. ] && { cat << EOF -Error: '/data/' found. +Error: '/data/' not found. Was the volume /data mounted when launching the container? @@ -114,6 +114,9 @@ Error: Unable to download AUD_WM_E.264 EOF exit 2 } + + echo "Download succeeded:" + ls -l /data } tests=( @@ -124,6 +127,8 @@ tests=( ) for test in "${tests[@]}"; do test=($test) + echo "Executing test: ${test}" + echo "----------------------------------------------------" /assets/commands/${test[*]} || { echo "Error: Test failed: ${test[*]}" exit 5 diff --git a/scripts/test-image.sh b/scripts/test-image.sh index 9281d9e..acc1e2b 100755 --- a/scripts/test-image.sh +++ b/scripts/test-image.sh @@ -35,6 +35,8 @@ ADD_GROUPS="--group-add ${VIDEO}" [[ -e data/ ]] && rm -rf data mkdir data || fail "Unable to make data volume directory" +chown :${VIDEO} data || fail "Unable to chown data volume to 'video' gid ${VIDEO}" +chmod g+rwX data || fail "Unable to chmod data volume to g+rwX" CMD="docker run \ ${ADD_GROUPS} \