Correction in script for building longbow docs
[ci-management.git] / jjb / vpp / include-raw-vpp-csit-verify-perf.sh
1 #!/bin/bash
2 set -xeu -o pipefail
3
4 TRIGGER=`echo ${GERRIT_EVENT_COMMENT_TEXT} \
5     | grep -oE 'vpp-verify-perf-(l2|ip4|ip6|lisp|vxlan|vhost|acl|memif|ipsechw)' \
6     | awk '{print toupper($0)}'`
7 export TEST_TAG=${TRIGGER}
8
9 # Get CSIT branch from which to test from
10 # running build-root/scripts/csit-test-branch
11 if [ -x build-root/scripts/csit-test-branch ]; then
12     CSIT_BRANCH=`build-root/scripts/csit-test-branch`;
13 fi
14
15 # Clone csit and start tests
16 git clone --depth 1 https://gerrit.fd.io/r/csit --branch ${CSIT_BRANCH:-csit-verified}
17
18 # If the git clone fails, complain clearly and exit
19 if [ $? != 0 ]; then
20     echo "Failed to run: git clone https://gerrit.fd.io/r/csit --branch ${CSIT_BRANCH:-csit-verified}"
21     echo "No such branch ${CSIT_BRANCH:-csit-verified} in https://gerrit.fd.io/r/csit"
22     exit
23 fi
24
25 cp build-root/*.deb csit/
26 if [ -e dpdk/vpp-dpdk-dkms*.deb ]
27 then
28     cp dpdk/vpp-dpdk-dkms*.deb csit/
29 else
30     cp /var/cache/apt/archives/vpp-dpdk-dkms*.deb csit/
31 fi
32
33 cd csit
34 # execute csit bootstrap script if it exists
35 if [ ! -e bootstrap-verify-perf.sh ]
36 then
37     echo 'ERROR: No bootstrap-verify-perf.sh found'
38     exit 1
39 fi
40
41 # make sure that bootstrap-verify-perf.sh is executable
42 chmod +x bootstrap-verify-perf.sh
43 # run the script
44 ./bootstrap-verify-perf.sh *.deb
45
46 # vim: ts=4 ts=4 sts=4 et :