diff options
author | James Zern <jzern@google.com> | 2020-04-28 18:51:01 -0700 |
---|---|---|
committer | James Zern <jzern@google.com> | 2020-04-28 18:51:01 -0700 |
commit | b120ba5781a520c015b356a7c77c89545ccdee32 (patch) | |
tree | f52513afcd3d455867edc633f410edde32f2ee27 /test/stress.sh | |
parent | 3d28ff98039134325cf689d8d08996fc8dabb225 (diff) | |
download | libvpx-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/stress.sh')
-rwxr-xr-x | test/stress.sh | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/test/stress.sh b/test/stress.sh index fdec764c7..b11c658a9 100755 --- a/test/stress.sh +++ b/test/stress.sh @@ -52,7 +52,7 @@ stress_verify_environment() { fi for file in "${YUV}" "${VP8}" "${VP9}"; do if [ ! -e "${file}" ] ; then - download_and_check_file "${file}" + download_and_check_file "${file}" || return 1 fi done if [ ! -e "${YUV}" ] || [ ! -e "${VP8}" ] || [ ! -e "${VP9}" ] ; then |