61d183c816da383605b913238216cfcb2b90c461
[framework/connectivity/libgphoto2.git] / tests / check-camera-list.sh
1 #!/bin/sh
2 # "make installcheck" testcase:
3 # Lists all cameras found by libgphoto2.
4 # Fails if no cameras are found.
5
6 set -e
7
8 debug=:
9 #debug=false
10
11 PACKAGE_TARNAME="${PACKAGE_TARNAME-"libgphoto2"}"
12 prefix="${prefix-"/usr"}"
13 exec_prefix="${exec_prefix-"/usr"}"
14 libdir="${libdir-"/usr/lib"}"
15 libexecdir="${libexecdir-"/usr/libexec"}"
16 camlibdir="${camlibdir-"${libdir}/libgphoto2/2.4.11"}"
17 CAMLIBS="${DESTDIR}${camlibdir}"
18 export CAMLIBS
19 LD_LIBRARY_PATH="${DESTDIR}/${libdir}${LD_LIBRARY_PATH+:${LD_LIBRARY_PATH}}"
20 export LD_LIBRARY_PATH
21
22
23 if test -d "${CAMLIBS}"; then :; else
24     echo "camlibs directory '${CAMLIBS}' does not exist"
25     exit 13
26 fi
27
28 if "$debug"; then
29     echo "====================="
30     pwd
31     echo "camlibdir=$camlibdir"
32     echo "libdir=$libdir"
33     echo "DESTDIR=$DESTDIR"
34     echo "CAMLIBS=$CAMLIBS"
35     echo "LD_LIBRARY_PATH=$LD_LIBRARY_PATH"
36     echo "#####################"
37 fi
38
39 set -x
40 ./test-camera-list