3 # This script executes the matrix loops, exclude tests and cleaning.
4 # The matrix can be configured with the following environment variables:
5 # MATRIX_CC, MATRIX_CMAKE, MATRIX_IPV6 and MATRIX_REMOTE.
6 : "${MATRIX_CC:=gcc clang}"
7 : "${MATRIX_CMAKE:=no yes}"
8 : "${MATRIX_IPV6:=no yes}"
9 : "${MATRIX_REMOTE:=no yes}"
10 # Set this variable to "yes" before calling this script to disregard all cmake
11 # warnings in a particular environment (CI or a local working copy). Set it
12 # to "yes" in this script or in build.sh when a matrix subset is known to be
13 # not cmake warning-free because of the version or whatever other factor
14 # that the scripts can detect both in and out of CI.
15 : "${LIBPCAP_CMAKE_TAINTED:=no}"
16 # Set this variable to "yes" before calling this script to disregard all
17 # warnings in a particular environment (CI or a local working copy). Set it
18 # to "yes" in this script or in build.sh when a matrix subset is known to be
19 # not warning-free because of the OS, the compiler or whatever other factor
20 # that the scripts can detect both in and out of CI.
21 : "${LIBPCAP_TAINTED:=no}"
22 # Some OSes have native make without parallel jobs support and sometimes have
23 # GNU Make available as "gmake".
25 # It calls the build.sh script which runs one build with setup environment
26 # variables: CC, CMAKE, IPV6 and REMOTE.
30 # Install directory prefix
31 if [ -z "$PREFIX" ]; then
32 PREFIX
=`mktempdir libpcap_build_matrix`
33 echo "PREFIX set to '$PREFIX'"
37 export LIBPCAP_TAINTED
38 export LIBPCAP_CMAKE_TAINTED
39 if command -v valgrind
>/dev
/null
2>&1; then
40 VALGRIND_CMD
="valgrind --leak-check=full --error-exitcode=1"
45 for CC
in $MATRIX_CC; do
48 if gcc_is_clang_in_disguise
; then
52 for CMAKE
in $MATRIX_CMAKE; do
54 for IPV6
in $MATRIX_IPV6; do
56 for REMOTE
in $MATRIX_REMOTE; do
58 COUNT
=`increment $COUNT`
59 echo_magenta
"===== SETUP $COUNT: CC=$CC CMAKE=$CMAKE IPV6=$IPV6 REMOTE=$REMOTE =====" >&2
60 # Run one build with setup environment variables: CC, CMAKE,
62 run_after_echo .
/build.sh
64 if [ "$CMAKE" = yes ]; then rm -rf build
; else "$MAKE_BIN" distclean
; fi
65 purge_directory
"$PREFIX"
66 run_after_echo git status
-suall
71 run_after_echo
rm -rf "$PREFIX"
72 echo_magenta
"Tested setup count: $COUNT" >&2
73 # vi: set tabstop=4 softtabstop=0 expandtab shiftwidth=4 smarttab autoindent :