set -e
devnull='> /dev/null 2>&1'
+VPX_TEST_PREFIX=""
elog() {
echo "$@" 1>&2
local decoder="${LIBVPX_BIN_PATH}/vpxdec${VPX_TEST_EXE_SUFFIX}"
if [ -z "${pipe_input}" ]; then
- eval "${decoder}" "$input" --summary --noblit "$@" ${devnull}
+ eval "${VPX_TEST_PREFIX}" "${decoder}" "$input" --summary --noblit "$@" \
+ ${devnull}
else
- cat "${input}" | eval "${decoder}" - --summary --noblit "$@" ${devnull}
+ cat "${input}" \
+ | eval "${VPX_TEST_PREFIX}" "${decoder}" - --summary --noblit "$@" \
+ ${devnull}
fi
}
fi
if [ -z "${pipe_input}" ]; then
- eval "${encoder}" --codec=${codec} --width=${width} --height=${height} \
- --limit=${frames} ${use_ivf} ${extra_flags} --output="${output}" \
- "${input}" \
- ${devnull}
+ eval "${VPX_TEST_PREFIX}" "${encoder}" --codec=${codec} --width=${width} \
+ --height=${height} --limit=${frames} ${use_ivf} ${extra_flags} \
+ --output="${output}" "${input}" ${devnull}
else
cat "${input}" \
- | eval "${encoder}" --codec=${codec} --width=${width} \
- --height=${height} --limit=${frames} ${use_ivf} ${extra_flags} \
- --output="${output}" - \
- ${devnull}
+ | eval "${VPX_TEST_PREFIX}" "${encoder}" --codec=${codec} \
+ --width=${width} --height=${height} --limit=${frames} ${use_ivf} \
+ ${extra_flags} --output="${output}" - ${devnull}
fi
if [ ! -e "${output}" ]; then
--help: Display this message and exit.
--test-data-path <path to libvpx test data directory>
--show-program-output: Shows output from all programs being tested.
+ --prefix: Allows for a user specified prefix to be inserted before all test
+ programs. Grants the ability, for example, to run test programs
+ within valgrind.
--verbose: Verbose output.
When the --bin-path option is not specified the script attempts to use
LIBVPX_TEST_DATA_PATH="$2"
shift
;;
+ --prefix)
+ VPX_TEST_PREFIX="$2"
+ shift
+ ;;
--verbose)
VPX_TEST_VERBOSE_OUTPUT=yes
;;
VPX_TEST_EXE_SUFFIX=${VPX_TEST_EXE_SUFFIX}
VPX_TEST_FILTER=${VPX_TEST_FILTER}
VPX_TEST_OUTPUT_DIR=${VPX_TEST_OUTPUT_DIR}
+ VPX_TEST_PREFIX=${VPX_TEST_PREFIX}
VPX_TEST_RAND=${VPX_TEST_RAND}
VPX_TEST_RUN_DISABLED_TESTS=${VPX_TEST_RUN_DISABLED_TESTS}
VPX_TEST_SHOW_PROGRAM_OUTPUT=${VPX_TEST_SHOW_PROGRAM_OUTPUT}