set -e
+vlog() {
+ [ "${VPX_TEST_VERBOSE_OUTPUT}" = "yes" ] && echo "$@"
+}
+
# Sets $VPX_TOOL_TEST to the name specified by positional parameter one.
test_begin() {
VPX_TOOL_TEST="${1}"
# Run tests.
for test in ${tests_to_run}; do
test_begin "${test}"
- [ "${VPX_TEST_VERBOSE_OUTPUT}" = "yes" ] && echo " RUN ${test}"
+ vlog " RUN ${test}"
"${test}"
- [ "${VPX_TEST_VERBOSE_OUTPUT}" = "yes" ] && echo " PASS ${test}"
+ vlog " PASS ${test}"
test_end "${test}"
done
# Setup a trap function to clean up after tests complete.
trap cleanup EXIT
-if [ "${VPX_TEST_VERBOSE_OUTPUT}" = "yes" ]; then
-cat << EOF
-$(basename "${0%.*}") test configuration:
+vlog "$(basename "${0%.*}") test configuration:
LIBVPX_BIN_PATH=${LIBVPX_BIN_PATH}
LIBVPX_CONFIG_PATH=${LIBVPX_CONFIG_PATH}
LIBVPX_TEST_DATA_PATH=${LIBVPX_TEST_DATA_PATH}
VPX_TEST_OUTPUT_DIR=${VPX_TEST_OUTPUT_DIR}
VPX_TEST_VERBOSE_OUTPUT=${VPX_TEST_VERBOSE_OUTPUT}
VPX_TEST_FILTER=${VPX_TEST_FILTER}
- VPX_TEST_RUN_DISABLED_TESTS=${VPX_TEST_RUN_DISABLED_TESTS}
-EOF
-fi
+ VPX_TEST_RUN_DISABLED_TESTS=${VPX_TEST_RUN_DISABLED_TESTS}"
fi # End $VPX_TEST_TOOLS_COMMON_SH pseudo include guard.