diff options
author | Ryan Harrison <rharrison@chromium.org> | 2018-08-01 19:25:21 +0000 |
---|---|---|
committer | Chromium commit bot <commit-bot@chromium.org> | 2018-08-01 19:25:21 +0000 |
commit | d7e99cb5b8dc91fc0675fbee7a84e04eac758f26 (patch) | |
tree | 68393e6b427c6adec35b3a5002d6a89f71d9ef85 | |
parent | 2563fc3895f2a6a1faf74b46387b99c61be7370a (diff) | |
download | pdfium-d7e99cb5b8dc91fc0675fbee7a84e04eac758f26.tar.xz |
Add in support for using .evt in make_expected.sh
BUG=pdfium:1024
Change-Id: If7e00eb4f6ebf6499be20e88bfc9b2ac35f2d797
Reviewed-on: https://pdfium-review.googlesource.com/39390
Reviewed-by: Henrique Nakashima <hnakashima@chromium.org>
Commit-Queue: Ryan Harrison <rharrison@chromium.org>
-rwxr-xr-x | testing/tools/make_expected.sh | 17 |
1 files changed, 11 insertions, 6 deletions
diff --git a/testing/tools/make_expected.sh b/testing/tools/make_expected.sh index 793c3f5b66..a70df797c2 100755 --- a/testing/tools/make_expected.sh +++ b/testing/tools/make_expected.sh @@ -13,14 +13,19 @@ set -e while (( "$#" )); do INFILE="$1" echo $INFILE | grep -qs ' ' && echo space in filename detected && exit 1 - out/Debug/pdfium_test --png $INFILE + EVTFILE="${INFILE%.*}.evt" + if [ -f "$EVTFILE" ]; then + out/Debug/pdfium_test --send-events --png $INFILE + else + out/Debug/pdfium_test --png $INFILE + fi RESULTS="$INFILE.*.png" for RESULT in $RESULTS ; do - EXPECTED=`echo -n $RESULT | sed 's/[.]pdf[.]/_expected.pdf./'` - mv $RESULT $EXPECTED - if [ -n "$PNGOPTIMIZER" ]; then - "$PNGOPTIMIZER" $EXPECTED - fi + EXPECTED=`echo -n $RESULT | sed 's/[.]pdf[.]/_expected.pdf./'` + mv $RESULT $EXPECTED + if [ -n "$PNGOPTIMIZER" ]; then + "$PNGOPTIMIZER" $EXPECTED + fi done shift done |