summaryrefslogtreecommitdiff
path: root/test/simple_decoder.sh
diff options
context:
space:
mode:
authorJames Zern <jzern@google.com>2020-04-28 18:51:01 -0700
committerJames Zern <jzern@google.com>2020-04-28 18:51:01 -0700
commitb120ba5781a520c015b356a7c77c89545ccdee32 (patch)
treef52513afcd3d455867edc633f410edde32f2ee27 /test/simple_decoder.sh
parent3d28ff98039134325cf689d8d08996fc8dabb225 (diff)
downloadlibvpx-b120ba5781a520c015b356a7c77c89545ccdee32.tar
libvpx-b120ba5781a520c015b356a7c77c89545ccdee32.tar.gz
libvpx-b120ba5781a520c015b356a7c77c89545ccdee32.tar.bz2
libvpx-b120ba5781a520c015b356a7c77c89545ccdee32.zip
test/*.sh: add explicit error checks/returns
there was an assumption that function calls would terminate early with an error given 'set -e' was being used. this is true, but only when the function is part of a simple command otherwise it won't inherit the behavior. many of the call sites use 'func || return 1' syntax meaning the function would continue to completion return with the status of the last command executed. this hid errors with e.g., eval statements. inner calls within the functions are now explicitly tested for failure. BUG=aomedia:2669 Change-Id: Ie33a5ac4023dcc800bd302cb8cc54c6c3f2282f5
Diffstat (limited to 'test/simple_decoder.sh')
-rwxr-xr-xtest/simple_decoder.sh2
1 files changed, 1 insertions, 1 deletions
diff --git a/test/simple_decoder.sh b/test/simple_decoder.sh
index 7eeaf71b1..65fc4828e 100755
--- a/test/simple_decoder.sh
+++ b/test/simple_decoder.sh
@@ -38,7 +38,7 @@ simple_decoder() {
fi
eval "${VPX_TEST_PREFIX}" "${decoder}" "${input_file}" "${output_file}" \
- ${devnull}
+ ${devnull} || return 1
[ -e "${output_file}" ] || return 1
}