summaryrefslogtreecommitdiff
path: root/test/check-refs.sh
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2013-07-04 10:04:30 +0100
committerChris Wilson <chris@chris-wilson.co.uk>2013-07-04 10:04:30 +0100
commit8b55703d760a0032772d7f9b1d17438b2db3f1b4 (patch)
treef8fb08246e8ad6137fb55d343b6ec764c5c539fc /test/check-refs.sh
parent8b4151a5e59cd2036e32c0eeb13afe420a434e19 (diff)
downloadcairo-8b55703d760a0032772d7f9b1d17438b2db3f1b4.tar.gz
test: Amend check-refs.sh to support out-of-tree builds
Diffstat (limited to 'test/check-refs.sh')
-rwxr-xr-xtest/check-refs.sh19
1 files changed, 4 insertions, 15 deletions
diff --git a/test/check-refs.sh b/test/check-refs.sh
index b9b1031b6..74abe9f85 100755
--- a/test/check-refs.sh
+++ b/test/check-refs.sh
@@ -1,23 +1,12 @@
#!/bin/bash
-current_dir=$(pwd)
+cd $(dirname $0)/reference || exit
-# Move to the reference directory as needed
-if [ $(basename $current_dir) != 'test' ]; then
- if [ -d test ]; then
- cd test || exit 1
- fi
-fi
-if [ $(basename $current_dir) != 'reference' ]; then
- if [ -d reference ]; then
- cd reference || exit 2
- fi
-fi
-
-pdiff=../pdiff/perceptualdiff
+pdiff=$1
+[ -n "$pdiff" ] || pdiff=../pdiff/perceptualdiff
if [ ! -e "${pdiff}" ]; then
echo "Error: requires ${pdiff} executable"
- exit 3
+ exit 128
fi
for file in *.ref.png; do