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 # Custom path to Valgrind (default: use "valgrind" if available). Set to
26 # "false" to avoid using Valgrind on a slow host.
27 : "${VALGRIND_BIN:=valgrind}"
28 # It calls the build.sh script which runs one build with setup environment
29 # variables: CC, CMAKE, IPV6 and REMOTE.
33 # Install directory prefix
34 if [ -z "$PREFIX" ]; then
35 PREFIX
=`mktempdir libpcap_build_matrix`
36 echo "PREFIX set to '$PREFIX'"
40 export LIBPCAP_TAINTED
41 export LIBPCAP_CMAKE_TAINTED
42 if "$VALGRIND_BIN" --version >/dev
/null
2>&1; then
43 VALGRIND_CMD
="$VALGRIND_BIN --leak-check=full --error-exitcode=1 --quiet"
45 # With Valgrind filtertest takes significantly longer to complete.
46 : "${FILTERTEST_TIMEOUT:=5}"
47 export FILTERTEST_TIMEOUT
50 run_after_echo git show
--oneline -s |
cat
52 for CC
in $MATRIX_CC; do
55 if gcc_is_clang_in_disguise
; then
59 for CMAKE
in $MATRIX_CMAKE; do
61 for IPV6
in $MATRIX_IPV6; do
63 for REMOTE
in $MATRIX_REMOTE; do
65 COUNT
=`increment "$COUNT"`
66 echo_magenta
"===== SETUP $COUNT: CC=$CC CMAKE=$CMAKE IPV6=$IPV6 REMOTE=$REMOTE =====" >&2
67 # Run one build with setup environment variables: CC, CMAKE,
69 run_after_echo .
/build.sh
71 if [ "$CMAKE" = yes ]; then rm -rf build
; else "$MAKE_BIN" distclean
; fi
72 purge_directory
"$PREFIX"
73 run_after_echo git status
-suall
78 run_after_echo
rm -rf "$PREFIX"
79 echo_magenta
"Tested setup count: $COUNT" >&2
80 # vi: set tabstop=4 softtabstop=0 expandtab shiftwidth=4 smarttab autoindent :