[v6,6/13] ci: use dpdk installed with apt-get

Message ID 1534442411-9502-7-git-send-email-odpbot@yandex.ru
State New
Headers show
Series
  • travis: add docker tests
Related show

Commit Message

Github ODP bot Aug. 16, 2018, 6 p.m.
From: Maxim Uvarov <maxim.uvarov@linaro.org>


Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>

---
/** Email created from pull request 647 (muvarov:master_docker2)
 ** https://github.com/Linaro/odp/pull/647
 ** Patch: https://github.com/Linaro/odp/pull/647.patch
 ** Base sha: 6886a2ca3d3dd1157302ddee424c36f632903bd0
 ** Merge commit sha: f6c5d19f7fb9f83b8a2cbbed692a510146ca7df9
 **/
 scripts/ci/build_dpdk.sh   | 89 --------------------------------------
 scripts/ci/build_x86_64.sh |  8 +---
 scripts/ci/coverage.sh     |  6 +--
 3 files changed, 2 insertions(+), 101 deletions(-)
 delete mode 100755 scripts/ci/build_dpdk.sh

Patch

diff --git a/scripts/ci/build_dpdk.sh b/scripts/ci/build_dpdk.sh
deleted file mode 100755
index 9ceac4529..000000000
--- a/scripts/ci/build_dpdk.sh
+++ /dev/null
@@ -1,89 +0,0 @@ 
-#!/bin/bash -x
-
-set -e
-
-DPDK_VERS="17.11.2"
-CROSS=
-
-
-case "$CROSS_ARCH" in
-  "arm64")
-    DPDK_TARGET="arm64-armv8a-linuxapp-"
-    ;;
-  "armhf")
-    DPDK_TARGET="arm-armv7a-linuxapp-"
-    ;;
-  "i386")
-    DPDK_TARGET="i686-native-linuxapp-"
-    ;;
-  "")
-    DPDK_TARGET="x86_64-native-linuxapp-"
-    DPDK_MACHINE=snb
-    ;;
-esac
-
-
-if [ -n "$DPDK_TARGET" ] ; then
- if [ "${CC#clang}" != "${CC}" ] ; then
-  DPDKCC=clang ;
- else
-  DPDKCC=gcc ;
- fi
- if [ -n "$DPDK_SHARED" ] ; then
-  TARGET="${DPDK_TARGET}$DPDKCC"-shared
-  LIBDPDKEXT=so
-  export LD_LIBRARY_PATH="`pwd`/${TARGET}:$LD_LIBRARY_PATH"
-  echo $LD_LIBRARY_PATH
- else
-  TARGET="${DPDK_TARGET}$DPDKCC"
-  LIBDPDKEXT=a
- fi
- DPDK_TARGET="${DPDK_TARGET}gcc"
- CACHED_DPDK_VERS=`fgrep Version dpdk/pkg/dpdk.spec | cut -d " " -f 2`
- if [ ! -d dpdk -o "${CACHED_DPDK_VERS}" != "${DPDK_VERS}" ]; then
-  rm -rf dpdk
-  mkdir dpdk
-  pushd dpdk
-  git init
-  git -c advice.detachedHead=false fetch -q --depth=1 http://dpdk.org/git/dpdk-stable v${DPDK_VERS}
-  git checkout -f FETCH_HEAD
-  popd
- fi
- if [ ! -f "dpdk/${TARGET}/usr/local/lib/libdpdk.$LIBDPDKEXT" ]; then
-  pushd dpdk
-  git log --oneline --decorate
-  # AArch64 && ARMv7 fixup
-  sed -i -e 's/40900/40800/g' lib/librte_eal/common/include/arch/arm/rte_vect.h
-  sed -i -e 's/!(/!(defined(__arm__) \&\& defined(__clang__) || /g' lib/librte_eal/common/include/arch/arm/rte_byteorder.h
-  sed -i -e 's/__GNUC__/defined(__arm__) \&\& defined(__clang__) || __GNUC__/' lib/librte_eal/common/include/generic/rte_byteorder.h
-  sed -i -e 's,\$(CC),\0 $(EXTRA_CFLAGS),g' lib/librte_acl/Makefile
-  make config T=${DPDK_TARGET} O=${TARGET}
-  pushd ${TARGET}
-  sed -ri 's,(CONFIG_RTE_LIBRTE_PMD_PCAP=).*,\1y,' .config
-  # OCTEON TX driver includes ARM v8.1 instructions
-  sed -ri 's,(CONFIG_RTE_LIBRTE_OCTEONTX_PMD=).*,\1n,' .config
-  sed -ri 's,(CONFIG_RTE_LIBRTE_PMD_OCTEONTX_SSOVF=).*,\1n,' .config
-  sed -ri 's,(CONFIG_RTE_LIBRTE_OCTEONTX_MEMPOOL=).*,\1n,' .config
-  if test -n "${DPDK_MACHINE}" ; then
-    sed -ri 's,(CONFIG_RTE_MACHINE=).*,\1"'${DPDK_MACHINE}'",' .config
-  fi
-  if test -n "${DPDK_SHARED}" ; then
-    sed -ri 's,(CONFIG_RTE_BUILD_SHARED_LIB=).*,\1y,' .config
-  fi
-  if test -n "$CROSS_ARCH" ; then
-    sed -ri -e 's,(CONFIG_RTE_EAL_IGB_UIO=).*,\1n,' .config
-    sed -ri -e 's,(CONFIG_RTE_KNI_KMOD=).*,\1n,' .config
-  fi
-  sed -ri -e 's,(CONFIG_RTE_TOOLCHAIN=).*,\1"'${DPDKCC}'",' .config
-  sed -ri -e '/CONFIG_RTE_TOOLCHAIN_.*/d' .config
-  echo CONFIG_RTE_TOOLCHAIN_${DPDKCC^^}=y >> .config
-  popd
-  make build O=${TARGET} EXTRA_CFLAGS="-fPIC $DPDK_CFLAGS" CROSS="$DPDK_CROSS" CC="${CC}" HOSTCC="gcc" -j $(nproc)
-  make install O=${TARGET} DESTDIR=${TARGET}
-  pwd
-  rm -r ./doc ./${TARGET}/app ./${TARGET}/build
-  popd
- fi
-fi
-
-echo "`pwd`/dpdk/${TARGET}/usr/local" > /tmp/dpdk_install_dir
diff --git a/scripts/ci/build_x86_64.sh b/scripts/ci/build_x86_64.sh
index d49271d9e..1356dcdc9 100755
--- a/scripts/ci/build_x86_64.sh
+++ b/scripts/ci/build_x86_64.sh
@@ -10,12 +10,6 @@  CWD=$(dirname "$0")
 TDIR=`mktemp -d -p ~`
 
 cd ${TDIR}
