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