summaryrefslogtreecommitdiff
path: root/.travis-script.sh
blob: c3a95daa8af0184ca0947e389240825664a88b5c (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
#!/bin/sh

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

date
ls -l configure

shift

properdir="$(pwd)"

mkdir "_build-${buildid}"

set -e
set -x

cd "_build-${buildid}"

if ../configure --prefix="$(cd ".." && pwd)/_root-${buildid}" "$@"
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 "$properdir"

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

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