-# clang is not working with ASAN right now - see change 27268
-# apparently gcc neither...
-# export CC=gcc
-
-make UNATTENDED=yes install-dep
-make UNATTENDED=yes install-ext-deps
-make UNATTENDED=yes build
-make UNATTENDED=yes TEST_JOBS=auto test-debug
+make_build_test_debug() {
+ if ! make UNATTENDED=yes install-dep ; then
+ BUILD_ERROR="FAILED 'make install-dep'"
+ return
+ fi
+ if ! make UNATTENDED=yes install-ext-deps ; then
+ BUILD_ERROR="FAILED 'make install-ext-deps'"
+ return
+ fi
+ if ! make UNATTENDED=yes build ; then
+ BUILD_ERROR="FAILED 'make build'"
+ return
+ fi
+ if [ "${OS_ID}-${OS_VERSION_ID}" == "${MAKE_TEST_OS}" ] ; then
+ if [ -n "${MAKE_PARALLEL_JOBS}" ] ; then
+ TEST_JOBS="${MAKE_PARALLEL_JOBS}"
+ echo "Testing VPP with ${TEST_JOBS} cores."
+ else
+ TEST_JOBS="auto"
+ echo "Testing VPP with automatically calculated number of cores. " \
+ "See test logs for the exact number."
+ fi
+ if ! make UNATTENDED=yes TEST_JOBS="$TEST_JOBS" test-debug ; then
+ BUILD_ERROR="FAILED 'make UNATTENDED=yes TEST_JOBS=$TEST_JOBS test-debug'"
+ return
+ fi
+ else
+ echo "Skip running 'make test-debug' on ${OS_ID}-${OS_VERSION_ID}"
+ fi
+}