Mercurial > hg > sv-dependency-builds
comparison src/libsndfile-1.0.27/Octave/octave_test.sh @ 40:1df64224f5ac
Current libsndfile source
author | Chris Cannam |
---|---|
date | Tue, 18 Oct 2016 13:22:47 +0100 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
39:7ddb4fc30dac | 40:1df64224f5ac |
---|---|
1 #!/bin/bash | |
2 | |
3 | |
4 # Check where we're being run from. | |
5 if test -d Octave ; then | |
6 cd Octave | |
7 octave_src_dir=$(pwd) | |
8 elif test -z "$octave_src_dir" ; then | |
9 echo | |
10 echo "Error : \$octave_src_dir is undefined." | |
11 echo | |
12 exit 1 | |
13 else | |
14 octave_src_dir=$(cd $octave_src_dir && pwd) | |
15 fi | |
16 | |
17 # Find libsndfile shared object. | |
18 libsndfile_lib_location="" | |
19 | |
20 if test -f "../src/.libs/libsndfile.so" ; then | |
21 libsndfile_lib_location="../src/.libs/" | |
22 elif test -f "../src/libsndfile.so" ; then | |
23 libsndfile_lib_location="../src/" | |
24 elif test -f "../src/.libs/libsndfile.dylib" ; then | |
25 libsndfile_lib_location="../src/.libs/" | |
26 elif test -f "../src/libsndfile.dylib" ; then | |
27 libsndfile_lib_location="../src/" | |
28 else | |
29 echo | |
30 echo "Not able to find the libsndfile shared lib we've just built." | |
31 echo "This may cause the following test to fail." | |
32 echo | |
33 fi | |
34 | |
35 libsndfile_lib_location=`(cd $libsndfile_lib_location && pwd)` | |
36 | |
37 | |
38 # Find sndfile.oct | |
39 sndfile_oct_location="" | |
40 | |
41 if test -f .libs/sndfile.oct ; then | |
42 sndfile_oct_location=".libs" | |
43 elif test -f sndfile.oct ; then | |
44 sndfile_oct_location="." | |
45 else | |
46 echo "Not able to find the sndfile.oct binaries we've just built." | |
47 exit 1 | |
48 fi | |
49 | |
50 case `file -b $sndfile_oct_location/sndfile.oct` in | |
51 ELF*) | |
52 ;; | |
53 Mach*) | |
54 echo "Tests don't work on this platform." | |
55 exit 0 | |
56 ;; | |
57 *) | |
58 echo "Not able to find the sndfile.oct binary we just built." | |
59 exit 1 | |
60 ;; | |
61 esac | |
62 | |
63 | |
64 # Make sure the TERM environment variable doesn't contain anything wrong. | |
65 unset TERM | |
66 # echo "octave_src_dir : $octave_src_dir" | |
67 # echo "libsndfile_lib_location : $libsndfile_lib_location" | |
68 # echo "sndfile_oct_location : $sndfile_oct_location" | |
69 | |
70 if test ! -f PKG_ADD ; then | |
71 cp $octave_src_dir/PKG_ADD . | |
72 fi | |
73 | |
74 export LD_LIBRARY_PATH="$libsndfile_lib_location:$LD_LIBRARY_PATH" | |
75 | |
76 octave_script="$octave_src_dir/octave_test.m" | |
77 | |
78 (cd $sndfile_oct_location && octave -qH $octave_script) | |
79 res=$? | |
80 echo | |
81 exit $res |