diff options
author | Anders Roxell <anders.roxell@linaro.org> | 2015-04-09 12:36:00 +0200 |
---|---|---|
committer | Anders Roxell <anders.roxell@linaro.org> | 2015-04-09 13:34:04 +0200 |
commit | e09eb1b81dfaab9286c816bac44a54401fd0556a (patch) | |
tree | f02820107a6ca9254a61e1bee819c3d13413eed9 /helper | |
parent | 92d39e95b0b9656cbf3330f98737b474cd4c40f5 (diff) |
helper: cunit: don't build cunit or ODP-validation tests
Signed-off-by: Anders Roxell <anders.roxell@linaro.org>
Reviewed-by: Mike Holmes <mike.holmes@linaro.org>
Diffstat (limited to 'helper')
-rw-r--r-- | helper/cunit | 36 |
1 files changed, 20 insertions, 16 deletions
diff --git a/helper/cunit b/helper/cunit index 4616889..17c8ef6 100644 --- a/helper/cunit +++ b/helper/cunit @@ -6,12 +6,14 @@ source ${ROOT_DIR}/helper/vercomp CUNIT_BUILD_FAILED=0 BASE_ARCH=${ARCH:-$(uname -m)} CUNIT_VERSION="${CUNIT_VERSION:-"2.1-3"}" +VALIDATION="${VALIDATION:-"1"}" export CUNIT_SRCDIR=${SRCDIR}/cunit-${CUNIT_VERSION} export CUNIT_BUILDDIR=${BUILDDIR}/cunit cunit_usage() { echo -e "\tCUNIT_VERSION:\t Change version from sourceforge.net, default: ${CUNIT_VERSION}" + echo -e "\tVALIDATION:\t set 0 to disable building validation tests, default: 1" } if [[ $(vercomp "2.1-3 $CUNIT_VERSION") == "<" ]]; then @@ -21,25 +23,27 @@ SF_CUNIT=${SF_CUNIT:-http://people.linaro.org/~anders.roxell/CUnit/${CUNIT_VERSI build_cunit() { - export CUNIT_INSTALLDIR=${CUNIT_INSTALLDIR:-${ROOT_DIR}/installed/${BASE_ARCH}/cunit-${CUNIT_VERSION}} - echo "Building CUnit-${CUNIT_VERSION}" - export EXTRA_FLAGS="${EXTRA_FLAGS} --enable-test-vald --with-cunit-path=${CUNIT_INSTALLDIR}" - [[ -f ${CUNIT_INSTALLDIR}/lib/libcunit.a ]] && return + if [[ ${VALIDATION} -eq 1 ]]; then + export CUNIT_INSTALLDIR=${CUNIT_INSTALLDIR:-${ROOT_DIR}/installed/${BASE_ARCH}/cunit-${CUNIT_VERSION}} + echo "Building CUnit-${CUNIT_VERSION}" + export EXTRA_FLAGS="${EXTRA_FLAGS} --enable-test-vald --with-cunit-path=${CUNIT_INSTALLDIR}" + [[ -f ${CUNIT_INSTALLDIR}/lib/libcunit.a ]] && return - if [[ ${M32_ON_64} -eq 1 ]]; then - M32_CC="CFLAGS=-m32" - M32_LD="LDFLAGS=-m32" - fi + if [[ ${M32_ON_64} -eq 1 ]]; then + M32_CC="CFLAGS=-m32" + M32_LD="LDFLAGS=-m32" + fi - cunit_fetch - cunit_new_builddir + cunit_fetch + cunit_new_builddir - pushd ${CUNIT_BUILDDIR} > /dev/null - [[ -x bootstrap ]] && ./bootstrap >> ${CUNIT_BUILDDIR}/log-build.log 2>&1 - ./configure --host=${compiler_prefix} --prefix=${CUNIT_INSTALLDIR} ${M32_CC} ${M32_LD} >> ${CUNIT_BUILDDIR}/log-build.log 2>&1 - make -j ${NUM_CPUS} >> ${CUNIT_BUILDDIR}/log-build.log 2>&1 || { CUNIT_BUILD_FAILED=1; tail -n 40 ${CUNIT_BUILDDIR}/log-build.log; exit 1; } - make install >> ${CUNIT_BUILDDIR}/log-build.log 2>&1 || { CUNIT_BUILD_FAILED=1; tail -n 40 ${CUNIT_BUILDDIR}/log-build.log; exit 1; } - popd > /dev/null + pushd ${CUNIT_BUILDDIR} > /dev/null + [[ -x bootstrap ]] && ./bootstrap >> ${CUNIT_BUILDDIR}/log-build.log 2>&1 + ./configure --host=${compiler_prefix} --prefix=${CUNIT_INSTALLDIR} ${M32_CC} ${M32_LD} >> ${CUNIT_BUILDDIR}/log-build.log 2>&1 + make -j ${NUM_CPUS} >> ${CUNIT_BUILDDIR}/log-build.log 2>&1 || { CUNIT_BUILD_FAILED=1; tail -n 40 ${CUNIT_BUILDDIR}/log-build.log; exit 1; } + make install >> ${CUNIT_BUILDDIR}/log-build.log 2>&1 || { CUNIT_BUILD_FAILED=1; tail -n 40 ${CUNIT_BUILDDIR}/log-build.log; exit 1; } + popd > /dev/null + fi } cunit_cleanup(){ |