From 72fb6f4090e16695e2e1c4548fbd09b9a161dbc3 Mon Sep 17 00:00:00 2001 From: Naresh Kamboju Date: Tue, 26 Mar 2019 12:19:33 +0530 Subject: v4l2-compliance: results parser fix up Three issues have been fixed in this patch 1) Fixed results parser 2) -n instead of ! -z 3) shellcheck disabled Signed-off-by: Naresh Kamboju --- automated/linux/v4l2/v4l2-compliance.sh | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'automated/linux/v4l2') diff --git a/automated/linux/v4l2/v4l2-compliance.sh b/automated/linux/v4l2/v4l2-compliance.sh index 9af7acfe..7aaa6e12 100755 --- a/automated/linux/v4l2/v4l2-compliance.sh +++ b/automated/linux/v4l2/v4l2-compliance.sh @@ -1,5 +1,6 @@ #!/bin/sh +# shellcheck disable=SC1091 . ../../lib/sh-test-lib OUTPUT="$(pwd)/output" export RESULT_FILE="${OUTPUT}/result.txt" @@ -43,7 +44,7 @@ if [ -n "${VIDEO_DRIVER}" ] && ! lsmod | grep "${VIDEO_DRIVER%.*}"; then exit_on_fail "modprobe-${VIDEO_DRIVER%.*}" fi -if [ ! -z "${VIDEO_DEVICE}" ] && [ -e "${VIDEO_DEVICE}" ]; then +if [ -n "${VIDEO_DEVICE}" ] && [ -e "${VIDEO_DEVICE}" ]; then info_msg "Running v4l2-compliance device test..." LOG_FILE="${OUTPUT}/${TEST_SUITE}-output.txt" test_cmd="v4l2-compliance -v -d ${VIDEO_DEVICE} 2>&1" @@ -60,5 +61,6 @@ grep -e FAIL -e OK "${LOG_FILE}" | \ -e 's/ (Not Supported)//' \ -e 's/ /_/g' \ -e 's/:_/ /' \ - -e 's/ OK/ PASS/' \ + -e 's/ OK/ pass/' \ + -e 's/ FAIL/ fail/' \ >> "${RESULT_FILE}" -- cgit v1.2.3