b601137b0ad7c026300b258408abcbaffde25433
[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)' \
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 cd csit
27 # execute csit bootstrap script if it exists
28 if [ ! -e bootstrap-verify-perf.sh ]
29 then
30     echo 'ERROR: No bootstrap-verify-perf.sh found'
31     exit 1
32 fi
33
34 # make sure that bootstrap-verify-perf.sh is executable
35 chmod +x bootstrap-verify-perf.sh
36 # run the script
37 ./bootstrap-verify-perf.sh *.deb
38
39 # vim: ts=4 ts=4 sts=4 et :