-
Notifications
You must be signed in to change notification settings - Fork 9
/
Copy pathtest_summary.php
82 lines (72 loc) · 1.72 KB
/
test_summary.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
<?php
require_once("../inc/db.inc");
require_once("../inc/util.inc");
$server = 0;
if (get_int("server", true)) {
$server = 1;
}
require_once("test_util.inc");
page_head("Test results summaries");
echo "
<p>
This table shows the number of test reports that have been
submitted for each combination of (platform, version)
and (test, version).
<p>
";
start_table("table-striped");
$x = array();
$x[] = "Version<br><font size=-2>click for details";
$x[] = "Target #results <br>% Complete";
$max_versions = 6;
for ($i=0; $i<count($versions)&&$i<$max_versions; $i++) {
$v = $versions[$i];
$vn = $v[0];
$pp = number_format(100*(1-fraction_left($v)), 0);
$x[] = "<a href=test_details.php?version=$vn&server=$server>$vn</a><br>$pp%";
}
row_heading_array($x);
$nc = count($versions)+2;
row_heading("Platforms");
foreach ($all_platforms as $plat) {
$x = array();
$p = $plat[0];
$pl = $plat[1];
$tr = $plat[2];
$x[] = $pl;
$x[] = $tr;
for ($j=0; $j<count($versions)&&$j<$max_versions; $j++) {
$v = $versions[$j];
if (platform_included($p, $v[2])) {
$v = $v[0];
$x1 = pcount($p, $v);
$x[] = $x1;
} else {
$x[] = "---";
}
}
row_array($x);
}
row_heading("Tests");
foreach ($all_test_groups as $tg) {
$x = array();
$p = $tg[0];
$pl = $tg[1];
$tr = $tg[2];
$x[] = $pl;
$x[] = $tr;
for ($j=0; $j<count($versions)&&$j<$max_versions; $j++) {
$v = $versions[$j];
if (test_included($p, $v[1])) {
$v = $v[0];
$x1 = tcount($p, $v);
$x[] = $x1;
} else {
$x[] = "---";
}
}
row_array($x);
}
end_table();
page_tail();
?>