annotate src/libsndfile-1.0.25/Octave/octave_test.sh @ 23:619f715526df sv_v2.1

Update Vamp plugin SDK to 2.5
author Chris Cannam
date Thu, 09 May 2013 10:52:46 +0100
parents c7265573341e
children
rev   line source
Chris@0 1 #!/bin/bash
Chris@0 2
Chris@0 3
Chris@0 4 # Check where we're being run from.
Chris@0 5 if [ -d Octave ]; then
Chris@0 6 cd Octave
Chris@0 7 fi
Chris@0 8
Chris@0 9 # Find libsndfile shared object.
Chris@0 10 libsndfile_lib_location=""
Chris@0 11
Chris@0 12 if [ -f "../src/.libs/libsndfile.so" ]; then
Chris@0 13 libsndfile_lib_location="../src/.libs/"
Chris@0 14 elif [ -f "../src/libsndfile.so" ]; then
Chris@0 15 libsndfile_lib_location="../src/"
Chris@0 16 elif [ -f "../src/.libs/libsndfile.dylib" ]; then
Chris@0 17 libsndfile_lib_location="../src/.libs/"
Chris@0 18 elif [ -f "../src/libsndfile.dylib" ]; then
Chris@0 19 libsndfile_lib_location="../src/"
Chris@0 20 else
Chris@0 21 echo
Chris@0 22 echo "Not able to find the libsndfile shared lib we've just built."
Chris@0 23 echo "This may cause the following test to fail."
Chris@0 24 echo
Chris@0 25 fi
Chris@0 26
Chris@0 27 libsndfile_lib_location=`(cd $libsndfile_lib_location && pwd)`
Chris@0 28
Chris@0 29
Chris@0 30 # Find sndfile.oct
Chris@0 31 sndfile_oct_location=""
Chris@0 32
Chris@0 33 if [ -f .libs/sndfile.oct ]; then
Chris@0 34 sndfile_oct_location=".libs"
Chris@0 35 elif [ -f sndfile.oct ]; then
Chris@0 36 sndfile_oct_location="."
Chris@0 37 else
Chris@0 38 echo "Not able to find the sndfile.oct binaries we've just built."
Chris@0 39 exit 1
Chris@0 40 fi
Chris@0 41
Chris@0 42 case `file -b $sndfile_oct_location/sndfile.oct` in
Chris@0 43 ELF*)
Chris@0 44 ;;
Chris@0 45 Mach*)
Chris@0 46 echo "Tests don't work on this platform."
Chris@0 47 exit 0
Chris@0 48 ;;
Chris@0 49 *)
Chris@0 50 echo "Not able to find the sndfile.oct binaries we've just built."
Chris@0 51 exit 1
Chris@0 52 ;;
Chris@0 53 esac
Chris@0 54
Chris@0 55
Chris@0 56 # Make sure the TERM environment variable doesn't contain anything wrong.
Chris@0 57 unset TERM
Chris@0 58
Chris@0 59 # echo "libsndfile_lib_location : $libsndfile_lib_location"
Chris@0 60 # echo "sndfile_oct_location : $sndfile_oct_location"
Chris@0 61
Chris@0 62 export LD_LIBRARY_PATH="$libsndfile_lib_location:$LD_LIBRARY_PATH"
Chris@0 63
Chris@0 64 octave_src_dir=`(cd $octave_src_dir && pwd)`
Chris@0 65
Chris@0 66 octave_script="$octave_src_dir/octave_test.m"
Chris@0 67
Chris@0 68 (cd $sndfile_oct_location && octave -qH $octave_script)
Chris@0 69
Chris@0 70