2 ##############################################################################
3 # Copyright (c) 2018 The Linux Foundation and others.
5 # All rights reserved. This program and the accompanying materials
6 # are made available under the terms of the Eclipse Public License v1.0
7 # which accompanies this distribution, and is available at
8 # http://www.eclipse.org/legal/epl-v10.html
9 ##############################################################################
12 OS_ID=$(grep '^ID=' /etc/os-release | cut -f2- -d= | sed -e 's/\"//g')
14 if ! [ -z ${DOCKER_TEST} ] ; then
16 # framework.VppTestCase.MIN_REQ_SHM + (num_cores * framework.VppTestCase.SHM_PER_PROCESS)
17 # 1073741824 == 1024M (1073741824 >> 20)
19 if [[ $(uname -m) == 'aarch64' ]]
21 # arm build are running with 16 cores, empirical evidence shows
22 # that 2048M is enough
25 sudo mount -o remount /dev/shm -o size=${MEM} || true
26 echo "/dev/shm remounted"
29 ##container server node detection
30 grep search /etc/resolv.conf || true
32 if [ "${OS_ID}" == "ubuntu" ]; then
33 dpkg-query -W -f='${binary:Package}\t${Version}\n' || true
34 echo "************************************************************************"
37 echo "************************************************************************"
38 echo "Contents of /var/cache/vpp/python/virtualenv/lib/python2.7/site-packages:"
39 ls -lth /var/cache/vpp/python/virtualenv/lib/python2.7/site-packages || true
40 echo "************************************************************************"
41 echo "Contents of br Downloads:"
42 ls -lth /w/Downloads || true
43 echo "************************************************************************"
44 echo "Contents of /w/dpdk for test folks:"
45 echo "************************************************************************"
46 ls -lth /w/dpdk || true
47 elif [ "${OS_ID}" == "centos" ]; then
48 yum list installed || true
50 elif [ "${OS_ID}" == "opensuse" ]; then
51 yum list installed || true
53 elif [ "${OS_ID}" == "opensuse-leap" ]; then
54 yum list installed || true
58 ##This will remove any previously installed dpdk for old branch builds
60 if [ "${GERRIT_BRANCH}" != "master" ]; then
61 if [ "${OS_ID}" == "ubuntu" ]; then
62 sudo apt-get -y remove vpp-dpdk-dev || true
63 sudo apt-get -y remove vpp-dpdk-dkms || true
64 sudo apt-get -y remove vpp-ext-deps || true
65 elif [ "${OS_ID}" == "centos" ]; then
66 sudo yum -y erase vpp-dpdk-devel || true
67 sudo yum -y erase vpp-ext-deps || true
68 sudo yum clean all || true
69 elif [ "${OS_ID}" == "opensuse" ]; then
70 sudo yum -y erase vpp-dpdk-devel || true
71 sudo yum -y erase vpp-ext-deps || true
72 elif [ "${OS_ID}" == "opensuse-leap" ]; then
73 sudo yum -y erase vpp-dpdk-devel || true
74 sudo yum -y erase vpp-ext-deps || true