From d1556071715d28217b7c64774335fcce2cbf46c6 Mon Sep 17 00:00:00 2001 From: halcanary Date: Wed, 27 Apr 2016 07:44:03 -0700 Subject: tools/pdf-comparison.sh: stop relying on /usr/bin/timeout NOTRY=true TBR= Review URL: https://codereview.chromium.org/1921943006 --- tools/pdf-comparison.sh | 21 ++++++++++++++++++--- 1 file changed, 18 insertions(+), 3 deletions(-) (limited to 'tools/pdf-comparison.sh') diff --git a/tools/pdf-comparison.sh b/tools/pdf-comparison.sh index d4036a418c..69f96c980f 100755 --- a/tools/pdf-comparison.sh +++ b/tools/pdf-comparison.sh @@ -19,7 +19,7 @@ if ! [ "$1" ] || ! [ "$2" ]; then fi BAD='' -for CMD in 'python' 'ninja' 'pdfium_test' 'timeout' 'skdiff'; do +for CMD in 'python' 'ninja' 'pdfium_test' 'skdiff'; do if ! command -v "$CMD" > /dev/null ; then echo "could not find $CMD command in PATH." >&2 BAD=1 @@ -69,10 +69,25 @@ if [ -z "$DIFFS" ]; then exit 0; fi +# Portable version of timeout from GNU coreutils. +timeout_py() { python -c "$(cat <&2 + exit 1 + fi rm "$pdf" else echo "pdfium_test '$pdf' failed." -- cgit v1.2.3