Merge " Fix the test output files not found issue."
[ci-management.git] / jjb / tldk / include-raw-csit-tldk-functional-virl.sh
1 #!/bin/bash
2 set -xeu -o pipefail
3
4 # Clone tldk and start tests
5 git clone https://gerrit.fd.io/r/tldk
6
7 # If the git clone fails, complain clearly and exit
8 if [ $? != 0 ]; then
9     echo "Failed to run: git clone https://gerrit.fd.io/r/tldk"
10     exit 1
11 fi
12
13 # Clone csit and start tests
14 git clone https://gerrit.fd.io/r/csit
15
16 # If the git clone fails, complain clearly and exit
17 if [ $? != 0 ]; then
18     echo "Failed to run: git clone https://gerrit.fd.io/r/csit"
19     exit 1
20 fi
21
22 # Move the tldk to the csit dir
23 sudo mv -f ./tldk/ ./csit/
24
25 cd csit
26
27 # execute nsh_sfc bootstrap script if it exists
28 if [ -e bootstrap-TLDK.sh ]
29 then
30     # make sure that bootstrap-TLDK.sh is executable
31     chmod +x bootstrap-TLDK.sh
32     # run the script
33     ./bootstrap-TLDK.sh
34 else
35     echo 'ERROR: No bootstrap-TLDK.sh found'
36     exit 1
37 fi
38
39 # vim: ts=4 ts=4 sts=4 et :