Chris@0: #!/bin/bash Chris@0: Chris@0: Chris@0: # Check where we're being run from. Chris@0: if [ -d Octave ]; then Chris@0: cd Octave Chris@0: fi Chris@0: Chris@0: # Find libsndfile shared object. Chris@0: libsndfile_lib_location="" Chris@0: Chris@0: if [ -f "../src/.libs/libsndfile.so" ]; then Chris@0: libsndfile_lib_location="../src/.libs/" Chris@0: elif [ -f "../src/libsndfile.so" ]; then Chris@0: libsndfile_lib_location="../src/" Chris@0: elif [ -f "../src/.libs/libsndfile.dylib" ]; then Chris@0: libsndfile_lib_location="../src/.libs/" Chris@0: elif [ -f "../src/libsndfile.dylib" ]; then Chris@0: libsndfile_lib_location="../src/" Chris@0: else Chris@0: echo Chris@0: echo "Not able to find the libsndfile shared lib we've just built." Chris@0: echo "This may cause the following test to fail." Chris@0: echo Chris@0: fi Chris@0: Chris@0: libsndfile_lib_location=`(cd $libsndfile_lib_location && pwd)` Chris@0: Chris@0: Chris@0: # Find sndfile.oct Chris@0: sndfile_oct_location="" Chris@0: Chris@0: if [ -f .libs/sndfile.oct ]; then Chris@0: sndfile_oct_location=".libs" Chris@0: elif [ -f sndfile.oct ]; then Chris@0: sndfile_oct_location="." Chris@0: else Chris@0: echo "Not able to find the sndfile.oct binaries we've just built." Chris@0: exit 1 Chris@0: fi Chris@0: Chris@0: case `file -b $sndfile_oct_location/sndfile.oct` in Chris@0: ELF*) Chris@0: ;; Chris@0: Mach*) Chris@0: echo "Tests don't work on this platform." Chris@0: exit 0 Chris@0: ;; Chris@0: *) Chris@0: echo "Not able to find the sndfile.oct binaries we've just built." Chris@0: exit 1 Chris@0: ;; Chris@0: esac Chris@0: Chris@0: Chris@0: # Make sure the TERM environment variable doesn't contain anything wrong. Chris@0: unset TERM Chris@0: Chris@0: # echo "libsndfile_lib_location : $libsndfile_lib_location" Chris@0: # echo "sndfile_oct_location : $sndfile_oct_location" Chris@0: Chris@0: export LD_LIBRARY_PATH="$libsndfile_lib_location:$LD_LIBRARY_PATH" Chris@0: Chris@0: octave_src_dir=`(cd $octave_src_dir && pwd)` Chris@0: Chris@0: octave_script="$octave_src_dir/octave_test.m" Chris@0: Chris@0: (cd $sndfile_oct_location && octave -qH $octave_script) Chris@0: Chris@0: