File: test-build-matrix.sh

package info (click to toggle)
snoopy 2.5.2-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 3,016 kB
  • sloc: ansic: 7,169; sh: 4,514; makefile: 1,095
file content (103 lines) | stat: -rwxr-xr-x 2,011 bytes parent folder | download | duplicates (3)
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
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
#!/bin/bash



### Configure shell
#
set -e
set -u
set -o pipefail



### Which configurations are we testing
#
CONFIGURE_ARGS_MATRIX=(
    '--enable-output-devlog'   # This is a normal build - we must not have "" so we imitate it with something that is always enabled
    '--enable-everything'
    '--enable-everything --disable-config-file'
    '--enable-everything --disable-filtering'
    '--enable-everything --disable-config-file --disable-filtering'
    '--enable-everything --disable-thread-safety'
    '--disable-everything'
    '--disable-everything --enable-config-file'
    '--disable-everything --enable-config-file --enable-output-file'
    '--disable-everything --enable-filtering'
    '--disable-everything --enable-filtering --enable-datasource-uid'
    '--disable-everything --enable-config-file --enable-filtering'
    '--disable-everything --enable-thread-safety'
)



### Display stuff
#
echo -e "\n\n\n"
cat <<EOF
###
### Starting matrix build test.
### List of ./configure arugments to be tested:
###
EOF
i=0
arrSize=${#CONFIGURE_ARGS_MATRIX[@]}
while [ "x${CONFIGURE_ARGS_MATRIX[i]}" != "x" ]; do
    echo "###    ./configure ${CONFIGURE_ARGS_MATRIX[i]}";

    i=$((i + 1))
    if [ "$i" -ge "$arrSize" ]; then
        break;
    fi
done
echo    "###"



### Initialize build environment
#
echo -e "\n\n\n"
cat <<EOF
###
### Bootstrapping the build environment
###
EOF
./dev-tools/clean-git-repository.sh
./bootstrap.sh



### Loop through the builds
#
i=0
arrSize=${#CONFIGURE_ARGS_MATRIX[@]}
while [ "x${CONFIGURE_ARGS_MATRIX[i]}" != "x" ]; do
    CONFIGURE_ARGS="${CONFIGURE_ARGS_MATRIX[i]}"

    echo -e "\n\n\n"
    cat <<EOF
###
### Starging build with './configure $CONFIGURE_ARGS'
###
EOF

    ./configure $CONFIGURE_ARGS
    make -j16 check
    make distclean

    i=$((i + 1))
    if [ "$i" -ge "$arrSize" ]; then
        break;
    fi
done



### Tell the user what has been done
#
echo -e "\n\n\n"
cat <<EOF
###
### All builds from build matrix passed.
### All done.
###
EOF