summaryrefslogtreecommitdiff
path: root/.travis-script.sh
blob: dee13328683b3bc95fc9b3fbad40409959c6821f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
#!/bin/sh

buildid="${1:?"need buildid"}"

date
ls -l configure

shift

set -x

head -n1 configure
head -n1 .travis-script.sh

pkg-config --short-errors --print-errors --cflags --libs 'libexif >= 0.6.13'

LIBEXIF_PKG_ERRORS="$(pkg-config --short-errors --print-errors --cflags --libs "libexif >= 0.6.13" 2>&1)"

LIBEXIF_PKG_ERRORS=`pkg-config --short-errors --print-errors --cflags --libs "libexif >= 0.6.13" 2>&1`

set -e

abs_topsrcdir="$(pwd)"

mkdir "_build-${buildid}"
cd    "_build-${buildid}"

abs_prefixdir="${abs_topsrcdir}/_root-${buildid}"

if ../configure SLEEP=/bin/true --prefix="$abs_prefixdir" "$@"
then
    echo "Configure successful."
else
    s="$?"
    echo "### BEGIN LOG: config.log ###"
    cat config.log
    echo "### END LOG: config.log ###"
    exit "$?"
fi

make -j2

if make check
then
    echo "\"make check\" successful."
else
    s="$?"
    for log in libgphoto2_port/test/test-suite.log test/test-suite.log
    do
	echo "### BEGIN LOG: $log ###"
	cat "$log"
	echo "### END LOG: $log ###"
    done
    exit "$?"
fi

if test -f tests/print-libgphoto2-version
then
    tests/print-libgphoto2-version
fi

make install

examples/sample-afl

cd "$abs_topsrcdir"

find "_root-${buildid}" -type f | sort

# (cd "_build-${buildid}" && make uninstall clean)