diff options
author | Anders Roxell <anders.roxell@linaro.org> | 2015-01-03 01:49:33 +0100 |
---|---|---|
committer | Anders Roxell <anders.roxell@linaro.org> | 2015-01-03 01:49:33 +0100 |
commit | 87de5d2a34aba0cbbd2ffec309b655c5871e0572 (patch) | |
tree | 10e0425cd1ef8031a8432aca398b1d0782d49628 | |
parent | d48211047d1f74533d194253924df9dc51c70f52 (diff) |
helper: cunit: don't cleanup at failure
Signed-off-by: Anders Roxell <anders.roxell@linaro.org>
-rw-r--r-- | helper/cunit | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/helper/cunit b/helper/cunit index c64e556..b424a21 100644 --- a/helper/cunit +++ b/helper/cunit @@ -3,6 +3,7 @@ source ${ROOT_DIR}/helper/vercomp #CUnit vars +CUNIT_BUILD_FAILED=0 BASE_ARCH=${ARCH:-$(uname -m)} CUNIT_VERSION="${CUNIT_VERSION:-"2.1-3"}" export CUNIT_INSTALLDIR=${CUNIT_INSTALLDIR:-${ROOT_DIR}/installed/${BASE_ARCH}/cunit-${CUNIT_VERSION}} @@ -31,13 +32,14 @@ build_cunit() pushd CUnit* > /dev/null [[ -x bootstrap ]] && ./bootstrap >> ${CUNIT_SRCDIR}/log-build.log 2>&1 ./configure --host=${compiler_prefix} --prefix=${CUNIT_INSTALLDIR} >> ${CUNIT_SRCDIR}/log-build.log 2>&1 - make -j ${NUM_CPUS} >> ${CUNIT_SRCDIR}/log-build.log 2>&1 - make install >> ${CUNIT_SRCDIR}/log-build.log 2>&1 + make -j ${NUM_CPUS} >> ${CUNIT_SRCDIR}/log-build.log 2>&1 || { CUNIT_BUILD_FAILED=1; tail -n 40 ${CUNIT_SRCDIR}/log-build.log; exit 1; } + make install >> ${CUNIT_SRCDIR}/log-build.log 2>&1 || { CUNIT_BUILD_FAILED=1; tail -n 40 ${CUNIT_SRCDIR}/log-build.log; exit 1; } popd > /dev/null popd > /dev/null } cunit_cleanup(){ + [[ ${CUNIT_BUILD_FAILED} -eq 1 ]] && return rm -rf ${CUNIT_SRCDIR} } |