Refactor reporting dir
[releng.git] / utils / test / reporting / docker / reporting.sh
1 #!/bin/bash
2 cd ..
3
4 export PYTHONPATH="${PYTHONPATH}:."
5 export CONFIG_REPORTING_YAML=./reporting.yaml
6
7 declare -a versions=(colorado master)
8 declare -a projects=(functest yardstick)
9
10 project=$1
11 reporting_type=$2
12
13 # create Directories if needed
14 for i in "${versions[@]}"
15 do
16     for j in "${projects[@]}"
17        do
18            mkdir -p display/$i/$j
19        done
20 done
21
22 # copy images, js, css, 3rd_party
23 cp -Rf 3rd_party display  
24 cp -Rf css display
25 cp -Rf html/* display
26 cp -Rf img display
27 cp -Rf js display
28
29 # if nothing is precised run all the reporting generation
30 #  projet   |        option
31 #   $1      |          $2
32 # functest  | status, vims, tempest
33 # yardstick |
34
35 if [ -z "$1" ]; then
36   echo "********************************"
37   echo " Functest reporting " 
38   echo "********************************"
39   echo "reporting vIMS..."
40   python ./functest/reporting-vims.py
41   echo "reporting vIMS...OK"
42   sleep 10
43   echo "reporting Tempest..."
44   python ./functest/reporting-tempest.py
45   echo "reporting Tempest...OK"
46   sleep 10
47   echo "reporting status..."
48   python ./functest/reporting-status.py
49   echo "Functest reporting status...OK"
50
51   echo "********************************"
52   echo " Yardstick reporting " 
53   echo "********************************"
54   python ./yardstick/reporting-status.py
55   echo "Yardstick reporting status...OK"
56 else
57   if [ -z "$2" ]; then
58     reporting_type="status"
59   fi
60   echo "********************************"
61   echo " $project/$reporting_type reporting " 
62   echo "********************************"
63   python ./$project/reporting-$reporting_type.py
64 fi
65