#printf STDERR "$item->{component}, $item->{platform}\n";
undef $result;
- if (-f "$item->{dir}/report.twiki") {
+ if (-f "$item->{dir}/report.html") {
my ($section, $err, $yaim_used, $yaim_finished, $missing_deps);
- `grep -- 'TESTS END HERE' $item->{dir}/report.twiki >/dev/null 2>&1`;
+ `grep -- 'TESTS END HERE' $item->{dir}/report.html >/dev/null 2>&1`;
$section=$?;
- `grep -- 'Installed YAIM versions' $item->{dir}/report.twiki >/dev/null 2>&1`;
+ `grep -- 'Installed YAIM versions' $item->{dir}/report.html >/dev/null 2>&1`;
$yaim_used=$?;
- `grep -- 'YAIM terminated succesfully' $item->{dir}/report.twiki >/dev/null 2>&1`;
+ `grep -- 'YAIM terminated succesfully' $item->{dir}/report.html >/dev/null 2>&1`;
$yaim_finished=$?;
- $missing_deps=`grep -- 'Missing Dependency:' $item->{dir}/report.twiki 2>/dev/null| wc -l | sed 's/ *//g'`;
- `grep -- 'ERROR:' $item->{dir}/report.twiki >/dev/null 2>&1`;
+ $missing_deps=`grep -- 'Missing Dependency:' $item->{dir}/report.html 2>/dev/null| wc -l | sed 's/ *//g'`;
+ `grep -- 'ERROR:' $item->{dir}/report.html >/dev/null 2>&1`;
$err=$?;
printf STDERR " sec: $section, err: $err, missing_deps: $missing_deps\n";
if ($section == 0 && $missing_deps == 0 && ($yaim_used != 0 || $yaim_finished == 0)) {
- $result=`grep -- '-TEST FAILED-' $item->{dir}/report.twiki 2>/dev/null| wc -l | sed 's/ *//g'`;
+ $result=`grep -- '-TEST FAILED-' $item->{dir}/report.html 2>/dev/null| wc -l | sed 's/ *//g'`;
chomp $result;
} else {
if ($missing_deps != 0 ) { $result = "$missing_deps missing deps"; }
}
-# ==== glue reports ====
-if (0) {
-foreach my $c (sort keys %components) {
- my $cmd;
-
- for my $s ('install', 'upgrade') {
- if (exists $list{$s}) {
- for my $p (keys %{$list{$s}{$c}}) {
- $item = $list{$s}{$c}{$p};
- if (exists $item->{result} and $item->{result} eq "0") {
- $cmd = "cat $item->{dir}/report.twiki >> /tmp/report-$c-$s.twiki.part";
- `$cmd`;
- }
- }
- }
- }
- `cat /tmp/report-$c-install.twiki.part /tmp/report-$c-upgrade.twiki.part > /tmp/report-$c.twiki 2>/dev/null`;
- `rm -f /tmp/report-$c-*.twiki.part`;
-}
-}
-
-
# ==== matrix ====
my %fancy = ("lb", "L&B",
"px", "PX",
#printf STDERR "$item->{component}, $item->{platform}\n";
undef $result;
undef $done;
- if (-f "$item->{dir}/report.twiki" or -f "$item->{dir}/report.twiki.bz2") {
+ if (-f "$item->{dir}/report.twiki" or -f "$item->{dir}/report.twiki.bz2" or -f "$item->{dir}/report.html" or -f "$item->{dir}/report.html.bz2") {
my ($section, $err, $yaim_used, $yaim_finished);
if (-f "$item->{dir}/report.twiki.bz2") {
# we have an older report to use - unpack and touch it
`bunzip2 $item->{dir}/report.twiki.bz2`;
`touch $item->{dir}/report.twiki`;
+ `ln -sf report.twiki $item->{dir}/report.html`;
}
- `grep -- 'TESTS END HERE' $item->{dir}/report.twiki >/dev/null 2>&1`;
+ if (-f "$item->{dir}/report.html.bz2") {
+ # we have an older report to use - unpack and touch it
+ `bunzip2 $item->{dir}/report.html.bz2`;
+ `touch $item->{dir}/report.html`;
+ }
+ if (-f "$item->{dir}/report.twiki" && ! -f "$item->{dir}/report.html") {
+ `ln -sf report.twiki $item->{dir}/report.html`;
+ }
+ `grep -- 'TESTS END HERE' $item->{dir}/report.html >/dev/null 2>&1`;
$section=$?;
- `grep -- 'Installed YAIM versions' $item->{dir}/report.twiki >/dev/null 2>&1`;
+ `grep -- 'Installed YAIM versions' $item->{dir}/report.html >/dev/null 2>&1`;
$yaim_used=$?;
- `grep -- 'YAIM terminated succesfully' $item->{dir}/report.twiki >/dev/null 2>&1`;
+ `grep -- 'YAIM terminated succesfully' $item->{dir}/report.html >/dev/null 2>&1`;
$yaim_finished=$?;
- `grep -- 'ERROR:' $item->{dir}/report.twiki >/dev/null 2>&1`;
+ `grep -- 'ERROR:' $item->{dir}/report.html >/dev/null 2>&1`;
$err=$?;
#printf STDERR " sec: $section, err: $err\n";
if ($section == 0 && ($yaim_used != 0 || $yaim_finished == 0)) {
- $result=`grep -- '-TEST FAILED-' $item->{dir}/report.twiki 2>/dev/null| wc -l | sed 's/ *//g'`;
+ $result=`grep -- '-TEST FAILED-' $item->{dir}/report.html 2>/dev/null| wc -l | sed 's/ *//g'`;
chomp $result;
- $done=`grep -- '<font color="green">done</font>' $item->{dir}/report.twiki 2>/dev/null| wc -l | sed 's/ *//g'`;
- $skipped=`grep -- '<font color="orange">skipped</font>' $item->{dir}/report.twiki 2>/dev/null| wc -l | sed 's/ *//g'`;
+ $done=`grep -- '<font color="green">done</font>' $item->{dir}/report.html 2>/dev/null| wc -l | sed 's/ *//g'`;
+ $skipped=`grep -- '<font color="orange">skipped</font>' $item->{dir}/report.html 2>/dev/null| wc -l | sed 's/ *//g'`;
chomp $done;
chomp $skipped;
} else {
for my $p (sort keys %{$list{$s}{$c}}) {
$item = $list{$s}{$c}{$p};
if (exists $item->{result} and $item->{result} eq "0") {
- if (-f "$item->{dir}/report.twiki") {
- $cmd = "cat $item->{dir}/report.twiki >> /tmp/report-$c-$s.part";
- `$cmd`;
- }
if (-f "$item->{dir}/report.html") {
$cmd = "cat $item->{dir}/report.html >> /tmp/report-$c-$s.part";
`$cmd`;
}
}
}
- `cat /tmp/report-$c-install.part /tmp/report-$c-minor-upgrade.part /tmp/report-$c-major-upgrade.part /tmp/report-$c-double-upgrade.part /tmp/report-$c-update.part > /tmp/report-$c.html 2>/dev/null`;
+ `cat ../template.header.html | sed 's/\@TITLE\@/$c/' > /tmp/report-$c.html`;
+ `cat /tmp/report-$c-install.part /tmp/report-$c-minor-upgrade.part /tmp/report-$c-major-upgrade.part /tmp/report-$c-double-upgrade.part /tmp/report-$c-update.part >> /tmp/report-$c.html 2>/dev/null`;
+ `cat ../template.footer.html >> /tmp/report-$c.html`;
`rm -f /tmp/report-$c-*.part`;
}