Skip to content

Commit 5a45204

Browse files
author
Christian Hergert
committed
build: add --notest option to mci.sh
1 parent ef8ce32 commit 5a45204

File tree

1 file changed

+16
-4
lines changed

1 file changed

+16
-4
lines changed

build/mci.sh

Lines changed: 16 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,18 @@ GMAKE=$(which gmake)
2828
MKDIR=$(which mkdir)
2929
PERL=$(which perl)
3030

31+
RUN_TESTS=yes
32+
33+
if [ "$1" = "--notest" ]; then
34+
RUN_TESTS=no
35+
fi
36+
37+
function make_check() {
38+
if [ "${RUN_TESTS}" = "yes" ]; then
39+
${GMAKE} ${MAKEARGS} check
40+
fi
41+
}
42+
3143
# Try to get the OS distributor such as "Fedora"
3244
if [ "${OS}" = "Linux" -a -n "${LSB_RELEASE}" ]; then
3345
DISTRIB="$(${LSB_RELEASE} -i -s)"
@@ -95,7 +107,7 @@ case "${OS}-${ARCH}-${DISTRIB}" in
95107
export PKG_CONFIG_PATH=/usr/lib/pkgconfig
96108
./autogen.sh ${STATIC} ${VERBOSE} ${DEBUG} ${SSL} ${SASL} ${HARDEN} ${OPTIMIZE} --prefix=${PWD}/_install/usr --libdir=${PWD}/_install/usr/lib
97109
${GMAKE} ${MAKEARGS} all
98-
${GMAKE} ${MAKEARGS} check
110+
make_check
99111
${GMAKE} ${MAKEARGS} install
100112
${GMAKE} ${MAKEARGS} clean
101113

@@ -105,7 +117,7 @@ case "${OS}-${ARCH}-${DISTRIB}" in
105117
export PKG_CONFIG_PATH=/usr/lib/${ALT_ARCH}/pkgconfig
106118
./configure ${STATIC} ${VERBOSE} ${DEBUG} ${SSL} ${SASL} ${HARDEN} ${OPTIMIZE} --prefix=${PWD}/_install/usr --libdir=${PWD}/_install/usr/lib/${ALT_ARCH}
107119
${GMAKE} ${MAKEARGS} all
108-
${GMAKE} ${MAKEARGS} check
120+
make_check
109121
${GMAKE} ${MAKEARGS} install
110122

111123
VERSION=$(cat build/version)
@@ -156,7 +168,7 @@ EOF
156168
# Bootstrap, build, and run unit tests.
157169
./autogen.sh ${STATIC} ${VERBOSE} ${DEBUG} ${SSL} ${SASL} ${MAN} ${HARDEN} ${OPTIMIZE}
158170
${GMAKE} ${MAKEARGS} all
159-
${GMAKE} ${MAKEARGS} check
171+
make_check
160172

161173
# Extract the major.minor.micro triplet.
162174
VERSION="$(cat build/version)"
@@ -205,7 +217,7 @@ EOF
205217
*)
206218
./autogen.sh ${STATIC} ${VERBOSE} ${DEBUG} ${SSL} ${SASL} ${HARDEN} ${OPTIMIZE}
207219
${GMAKE} ${MAKEARGS} all
208-
${GMAKE} ${MAKEARGS} check
220+
make_check
209221
;;
210222
esac
211223

0 commit comments

Comments
 (0)