aboutsummaryrefslogtreecommitdiff
path: root/automated/linux/v4l2
diff options
context:
space:
mode:
authorNaresh Kamboju <naresh.kamboju@linaro.org>2019-03-26 12:19:33 +0530
committerChase Qi <chase.qi@linaro.org>2019-03-26 17:23:22 +0800
commit72fb6f4090e16695e2e1c4548fbd09b9a161dbc3 (patch)
tree33c9a298ead0e77063098b3ba772f6495335fc39 /automated/linux/v4l2
parent9b6adde3e394da438df6382072a921dfdece4dc8 (diff)
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 <naresh.kamboju@linaro.org>
Diffstat (limited to 'automated/linux/v4l2')
-rwxr-xr-xautomated/linux/v4l2/v4l2-compliance.sh6
1 files changed, 4 insertions, 2 deletions
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}"