Check if opus_compare is executable in run_vectors.sh
authorAurélien Zanelli <aurelien.zanelli@parrot.com>
Mon, 27 May 2013 13:54:31 +0000 (15:54 +0200)
committerJean-Marc Valin <jmvalin@jmvalin.ca>
Mon, 27 May 2013 15:21:31 +0000 (11:21 -0400)
If opus_compare doesn't exist or isn't executable, tests failed normally
which could be misleading.
So test for existence and mode to avoid this ambiguity.

tests/run_vectors.sh

index 1cc445d..116a743 100755 (executable)
@@ -57,6 +57,11 @@ else
     exit 0
 fi
 
     exit 0
 fi
 
+if [ ! -x $OPUS_COMPARE ]; then
+    echo ERROR: Compare program not found: $OPUS_COMPARE
+    exit 1
+fi
+
 if [ -x $OPUS_DEMO ]; then
     echo Decoding with $OPUS_DEMO
 else
 if [ -x $OPUS_DEMO ]; then
     echo Decoding with $OPUS_DEMO
 else