X-Git-Url: https://gerrit.fd.io/r/gitweb?a=blobdiff_plain;f=jjb%2Fscripts%2Fsetup_vpp_ubuntu_docker_test.sh;h=548ac56601b69d77d1d0caddd0a249c13a0f9eb9;hb=74b0fa2272808574c561d6e5a3aa3ae2768a124a;hp=c9000df9f0df8275c7c2fb579d31c4299eae6862;hpb=63ff27b60efeb55c5d2224fe576f6fbd7b32c4de;p=ci-management.git diff --git a/jjb/scripts/setup_vpp_ubuntu_docker_test.sh b/jjb/scripts/setup_vpp_ubuntu_docker_test.sh old mode 100644 new mode 100755 index c9000df9f..548ac5660 --- a/jjb/scripts/setup_vpp_ubuntu_docker_test.sh +++ b/jjb/scripts/setup_vpp_ubuntu_docker_test.sh @@ -1,60 +1,32 @@ #!/bin/bash + ############################################################################## -# Copyright (c) 2018 The Linux Foundation and others. +# Copyright (c) 2021 The Linux Foundation and others. # # All rights reserved. This program and the accompanying materials # are made available under the terms of the Eclipse Public License v1.0 # which accompanies this distribution, and is available at # http://www.eclipse.org/legal/epl-v10.html ############################################################################## -set -e -o pipefail -OS_ID=$(grep '^ID=' /etc/os-release | cut -f2- -d= | sed -e 's/\"//g') - -if ! [ -z ${DOCKER_TEST} ] ; then - mount -o remount /dev/shm -o size=512M || true - echo "/dev/shm remounted" -fi +echo "---> jjb/scripts/setup_vpp_ubuntu_docker_test.sh" -##container server node detection -grep search /etc/resolv.conf || true - -if [ "${OS_ID}" == "ubuntu" ]; then - dpkg-query -W -f='${binary:Package}\t${Version}\n' || true - echo "************************************************************************" - echo "pip list:" - pip list || true - echo "************************************************************************" - echo "Contents of /var/cache/vpp/python/virtualenv/lib/python2.7/site-packages:" - ls -lth /var/cache/vpp/python/virtualenv/lib/python2.7/site-packages || true - echo "************************************************************************" - echo "Contents of br Downloads:" - ls -lth /w/Downloads || true - echo "************************************************************************" - echo "Contents of /w/dpdk for test folks:" - echo "************************************************************************" - ls -lth /w/dpdk || true -elif [ "${OS_ID}" == "centos" ]; then - yum list installed || true - pip list || true -elif [ "${OS_ID}" == "opensuse" ]; then - yum list installed || true - pip list || true -fi +set -e -o pipefail -##This will remove any previously installed dpdk for old branch builds +OS_ID=$(grep '^ID=' /etc/os-release | cut -f2- -d= | sed -e 's/\"//g') +OS_VERSION_ID=$(grep '^VERSION_ID=' /etc/os-release | cut -f2- -d= | sed -e 's/\"//g') -if [ "${GERRIT_BRANCH}" != "master" ]; then - if [ "${OS_ID}" == "ubuntu" ]; then - apt-get -y remove vpp-dpdk-dev || true - apt-get -y remove vpp-dpdk-dkms || true - apt-get -y remove vpp-ext-deps || true - elif [ "${OS_ID}" == "centos" ]; then - yum -y erase vpp-dpdk-devel || true - yum -y erase vpp-ext-deps || true - yum clean all || true - elif [ "${OS_ID}" == "opensuse" ]; then - yum -y erase vpp-dpdk-devel || true - yum -y erase vpp-ext-deps || true - fi +if [ -n ${DOCKER_TEST} ] ; then + # for 4 cores: + # framework.VppTestCase.MIN_REQ_SHM + (num_cores * framework.VppTestCase.SHM_PER_PROCESS) + # 1073741824 == 1024M (1073741824 >> 20) + MEM=1024M + if [[ ${MAKE_PARALLEL_JOBS} == '16' ]] + then + # arm build are running with 16 cores, empirical evidence shows + # that 2048M is enough + MEM=2048M + fi + sudo mount -o remount /dev/shm -o size=${MEM} || true + echo "/dev/shm remounted with size='${MEM}'" fi