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