-export CROSS_ARCH=""
-
-export TARGET="x86_64$DPDKCC"
-
-$CWD/build_dpdk.sh
-DPDKPATH=`cat /tmp/dpdk_install_dir`
 
 echo 1000 | tee /proc/sys/vm/nr_hugepages
 mkdir -p /mnt/huge
@@ -25,7 +19,7 @@  git clone ${CWD}/../../ odp
 cd ./odp
 ./bootstrap
 ./configure ${CONF} \
-	--with-dpdk-path=${DPDKPATH}
+	--enable-dpdk
 
 make -j 8
 # Ignore possible failures there because these tests depends on measurements
diff --git a/scripts/ci/coverage.sh b/scripts/ci/coverage.sh
index 0d812e82b..279ab5dcf 100755
--- a/scripts/ci/coverage.sh
+++ b/scripts/ci/coverage.sh
@@ -10,17 +10,13 @@  CWD=$(dirname "$0")
 TDIR=`mktemp -d -p ~`
 
 cd ${TDIR}
-export CROSS_ARCH=""
-export TARGET="x86_64$DPDKCC"
-
-$CWD/build_dpdk.sh
 
 git clone ${CWD}/../../ odp
 cd ./odp
 ./bootstrap
 ./configure \
 	CFLAGS="-O0 -coverage" CXXFLAGS="-O0 -coverage" LDFLAGS="--coverage" \
-	--enable-debug=full --enable-helper-linux
+	--enable-debug=full --enable-helper-linux --enable-dpdk
 export CCACHE_DISABLE=1
 make -j $(nproc)