diff --git a/test/decode_to_md5.sh b/test/decode_to_md5.sh index f64acc8b0095f0a1c7df052b85004f6405c17454..28e29c683e1c97e2fab8f3526ee0dde3cd6823fd 100755 --- a/test/decode_to_md5.sh +++ b/test/decode_to_md5.sh @@ -34,7 +34,10 @@ decode_to_md5() { local expected_md5="$3" local output_file="${VPX_TEST_OUTPUT_DIR}/decode_to_md5_${codec}" - [ -x "${decoder}" ] || return 1 + if [ ! -x "${decoder}" ]; then + elog "${decoder} does not exist or is not executable." + return 1 + fi eval "${decoder}" "${input_file}" "${output_file}" ${devnull} diff --git a/test/decode_with_drops.sh b/test/decode_with_drops.sh index 82e934db245f1a4d4785d4bf54f430d62d71e3df..12e17de38cdaea0a74da9fa643fba016a7e651f5 100755 --- a/test/decode_with_drops.sh +++ b/test/decode_with_drops.sh @@ -34,7 +34,10 @@ decode_with_drops() { local output_file="${VPX_TEST_OUTPUT_DIR}/decode_with_drops_${codec}" local drop_mode="$3" - [ -x "${decoder}" ] || return 1 + if [ ! -x "${decoder}" ]; then + elog "${decoder} does not exist or is not executable." + return 1 + fi eval "${decoder}" "${input_file}" "${output_file}" "${drop_mode}" ${devnull} diff --git a/test/postproc.sh b/test/postproc.sh index 050a36849605e30fb361483f4ccafa78e45bf4df..c9c4e581374e5452678dced77b50df755b8446d8 100755 --- a/test/postproc.sh +++ b/test/postproc.sh @@ -32,7 +32,10 @@ postproc() { local codec="$2" local output_file="${VPX_TEST_OUTPUT_DIR}/postproc_${codec}.raw" - [ -x "${decoder}" ] || return 1 + if [ ! -x "${decoder}" ]; then + elog "${decoder} does not exist or is not executable." + return 1 + fi eval "${decoder}" "${input_file}" "${output_file}" ${devnull} diff --git a/test/resize_util.sh b/test/resize_util.sh index 2a8e3fb7cbe2bdf6b1971059ec84616d7fc82644..ab3dfd151fdf5adeed6fa5b8045bd9e6503c4a13 100755 --- a/test/resize_util.sh +++ b/test/resize_util.sh @@ -33,7 +33,10 @@ resize_util() { # resize_util is available only when CONFIG_SHARED is disabled. if [ -z "$(vpx_config_option_enabled CONFIG_SHARED)" ]; then - [ -x "${resizer}" ] || return 1 + if [ ! -x "${resizer}" ]; then + elog "${resizer} does not exist or is not executable." + return 1 + fi eval "${resizer}" "${YUV_RAW_INPUT}" \ "${YUV_RAW_INPUT_WIDTH}x${YUV_RAW_INPUT_HEIGHT}" \ diff --git a/test/simple_decoder.sh b/test/simple_decoder.sh index 24b17c5ef85beb6ba84394100dee2a9fc26e3a52..0be48e6b7a49fe9b398ba2e8a1dc1d06d844ff6f 100755 --- a/test/simple_decoder.sh +++ b/test/simple_decoder.sh @@ -32,7 +32,10 @@ simple_decoder() { local codec="$2" local output_file="${VPX_TEST_OUTPUT_DIR}/simple_decoder_${codec}.raw" - [ -x "${decoder}" ] || return 1 + if [ ! -x "${decoder}" ]; then + elog "${decoder} does not exist or is not executable." + return 1 + fi eval "${decoder}" "${input_file}" "${output_file}" ${devnull} diff --git a/test/simple_encoder.sh b/test/simple_encoder.sh index 6232093c9873e7db03f00cdf5d6edfc9525a85d7..a0b0e132e1efb5f6746ec921d999c452749d4652 100755 --- a/test/simple_encoder.sh +++ b/test/simple_encoder.sh @@ -29,7 +29,10 @@ simple_encoder() { local codec="$1" local output_file="${VPX_TEST_OUTPUT_DIR}/simple_encoder_${codec}.ivf" - [ -x "${encoder}" ] || return 1 + if [ ! -x "${encoder}" ]; then + elog "${encoder} does not exist or is not executable." + return 1 + fi eval "${encoder}" "${codec}" "${YUV_RAW_INPUT_WIDTH}" \ "${YUV_RAW_INPUT_HEIGHT}" "${YUV_RAW_INPUT}" "${output_file}" 9999 \ diff --git a/test/tools_common.sh b/test/tools_common.sh index 1ed1893671fa8ecfb69ed244195323cdcb2f34a2..7f32905f25a538e9990d32af471a08c399757523 100755 --- a/test/tools_common.sh +++ b/test/tools_common.sh @@ -17,6 +17,10 @@ VPX_TEST_TOOLS_COMMON_SH=included set -e devnull='> /dev/null 2>&1' +elog() { + echo "$@" 1>&2 +} + vlog() { if [ "${VPX_TEST_VERBOSE_OUTPUT}" = "yes" ]; then echo "$@" diff --git a/test/twopass_encoder.sh b/test/twopass_encoder.sh index fe3cbbb1ce8f336c1affb4f45c69f5c58df62261..95d49d6e86e77c6757e56fbed49021792022ff15 100755 --- a/test/twopass_encoder.sh +++ b/test/twopass_encoder.sh @@ -29,7 +29,10 @@ twopass_encoder() { local codec="$1" local output_file="${VPX_TEST_OUTPUT_DIR}/twopass_encoder_${codec}.ivf" - [ -x "${encoder}" ] || return 1 + if [ ! -x "${encoder}" ]; then + elog "${encoder} does not exist or is not executable." + return 1 + fi eval "${encoder}" "${codec}" "${YUV_RAW_INPUT_WIDTH}" \ "${YUV_RAW_INPUT_HEIGHT}" "${YUV_RAW_INPUT}" "${output_file}" \ diff --git a/test/vp8cx_set_ref.sh b/test/vp8cx_set_ref.sh index ef9d0c04c056ec9f3009df7ea30dd8747c50a408..ee1005678c7d79ae87dd728d41a228d90e103368 100755 --- a/test/vp8cx_set_ref.sh +++ b/test/vp8cx_set_ref.sh @@ -34,7 +34,10 @@ vpx_set_ref() { local output_file="${VPX_TEST_OUTPUT_DIR}/vp8cx_set_ref_${codec}.ivf" local ref_frame_num=90 - [ -x "${encoder}" ] || return 1 + if [ ! -x "${encoder}" ]; then + elog "${encoder} does not exist or is not executable." + return 1 + fi eval "${encoder}" "${YUV_RAW_INPUT_WIDTH}" "${YUV_RAW_INPUT_HEIGHT}" \ "${YUV_RAW_INPUT}" "${output_file}" "${ref_frame_num}" \ diff --git a/test/vp9_spatial_svc_encoder.sh b/test/vp9_spatial_svc_encoder.sh index 635cfa2452f101bdc850c2b0e217ba10804a755e..8c9d13072787cb5276e67bc81292f0aab72aee7a 100755 --- a/test/vp9_spatial_svc_encoder.sh +++ b/test/vp9_spatial_svc_encoder.sh @@ -34,7 +34,10 @@ vp9_spatial_svc_encoder() { shift - [ -x "${encoder}" ] || return 1 + if [ ! -x "${encoder}" ]; then + elog "${encoder} does not exist or is not executable." + return 1 + fi eval "${encoder}" -w "${YUV_RAW_INPUT_WIDTH}" -h "${YUV_RAW_INPUT_HEIGHT}" \ -k "${max_kf}" -f "${frames_to_encode}" "$@" "${YUV_RAW_INPUT}" \ diff --git a/test/vpx_temporal_svc_encoder.sh b/test/vpx_temporal_svc_encoder.sh index ff64740a68a055e570499f068ff8292b04c14be2..b2e968fa88791323b4d3b15fa3eb341f1a0f4159 100755 --- a/test/vpx_temporal_svc_encoder.sh +++ b/test/vpx_temporal_svc_encoder.sh @@ -39,7 +39,10 @@ vpx_tsvc_encoder() { shift 2 - [ -x "${encoder}" ] || return 1 + if [ ! -x "${encoder}" ]; then + elog "${encoder} does not exist or is not executable." + return 1 + fi eval "${encoder}" "${YUV_RAW_INPUT}" "${output_file}" "${codec}" \ "${YUV_RAW_INPUT_WIDTH}" "${YUV_RAW_INPUT_HEIGHT}" \