open LOG,(">checkall.log") || die "Cannot open log file: $!";
my ($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst) = localtime(time);
-print LOG "Build started on $hour:$min:$sec $mon/$mday/$year\n\n";
-open MAKE,("make |") || die "Cannot fork a make: $!";
+print LOG "Build started on $hour:$min:$sec $mon/$mday/$year\n";
+print LOG "Current svn version is: ".qx(svnversion)."\n\n";
+
+print LOG "\nXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX\n";
+print LOG "XXX Include config.log since it contains valuable information XXX\n";
+print LOG "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX\n";
+open CFG,"<config.log" || die "Cannot open config.log: $!*";
+while (<CFG>) {
+ print LOG "$_";
+}
+close CFG;
+
+print LOG "\nXXXXXXXXXXXXXXXX\n";
+print LOG "XXX Run make XXX\n";
+print LOG "XXXXXXXXXXXXXXXX\n";
+open MAKE,("make 2>&1 |") || die "Cannot fork a make: $!";
while (<MAKE>) {
print $_;
print LOG $_;
exit 1;
}
-open CHECK,("make -k check|") || die "Cannot fork a make check: $!";
+print LOG "\nXXXXXXXXXXXXXXXXXXXXXX\n";
+print LOG "XXX Run make check XXX\n";
+print LOG "XXXXXXXXXXXXXXXXXXXXXX\n";
+open CHECK,("make -k check 2>&1 |") || die "Cannot fork a make check: $!";
while (<CHECK>) {
print $_;
print LOG $_;
}
$banner = "# $banner #";
my $dashes = $banner;
-$dashes =~ s/./#/g;
+$dashes =~ s/./X/g;
print LOG "\n$dashes\n$banner\n$dashes\n\n";
print "\n$dashes\n$banner (full logs in checkall.log)\n$dashes\n\n";
+if (scalar @pass) {
+ print LOG "* ".(scalar @pass)." passed tests:\n";
+ map {print LOG " $_\n"} @pass;
+}
if (scalar @skip) {
- print LOG (scalar @skip)." skipped tests:\n";
- print (scalar @skip)." skipped tests:\n";
+ print LOG "* ".(scalar @skip)." skipped tests:\n";
+ print "* ".(scalar @skip)." skipped tests:\n";
map {print " $_\n";print LOG " $_\n"} @skip;
}
if (scalar @xpass) {
- print LOG (scalar @xpass)." unexpected pass:\n";
- print (scalar @xpass)." unexpected pass:\n";
+ print LOG "* ".(scalar @xpass)." unexpected pass:\n";
+ print "* ".(scalar @xpass)." unexpected pass:\n";
map {print " $_\n";print LOG " $_\n"} @xpass;
}
if (scalar @xfail) {
- print LOG (scalar @xfail)." expected failures:\n";
- print (scalar @xfail)." expected failures:\n";
+ print LOG "* ".(scalar @xfail)." expected failures:\n";
+ print "* ".(scalar @xfail)." expected failures:\n";
map {print " $_\n";print LOG " $_\n"} @xfail;
}
if (scalar @fail) {
- print LOG (scalar @fail)." failed tests:\n";
- print (scalar @fail)." failed tests:\n";
+ print LOG "* ".(scalar @fail)." failed tests:\n";
+ print "* ".(scalar @fail)." failed tests:\n";
map {print " $_\n";print LOG " $_\n"} @fail;
}