diff options
Diffstat (limited to 'jjb/scripts/setup_vpp_ubuntu_docker_test.sh')
-rw-r--r-- | jjb/scripts/setup_vpp_ubuntu_docker_test.sh | 61 |
1 files changed, 15 insertions, 46 deletions
diff --git a/jjb/scripts/setup_vpp_ubuntu_docker_test.sh b/jjb/scripts/setup_vpp_ubuntu_docker_test.sh index bdc1257f..00d14c3e 100644 --- a/jjb/scripts/setup_vpp_ubuntu_docker_test.sh +++ b/jjb/scripts/setup_vpp_ubuntu_docker_test.sh @@ -1,4 +1,5 @@ #!/bin/bash + ############################################################################## # Copyright (c) 2018 The Linux Foundation and others. # @@ -7,11 +8,14 @@ # which accompanies this distribution, and is available at # http://www.eclipse.org/legal/epl-v10.html ############################################################################## + +echo "---> jjb/scripts/setup_vpp_ubuntu_docker_test.sh" + set -e -o pipefail OS_ID=$(grep '^ID=' /etc/os-release | cut -f2- -d= | sed -e 's/\"//g') -if ! [ -z ${DOCKER_TEST} ] ; then +if [ -n ${DOCKER_TEST} ] ; then # for 4 cores: # framework.VppTestCase.MIN_REQ_SHM + (num_cores * framework.VppTestCase.SHM_PER_PROCESS) # 1073741824 == 1024M (1073741824 >> 20) @@ -22,55 +26,20 @@ if ! [ -z ${DOCKER_TEST} ] ; then # that 2048M is enough MEM=2048M fi - sudo mount -o remount /dev/shm -o size=${MEM} || true - echo "/dev/shm remounted" + sudo mount -o remount /dev/shm -o size=${MEM} || true + echo "/dev/shm remounted with size='${MEM}'" fi -##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 -elif [ "${OS_ID}" == "opensuse-leap" ]; then - yum list installed || true - pip list || true -fi - -##This will remove any previously installed dpdk for old branch builds - +# This will remove any previously installed external packages +# for old branch builds if [ "${GERRIT_BRANCH}" != "master" ]; then - if [ "${OS_ID}" == "ubuntu" ]; then - sudo apt-get -y remove vpp-dpdk-dev || true - sudo apt-get -y remove vpp-dpdk-dkms || true - sudo apt-get -y remove vpp-ext-deps || true - elif [ "${OS_ID}" == "centos" ]; then - sudo yum -y erase vpp-dpdk-devel || true + if [ "${OS_ID,,}" == "ubuntu" ] || [ "${OS_ID,,}" == "debian" ] ; then + [ -n "$(dpkg -l | grep vpp-ext-deps)" ] \ + && sudo apt-get -y remove vpp-ext-deps + elif [ "${OS_ID,,}" == "centos" ]; then sudo yum -y erase vpp-ext-deps || true sudo yum clean all || true - elif [ "${OS_ID}" == "opensuse" ]; then - sudo yum -y erase vpp-dpdk-devel || true - sudo yum -y erase vpp-ext-deps || true - elif [ "${OS_ID}" == "opensuse-leap" ]; then - sudo yum -y erase vpp-dpdk-devel || true - sudo yum -y erase vpp-ext-deps || true + else + echo "ERROR: Unsupported OS '$OS_ID'!" fi fi |