From: James Zern Date: Wed, 8 Apr 2015 18:45:04 +0000 (-0700) Subject: vpxdec.sh: fix vp9_webm_less_than_50_frames w/valgrind X-Git-Tag: v1.5.0~778^2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=aac3adb3c54af4b7435578d2150af2f8cc82aa76;p=platform%2Fupstream%2Flibvpx.git vpxdec.sh: fix vp9_webm_less_than_50_frames w/valgrind add a check for the status line to awk and better report failure given the program output will be lost in this case Change-Id: I1348a80108c81099d609f2e2227dd2c31bd8cd54 --- diff --git a/test/vpxdec.sh b/test/vpxdec.sh index 2f23ca7..de51c80 100755 --- a/test/vpxdec.sh +++ b/test/vpxdec.sh @@ -96,9 +96,14 @@ vpxdec_vp9_webm_less_than_50_frames() { if [ "$(vpxdec_can_decode_vp9)" = "yes" ] && \ [ "$(webm_io_available)" = "yes" ]; then local readonly decoder="$(vpx_tool_path vpxdec)" - eval "${VPX_TEST_PREFIX}" "${decoder}" "${VP9_LT_50_FRAMES_WEBM_FILE}" \ - --summary --noblit 2>&1 \ - | awk '{ exit $1 != 10; }' + local readonly expected=10 + local readonly num_frames=$(${VPX_TEST_PREFIX} "${decoder}" \ + "${VP9_LT_50_FRAMES_WEBM_FILE}" --summary --noblit 2>&1 \ + | awk '/^[0-9]+ decoded frames/ { print $1 }') + if [ "$num_frames" -ne "$expected" ]; then + elog "Output frames ($num_frames) != expected ($expected)" + return 1 + fi fi }