Trending: Implement the latest changes in job specs
[csit.git] / resources / tools / presentation / run_cpta.sh
1 #!/bin/bash
2
3 set -x
4
5 # set default values in config array
6 typeset -A DIR
7
8 DIR[WORKING]=_tmp
9
10 # Install system dependencies
11 sudo apt-get -y update
12 sudo apt-get -y install libxml2 libxml2-dev libxslt-dev build-essential \
13     zlib1g-dev unzip
14
15 # Create working directories
16 mkdir ${DIR[WORKING]}
17
18 # Create virtual environment
19 virtualenv -p $(which python3) ${DIR[WORKING]}/env
20 source ${DIR[WORKING]}/env/bin/activate
21
22 # Install python dependencies:
23 pip3 install -r requirements.txt
24
25 export PYTHONPATH=`pwd`:`pwd`/../../../:`pwd`/../../libraries/python
26
27 STATUS=$(python pal.py \
28     --specification specification_CPTA.yaml \
29     --logging INFO \
30     --force)
31 RETURN_STATUS=$?
32
33 echo ${STATUS}
34 exit ${RETURN_STATUS}