When used --show-program-output shows the output from the programs run during testing.
Unified · Split
| @@ -24,22 +24,25 @@ decode_to_md5_verify_environment() { · 23 unmodified lines | ||
| 24 | 24 | fi |
| 25 | 25 | } |
| 26 | 26 | |
| 27 | −# Runs decode_to_md5 on $1 and echoes the MD5 sum for the final frame. $2 is | |
| 28 | −# interpreted as codec name and used solely to name the output file. | |
| 27 | +# Runs decode_to_md5 on $1 and captures the md5 sum for the final frame. $2 is | |
| 28 | +# interpreted as codec name and used solely to name the output file. $3 is the | |
| 29 | +# expected md5 sum: It must match that of the final frame. | |
| 29 | 30 | decode_to_md5() { |
| 30 | 31 | local decoder="${LIBVPX_BIN_PATH}/decode_to_md5${VPX_TEST_EXE_SUFFIX}" |
| 31 | 32 | local input_file="$1" |
| 32 | 33 | local codec="$2" |
| 34 | + local expected_md5="$3" | |
| 33 | 35 | local output_file="${VPX_TEST_OUTPUT_DIR}/decode_to_md5_${codec}" |
| 34 | 36 | |
| 35 | 37 | [ -x "${decoder}" ] || return 1 |
| 36 | 38 | |
| 37 | − "${decoder}" "${input_file}" "${output_file}" > /dev/null 2>&1 | |
| 39 | + eval "${decoder}" "${input_file}" "${output_file}" ${devnull} | |
| 38 | 40 | |
| 39 | 41 | [ -e "${output_file}" ] || return 1 |
| 40 | 42 | |
| 41 | 43 | local md5_last_frame=$(tail -n1 "${output_file}") |
| 42 | − echo "${md5_last_frame% *}" | tr -d [:space:] | |
| 44 | + local actual_md5=$(echo "${md5_last_frame% *}" | tr -d [:space:]) | |
| 45 | + [ "${actual_md5}" = "${expected_md5}" ] || return 1 | |
| 43 | 46 | } |
| 44 | 47 | |
| 45 | 48 | decode_to_md5_vp8() { |
| @@ -47,8 +50,7 @@ decode_to_md5_vp8() { · 1 unmodified line | ||
| 47 | 50 | local expected_md5="56794d911b02190212bca92f88ad60c6" |
| 48 | 51 | |
| 49 | 52 | if [ "$(vp8_decode_available)" = "yes" ]; then |
| 50 | − local actual_md5="$(decode_to_md5 "${VP8_IVF_FILE}" vp8)" || return 1 | |
| 51 | − [ "${actual_md5}" = "${expected_md5}" ] || return 1 | |
| 53 | + decode_to_md5 "${VP8_IVF_FILE}" "vp8" "${expected_md5}" | |
| 52 | 54 | fi |
| 53 | 55 | } |
| 54 | 56 | |
| @@ -57,8 +59,7 @@ decode_to_md5_vp9() { · 2 unmodified lines | ||
| 57 | 59 | local expected_md5="2952c0eae93f3dadd1aa84c50d3fd6d2" |
| 58 | 60 | |
| 59 | 61 | if [ "$(vp9_decode_available)" = "yes" ]; then |
| 60 | − local actual_md5="$(decode_to_md5 "${VP9_IVF_FILE}" vp9)" || return 1 | |
| 61 | − [ "${actual_md5}" = "${expected_md5}" ] || return 1 | |
| 62 | + decode_to_md5 "${VP9_IVF_FILE}" "vp9" "${expected_md5}" | |
| 62 | 63 | fi |
| 63 | 64 | } |
| 64 | 65 | |
| @@ -36,7 +36,7 @@ decode_with_drops() { · 35 unmodified lines | ||
| 36 | 36 | |
| 37 | 37 | [ -x "${decoder}" ] || return 1 |
| 38 | 38 | |
| 39 | − "${decoder}" "${input_file}" "${output_file}" "${drop_mode}" > /dev/null 2>&1 | |
| 39 | + eval "${decoder}" "${input_file}" "${output_file}" "${drop_mode}" ${devnull} | |
| 40 | 40 | |
| 41 | 41 | [ -e "${output_file}" ] || return 1 |
| 42 | 42 | } |
| @@ -34,7 +34,7 @@ simple_decoder() { · 33 unmodified lines | ||
| 34 | 34 | |
| 35 | 35 | [ -x "${decoder}" ] || return 1 |
| 36 | 36 | |
| 37 | − "${decoder}" "${input_file}" "${output_file}" > /dev/null 2>&1 | |
| 37 | + eval "${decoder}" "${input_file}" "${output_file}" ${devnull} | |
| 38 | 38 | |
| 39 | 39 | [ -e "${output_file}" ] || return 1 |
| 40 | 40 | } |
| @@ -31,8 +31,9 @@ simple_encoder() { · 30 unmodified lines | ||
| 31 | 31 | |
| 32 | 32 | [ -x "${encoder}" ] || return 1 |
| 33 | 33 | |
| 34 | − "${encoder}" "${codec}" "${YUV_RAW_INPUT_WIDTH}" "${YUV_RAW_INPUT_HEIGHT}" \ | |
| 35 | − "${YUV_RAW_INPUT}" "${output_file}" 9999 > /dev/null 2>&1 | |
| 34 | + eval "${encoder}" "${codec}" "${YUV_RAW_INPUT_WIDTH}" \ | |
| 35 | + "${YUV_RAW_INPUT_HEIGHT}" "${YUV_RAW_INPUT}" "${output_file}" 9999 \ | |
| 36 | + ${devnull} | |
| 36 | 37 | |
| 37 | 38 | [ -e "${output_file}" ] || return 1 |
| 38 | 39 | } |
| @@ -15,6 +15,7 @@ if [ -z "${VPX_TEST_TOOLS_COMMON_SH}" ]; then · 14 unmodified lines | ||
| 15 | 15 | VPX_TEST_TOOLS_COMMON_SH=included |
| 16 | 16 | |
| 17 | 17 | set -e |
| 18 | +devnull='> /dev/null 2>&1' | |
| 18 | 19 | |
| 19 | 20 | vlog() { |
| 20 | 21 | [ "${VPX_TEST_VERBOSE_OUTPUT}" = "yes" ] && echo "$@" |
| @@ -197,9 +198,9 @@ vpxdec() { · 176 unmodified lines | ||
| 197 | 198 | local decoder="${LIBVPX_BIN_PATH}/vpxdec${VPX_TEST_EXE_SUFFIX}" |
| 198 | 199 | |
| 199 | 200 | if [ -z "${pipe_input}" ]; then |
| 200 | − "${decoder}" "$input" --summary --noblit "$@" > /dev/null 2>&1 | |
| 201 | + eval "${decoder}" "$input" --summary --noblit "$@" ${devnull} | |
| 201 | 202 | else |
| 202 | − cat "${input}" | "${decoder}" - --summary --noblit "$@" > /dev/null 2>&1 | |
| 203 | + cat "${input}" | eval "${decoder}" - --summary --noblit "$@" ${devnull} | |
| 203 | 204 | fi |
| 204 | 205 | } |
| 205 | 206 | |
| @@ -245,14 +246,16 @@ vpxenc() { · 39 unmodified lines | ||
| 245 | 246 | fi |
| 246 | 247 | |
| 247 | 248 | if [ -z "${pipe_input}" ]; then |
| 248 | − "${encoder}" --codec=${codec} --width=${width} --height=${height} \ | |
| 249 | + eval "${encoder}" --codec=${codec} --width=${width} --height=${height} \ | |
| 249 | 250 | --limit=${frames} ${use_ivf} ${extra_flags} --output="${output}" \ |
| 250 | − "${input}" > /dev/null 2>&1 | |
| 251 | + "${input}" \ | |
| 252 | + ${devnull} | |
| 251 | 253 | else |
| 252 | 254 | cat "${input}" \ |
| 253 | − | "${encoder}" --codec=${codec} --width=${width} --height=${height} \ | |
| 254 | − --limit=${frames} ${use_ivf} ${extra_flags} --output="${output}" - \ | |
| 255 | − > /dev/null 2>&1 | |
| 255 | + | eval "${encoder}" --codec=${codec} --width=${width} \ | |
| 256 | + --height=${height} --limit=${frames} ${use_ivf} ${extra_flags} \ | |
| 257 | + --output="${output}" - \ | |
| 258 | + ${devnull} | |
| 256 | 259 | fi |
| 257 | 260 | |
| 258 | 261 | if [ ! -e "${output}" ]; then |
| @@ -336,6 +339,7 @@ cat << EOF · 77 unmodified lines | ||
| 336 | 339 | --run-disabled-tests: Run disabled tests. |
| 337 | 340 | --help: Display this message and exit. |
| 338 | 341 | --test-data-path <path to libvpx test data directory> |
| 342 | + --show-program-output: Shows output from all programs being tested. | |
| 339 | 343 | --verbose: Verbose output. |
| 340 | 344 | |
| 341 | 345 | When the --bin-path option is not specified the script attempts to use |
| @@ -388,6 +392,9 @@ while [ -n "$1" ]; do · 46 unmodified lines | ||
| 388 | 392 | --verbose) |
| 389 | 393 | VPX_TEST_VERBOSE_OUTPUT=yes |
| 390 | 394 | ;; |
| 395 | + --show-program-output) | |
| 396 | + devnull= | |
| 397 | + ;; | |
| 391 | 398 | *) |
| 392 | 399 | vpx_test_usage |
| 393 | 400 | exit 1 |
| @@ -445,6 +452,7 @@ vlog "$(basename "${0%.*}") test configuration: · 51 unmodified lines | ||
| 445 | 452 | VPX_TEST_OUTPUT_DIR=${VPX_TEST_OUTPUT_DIR} |
| 446 | 453 | VPX_TEST_VERBOSE_OUTPUT=${VPX_TEST_VERBOSE_OUTPUT} |
| 447 | 454 | VPX_TEST_FILTER=${VPX_TEST_FILTER} |
| 448 | − VPX_TEST_RUN_DISABLED_TESTS=${VPX_TEST_RUN_DISABLED_TESTS}" | |
| 455 | + VPX_TEST_RUN_DISABLED_TESTS=${VPX_TEST_RUN_DISABLED_TESTS} | |
| 456 | + VPX_TEST_SHOW_PROGRAM_OUTPUT=${VPX_TEST_SHOW_PROGRAM_OUTPUT}" | |
| 449 | 457 | |
| 450 | 458 | fi # End $VPX_TEST_TOOLS_COMMON_SH pseudo include guard. |