Modify interactions with installer VM to set up jenkins-ci for cbench test
[releng.git] / utils / test / testapi / install.sh
1 #!/bin/bash
2
3 usage="
4 Script to install opnfv_tesgtapi automatically.
5 This script should be run under root.
6
7 usage:
8     bash $(basename "$0") [-h|--help] [-t <test_name>]
9
10 where:
11     -h|--help         show this help text"
12
13 # Ref :-  https://openstack.nimeyo.com/87286/openstack-packaging-all-definition-data-files-config-setup
14
15 if [ -z "$VIRTUAL_ENV" ];
16 then
17     if [[ $(whoami) != "root" ]];
18     then
19         echo "Error: This script must be run as root!"
20         exit 1
21     fi
22 else
23     sed -i -e 's#/etc/opnfv_testapi =#etc/opnfv_testapi =#g' setup.cfg
24 fi
25
26 cp -fr 3rd_party/static opnfv_testapi/tornado_swagger
27 python setup.py install
28 rm -fr opnfv_testapi/tornado_swagger/static