summaryrefslogtreecommitdiffstats
path: root/jjb/vpp/include-raw-vpp-csit-verify-perf.sh
blob: 82cce8ae9cc26a2d5a503f0954a272e977eb5a5b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
#!/bin/bash
set -xeu -o pipefail

TRIGGER=`echo ${GERRIT_EVENT_COMMENT_TEXT} \
    | grep -oE 'vpp-verify-perf-(l2|ip4|ip6|lisp|vxlan|vhost|acl)' \
    | awk '{print toupper($0)}'`
export TEST_TAG=${TRIGGER}

# Get CSIT branch from which to test from
# running build-root/scripts/csit-test-branch
if [ -x build-root/scripts/csit-test-branch ]; then
    CSIT_BRANCH=`build-root/scripts/csit-test-branch`;
fi

# Clone csit and start tests
git clone --depth 1 https://gerrit.fd.io/r/csit --branch ${CSIT_BRANCH:-csit-verified}

# If the git clone fails, complain clearly and exit
if [ $? != 0 ]; then
    echo "Failed to run: git clone https://gerrit.fd.io/r/csit --branch ${CSIT_BRANCH:-csit-verified}"
    echo "No such branch ${CSIT_BRANCH:-csit-verified} in https://gerrit.fd.io/r/csit"
    exit
fi

cp build-root/*.deb csit/
if [ -e dpdk/vpp-dpdk-dkms*.deb ]
then
    cp dpdk/vpp-dpdk-dkms*.deb csit/
else
    cp /var/cache/apt/archives/vpp-dpdk-dkms*.deb csit/
fi

cd csit
# execute csit bootstrap script if it exists
if [ ! -e bootstrap-verify-perf.sh ]
then
    echo 'ERROR: No bootstrap-verify-perf.sh found'
    exit 1
fi

# make sure that bootstrap-verify-perf.sh is executable
chmod +x bootstrap-verify-perf.sh
# run the script
./bootstrap-verify-perf.sh *.deb

# vim: ts=4 ts=4 sts=4 et :