Merge "Add make test-checkstyle"
[ci-management.git] / jjb / hc2vpp / include-raw-hc2vpp-csit-verify-prebuild.sh
1 #!/bin/bash
2 set -xeu -o pipefail
3
4 current_dir=`pwd`
5 cd ${WORKSPACE}
6
7 # Get CSIT branch from which to test from
8 # running build-root/scripts/csit-test-branch
9 if [ -f csit-test-branch ]; then
10     chmod +x csit-test-branch
11     CSIT_BRANCH=`./csit-test-branch`
12 fi
13
14 # Clone csit and start tests
15 git clone https://gerrit.fd.io/r/csit --branch ${CSIT_BRANCH}
16
17 # If the git clone fails, complain clearly and exit
18 if [ $? != 0 ]; then
19     echo "Failed to run: git clone https://gerrit.fd.io/r/csit --branch ${CSIT_BRANCH}"
20     exit
21 fi
22
23 if [ ${STREAM} == 'master' ]; then
24     ./csit/resources/tools/download_hc_build_pkgs.sh ${STREAM}
25 else
26     ./csit/resources/tools/download_hc_build_pkgs.sh 'stable.'${STREAM}
27 fi
28
29 cd ${current_dir}