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`;
10 # check CSIT_BRANCH value
11 if [ "$CSIT_BRANCH" == "" ]; then
12 echo "CSIT_BRANCH not provided => 'latest' will be used"
17 git clone --depth 1 --no-single-branch https://gerrit.fd.io/r/csit
19 # if the git clone fails, complain clearly and exit
21 echo "Failed to run: git clone --depth 1 --no-single-branch https://gerrit.fd.io/r/csit"
25 cp build-root/*.deb csit/
26 if [ -e dpdk/vpp-dpdk-dkms*.deb ]
28 cp dpdk/vpp-dpdk-dkms*.deb csit/
30 cp /w/dpdk/vpp-dpdk-dkms*.deb csit/
33 # Check for CSIT_REF test file
34 if [ -e CSIT_REF ]; then
38 # If also testing a specific csit refpoint look for CSIT_REF
39 if [[ -v CSIT_REF ]]; then
40 (cd csit ; git fetch ssh://rotterdam-jobbuilder@gerrit.fd.io:29418/csit $CSIT_REF && git checkout FETCH_HEAD)
43 if [ "$CSIT_BRANCH" == "latest" ]; then
44 # set required CSIT branch_id based on VPP master branch; by default use 'oper'
50 BRANCH_ID="oper-rls1710"
53 BRANCH_ID="oper-rls1801"
56 BRANCH_ID="oper-rls1804"
59 BRANCH_ID="oper-rls1807"
62 BRANCH_ID="oper-rls1810"
68 # get the latest verified version of the required branch
69 CSIT_BRANCH=$(echo $(git branch -r | grep -E "${BRANCH_ID}-[0-9]+" | tail -n 1))
71 if [ "${CSIT_BRANCH}" == "" ]; then
72 echo "No verified CSIT branch found - exiting"
76 # remove 'origin/' from the branch name
77 CSIT_BRANCH=$(echo ${CSIT_BRANCH#origin/})
79 # checkout the required csit branch
80 git checkout ${CSIT_BRANCH}
83 echo "Failed to checkout the required CSIT branch: ${CSIT_BRANCH}"
88 # execute csit bootstrap script if it exists
89 if [ -e bootstrap.sh ]
91 # make sure that bootstrap.sh is executable
96 echo 'ERROR: No bootstrap.sh found'
100 # vim: ts=4 ts=4 sts=4 et :