From 3fc30f0778ff0bfb1c61e7994e6472a34bdc98bd Mon Sep 17 00:00:00 2001 From: Tom Sepez Date: Thu, 30 Jul 2015 16:48:28 -0700 Subject: Add simple script to regenerate expected results. (I've been doing this by hand for far too long). R=thestig@chromium.org Review URL: https://codereview.chromium.org/1264873005 . --- testing/tools/make_expected.sh | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100755 testing/tools/make_expected.sh (limited to 'testing') diff --git a/testing/tools/make_expected.sh b/testing/tools/make_expected.sh new file mode 100755 index 0000000000..c6e50dc652 --- /dev/null +++ b/testing/tools/make_expected.sh @@ -0,0 +1,16 @@ +#!/bin/bash +# +# Script to generate expected result files. +# +set -e +while (( "$#" )); do + INFILE="$1" + echo $INFILE | grep -qs ' ' && echo space in filename detected && exit 1 + out/Debug/pdfium_test --png $INFILE + RESULTS="$INFILE.*.png" + for RESULT in $RESULTS ; do + EXPECTED=`echo -n $RESULT | sed 's/[.]pdf[.]/_expected.pdf./'` + mv $RESULT $EXPECTED + done + shift +done -- cgit v1.2.3