OLD | NEW |
1 #!/bin/sh | 1 #!/bin/sh |
2 ## | 2 ## |
3 ## Copyright (c) 2014 The WebM project authors. All Rights Reserved. | 3 ## Copyright (c) 2014 The WebM project authors. All Rights Reserved. |
4 ## | 4 ## |
5 ## Use of this source code is governed by a BSD-style license | 5 ## Use of this source code is governed by a BSD-style license |
6 ## that can be found in the LICENSE file in the root of the source | 6 ## that can be found in the LICENSE file in the root of the source |
7 ## tree. An additional intellectual property rights grant can be found | 7 ## tree. An additional intellectual property rights grant can be found |
8 ## in the file PATENTS. All contributing project authors may | 8 ## in the file PATENTS. All contributing project authors may |
9 ## be found in the AUTHORS file in the root of the source tree. | 9 ## be found in the AUTHORS file in the root of the source tree. |
10 ## | 10 ## |
(...skipping 26 matching lines...) Expand all Loading... |
37 if [ ! -x "${decoder}" ]; then | 37 if [ ! -x "${decoder}" ]; then |
38 elog "${decoder} does not exist or is not executable." | 38 elog "${decoder} does not exist or is not executable." |
39 return 1 | 39 return 1 |
40 fi | 40 fi |
41 | 41 |
42 eval "${VPX_TEST_PREFIX}" "${decoder}" "${input_file}" "${output_file}" \ | 42 eval "${VPX_TEST_PREFIX}" "${decoder}" "${input_file}" "${output_file}" \ |
43 ${devnull} | 43 ${devnull} |
44 | 44 |
45 [ -e "${output_file}" ] || return 1 | 45 [ -e "${output_file}" ] || return 1 |
46 | 46 |
47 local md5_last_frame=$(tail -n1 "${output_file}") | 47 local md5_last_frame="$(tail -n1 "${output_file}" | awk '{print $1}')" |
48 local actual_md5=$(echo "${md5_last_frame% *}" | tr -d [:space:]) | 48 local actual_md5="$(echo "${md5_last_frame}" | awk '{print $1}')" |
49 [ "${actual_md5}" = "${expected_md5}" ] || return 1 | 49 [ "${actual_md5}" = "${expected_md5}" ] || return 1 |
50 } | 50 } |
51 | 51 |
52 decode_to_md5_vp8() { | 52 decode_to_md5_vp8() { |
53 # expected MD5 sum for the last frame. | 53 # expected MD5 sum for the last frame. |
54 local expected_md5="56794d911b02190212bca92f88ad60c6" | 54 local expected_md5="56794d911b02190212bca92f88ad60c6" |
55 | 55 |
56 if [ "$(vp8_decode_available)" = "yes" ]; then | 56 if [ "$(vp8_decode_available)" = "yes" ]; then |
57 decode_to_md5 "${VP8_IVF_FILE}" "vp8" "${expected_md5}" | 57 decode_to_md5 "${VP8_IVF_FILE}" "vp8" "${expected_md5}" |
58 fi | 58 fi |
59 } | 59 } |
60 | 60 |
61 decode_to_md5_vp9() { | 61 decode_to_md5_vp9() { |
62 # expected MD5 sum for the last frame. | 62 # expected MD5 sum for the last frame. |
63 local expected_md5="2952c0eae93f3dadd1aa84c50d3fd6d2" | 63 local expected_md5="2952c0eae93f3dadd1aa84c50d3fd6d2" |
64 | 64 |
65 if [ "$(vp9_decode_available)" = "yes" ]; then | 65 if [ "$(vp9_decode_available)" = "yes" ]; then |
66 decode_to_md5 "${VP9_IVF_FILE}" "vp9" "${expected_md5}" | 66 decode_to_md5 "${VP9_IVF_FILE}" "vp9" "${expected_md5}" |
67 fi | 67 fi |
68 } | 68 } |
69 | 69 |
70 decode_to_md5_tests="decode_to_md5_vp8 | 70 decode_to_md5_tests="decode_to_md5_vp8 |
71 decode_to_md5_vp9" | 71 decode_to_md5_vp9" |
72 | 72 |
73 run_tests decode_to_md5_verify_environment "${decode_to_md5_tests}" | 73 run_tests decode_to_md5_verify_environment "${decode_to_md5_tests}" |
OLD | NEW |