Allow benchmarks in VPATH builds.
authorThomas Jahns <jahns@dkrz.de>
Mon, 3 Mar 2014 12:39:48 +0000 (13:39 +0100)
committerThomas Jahns <jahns@dkrz.de>
Mon, 3 Mar 2014 15:05:36 +0000 (16:05 +0100)
* Also check for errors in benchmark script.

tests/Makefile.am
tests/bdec.sh

index 6fd6f55..27140af 100644 (file)
@@ -17,7 +17,7 @@ LDADD = libcheck_aec.la $(top_builddir)/src/libaec.la
 EXTRA_DIST = sampledata.sh benc.sh bdec.sh
 bench: benc bdec
 benc:
-       ./benc.sh
+       $(srcdir)/benc.sh
 bdec:
-       ./bdec.sh
+       $(srcdir)/bdec.sh
 .PHONY: bench benc bdec
index f27bfca..9a8544f 100755 (executable)
@@ -4,7 +4,8 @@ AEC=../src/aec
 
 if [ ! -f bench.rz ]; then
     echo "No encoded file found. Encoding now..."
-    ./benc.sh
+    path=$(echo $0 | sed -e 's:[^/]*$::')
+    "${path}"/benc.sh
 fi
 rm -f dec.dat
 bsize=$(stat -c "%s" bench.dat)