include-raw-hc2vpp-csit-integration.sh revision d413dc36
1#!/bin/bash
2set -xeu -o pipefail
3
4# Get CSIT branch
5if [[ -f csit-test-branch ]]; then
6    chmod +x csit-test-branch
7    CSIT_BRANCH=`./csit-test-branch`
8else
9    CSIT_BRANCH='master'
10fi
11
12# Clone csit
13git clone https://gerrit.fd.io/r/csit --branch ${CSIT_BRANCH}
14
15# If the git clone fails, complain clearly and exit
16if [[ $? != 0 ]]; then
17    echo "Failed to run: git clone https://gerrit.fd.io/r/csit --branch ${CSIT_BRANCH}"
18    exit 1
19fi
20
21cd csit
22# execute csit bootstrap script if it exists
23if [[ ! -e bootstrap-hc2vpp-integration.sh ]]
24then
25    echo 'ERROR: No bootstrap-hc2vpp-integration.sh found'
26    exit 1
27else
28    # make sure that bootstrap.sh is executable
29    chmod +x bootstrap-hc2vpp-integration.sh
30    # run the script
31    ./bootstrap-hc2vpp-integration.sh ${STREAM} ${OS}
32fi
33
34# vim: ts=4 ts=4 sts=4 et :
35