diff mbox series

[v5,6/8] ci: rewrite coverage and distcheck scripts to follow other build scripts

Message ID 1535410807-29034-7-git-send-email-odpbot@yandex.ru
State New
Headers show
Series [v5,1/8] travis: fix DOCKER_NAMESPACE variable setting | expand

Commit Message

Github ODP bot Aug. 27, 2018, 11 p.m. UTC
From: Dmitry Eremin-Solenikov <dmitry.ereminsolenikov@linaro.org>


Signed-off-by: Dmitry Eremin-Solenikov <dmitry.ereminsolenikov@linaro.org>

---
/** Email created from pull request 681 (lumag:travis-xenial)
 ** https://github.com/Linaro/odp/pull/681
 ** Patch: https://github.com/Linaro/odp/pull/681.patch
 ** Base sha: 6ce60cac1fea6d65803740f5f9b6627abf6814b3
 ** Merge commit sha: 8c5d835ef3fbc6ab78503945fef582f7c60ac2c9
 **/
 scripts/ci/coverage.sh  | 27 +++++++++------------------
 scripts/ci/distcheck.sh | 22 +++++++---------------
 2 files changed, 16 insertions(+), 33 deletions(-)
diff mbox series

Patch

diff --git a/scripts/ci/coverage.sh b/scripts/ci/coverage.sh
index 51ee277e2..2f285e95c 100755
--- a/scripts/ci/coverage.sh
+++ b/scripts/ci/coverage.sh
@@ -1,21 +1,11 @@ 
 #!/bin/bash
 set -e
 
-# CC LD AR CXX has to be predifubed
-#
-
-export PKG_CONFIG_PATH="$HOME/cunit-install/x86_64/lib/pkgconfig:${PKG_CONFIG_PATH}"
-
-CWD=$(dirname "$0")
-TDIR=`mktemp -d -p ~`
-
-cd ${TDIR}
-echo 1000 | tee /proc/sys/vm/nr_hugepages
-mkdir -p /mnt/huge
-mount -t hugetlbfs nodev /mnt/huge
+if [ "${CC#clang}" != "${CC}" ] ; then
+	export CXX="clang++"
+fi
 
-git clone ${CWD}/../../ odp
-cd ./odp
+cd "$(dirname "$0")"/../..
 ./bootstrap
 ./configure \
 	CFLAGS="-O0 -coverage $CLFAGS" CXXFLAGS="-O0 -coverage $CXXFLAGS" LDFLAGS="--coverage $LDFLAGS" \
@@ -23,7 +13,11 @@  cd ./odp
 export CCACHE_DISABLE=1
 make -j $(nproc)
 
-# ignore possible failures there because these tests depends on measurements
+echo 1000 | tee /proc/sys/vm/nr_hugepages
+mkdir -p /mnt/huge
+mount -t hugetlbfs nodev /mnt/huge
+
+# Ignore possible failures there because these tests depends on measurements
 # and systems might differ in performance.
 export CI="true"
 
@@ -50,7 +44,4 @@  fi
 
 bash <(curl -s https://codecov.io/bash) -X coveragepy
 
-cd ~
-rm -rf ${TDIR}
-
 umount /mnt/huge
diff --git a/scripts/ci/distcheck.sh b/scripts/ci/distcheck.sh
index 22013473b..4f3802451 100755
--- a/scripts/ci/distcheck.sh
+++ b/scripts/ci/distcheck.sh
@@ -1,25 +1,17 @@ 
 #!/bin/bash
 set -e
 
-# CC LD AR CXX has to be predifubed
-#
+if [ "${CC#clang}" != "${CC}" ] ; then
+	export CXX="clang++"
+fi
 
-export PKG_CONFIG_PATH="$HOME/cunit-install/x86_64/lib/pkgconfig:${PKG_CONFIG_PATH}"
-
-CWD=$(dirname "$0")
-TDIR=`mktemp -d -p ~`
-
-cd ${TDIR}
-git clone ${CWD}/../../ odp
-cd ./odp
+cd "$(dirname "$0")"/../..
 ./bootstrap
-./configure --enable-user-guides
+./configure \
+	--enable-user-guides
 
-make clean
 make distcheck
 
 make clean
-make distcheck DISTCHECK__CONFIGURE_FLAGS=--disable-abi-compat
 
-cd ~
-rm -rf ${TDIR}
+make distcheck DISTCHECK__CONFIGURE_FLAGS=--disable-abi-compat