diff options
author | Tom Finegan <tomfinegan@google.com> | 2014-07-31 09:40:46 -0700 |
---|---|---|
committer | Gerrit Code Review <gerrit@gerrit.golo.chromium.org> | 2014-07-31 09:40:46 -0700 |
commit | b924922f5a10281619585648edd11bb0447b5135 (patch) | |
tree | e511ba00e74ff20b13a09197fd3a18c4572851ce /test | |
parent | a6a348b85e7b3a9e182313b58cf4619e4ca9f0a1 (diff) | |
parent | 6e0748e1423270b5b57177ee8941fa890d217b50 (diff) | |
download | libvpx-b924922f5a10281619585648edd11bb0447b5135.tar libvpx-b924922f5a10281619585648edd11bb0447b5135.tar.gz libvpx-b924922f5a10281619585648edd11bb0447b5135.tar.bz2 libvpx-b924922f5a10281619585648edd11bb0447b5135.zip |
Merge "tools_common.sh: Move vpxdec() test support to vpxdec.sh"
Diffstat (limited to 'test')
-rwxr-xr-x | test/tools_common.sh | 32 | ||||
-rwxr-xr-x | test/vpxdec.sh | 32 |
2 files changed, 32 insertions, 32 deletions
diff --git a/test/tools_common.sh b/test/tools_common.sh index 3e69c3687..e98beadf8 100755 --- a/test/tools_common.sh +++ b/test/tools_common.sh @@ -182,38 +182,6 @@ webm_io_available() { [ "$(vpx_config_option_enabled CONFIG_WEBM_IO)" = "yes" ] && echo yes } -# Echoes yes to stdout when vpxdec exists according to vpx_tool_available(). -vpxdec_available() { - [ -n $(vpx_tool_available vpxdec) ] && echo yes -} - -# Wrapper function for running vpxdec in noblit mode. Requires that -# LIBVPX_BIN_PATH points to the directory containing vpxdec. Positional -# parameter one is used as the input file path. Positional parameter two, when -# present, is interpreted as a boolean flag that means the input should be sent -# to vpxdec via pipe from cat instead of directly. -vpxdec() { - local input="${1}" - local pipe_input=${2} - - if [ $# -gt 2 ]; then - # shift away $1 and $2 so the remaining arguments can be passed to vpxdec - # via $@. - shift 2 - fi - - local decoder="${LIBVPX_BIN_PATH}/vpxdec${VPX_TEST_EXE_SUFFIX}" - - if [ -z "${pipe_input}" ]; then - eval "${VPX_TEST_PREFIX}" "${decoder}" "$input" --summary --noblit "$@" \ - ${devnull} - else - cat "${input}" \ - | eval "${VPX_TEST_PREFIX}" "${decoder}" - --summary --noblit "$@" \ - ${devnull} - fi -} - # Echoes yes to stdout when vpxenc exists according to vpx_tool_available(). vpxenc_available() { [ -n $(vpx_tool_available vpxenc) ] && echo yes diff --git a/test/vpxdec.sh b/test/vpxdec.sh index 093230b69..f7b2322fc 100755 --- a/test/vpxdec.sh +++ b/test/vpxdec.sh @@ -22,6 +22,38 @@ vpxdec_verify_environment() { fi } +# Echoes yes to stdout when vpxdec exists according to vpx_tool_available(). +vpxdec_available() { + [ -n "$(vpx_tool_available vpxdec)" ] && echo yes +} + +# Wrapper function for running vpxdec in noblit mode. Requires that +# LIBVPX_BIN_PATH points to the directory containing vpxdec. Positional +# parameter one is used as the input file path. Positional parameter two, when +# present, is interpreted as a boolean flag that means the input should be sent +# to vpxdec via pipe from cat instead of directly. +vpxdec() { + local input="${1}" + local pipe_input=${2} + + if [ $# -gt 2 ]; then + # shift away $1 and $2 so the remaining arguments can be passed to vpxdec + # via $@. + shift 2 + fi + + local decoder="${LIBVPX_BIN_PATH}/vpxdec${VPX_TEST_EXE_SUFFIX}" + + if [ -z "${pipe_input}" ]; then + eval "${VPX_TEST_PREFIX}" "${decoder}" "$input" --summary --noblit "$@" \ + ${devnull} + else + cat "${input}" \ + | eval "${VPX_TEST_PREFIX}" "${decoder}" - --summary --noblit "$@" \ + ${devnull} + fi +} + vpxdec_can_decode_vp8() { if [ "$(vpxdec_available)" = "yes" ] && \ [ "$(vp8_decode_available)" = "yes" ]; then |