Merge "FIX: Get CSIT branch from build-root/scripts/csit-test-branch"
[ci-management.git] / jjb / vpp / include-raw-vpp-csit-verify-perf.sh
1 #!/bin/bash
2 set -xeu -o pipefail
3
4 export TEST_TAG="PERFTEST_${TYPE^^}"
5
6 # Get CSIT branch from which to test from
7 # running build-root/scripts/csit-test-branch
8 if [ -x build-root/scripts/csit-test-branch ]; then
9     CSIT_BRANCH=`build-root/scripts/csit-test-branch`;
10 fi
11
12 # Clone csit and start tests
13 git clone --depth 1 https://gerrit.fd.io/r/csit --branch ${CSIT_BRANCH:-csit-verified}
14
15 # If the git clone fails, complain clearly and exit
16 if [ $? != 0 ]; then
17     echo "Failed to run: git clone https://gerrit.fd.io/r/csit --branch ${CSIT_BRANCH:-csit-verified}"
18     echo "No such branch ${CSIT_BRANCH:-csit-verified} in https://gerrit.fd.io/r/csit"
19     exit
20 fi
21
22 cp build-root/*.deb csit/
23 cd csit
24 # execute csit bootstrap script if it exists
25 if [ ! -e bootstrap-verify-perf.sh ]
26 then
27     echo 'ERROR: No bootstrap-verify-perf.sh found'
28     exit 1
29 fi
30
31 # make sure that bootstrap-verify-perf.sh is executable
32 chmod +x bootstrap-verify-perf.sh
33 # run the script
34 ./bootstrap-verify-perf.sh *.deb
35
36 # vim: ts=4 ts=4 sts=4 et :