my $time_end;
my $time_taken;
my $num_fail = 0;
+my $awaiting_analysis = 0;
my $lines_read = 0;
my $existing_bugs = 0;
use constant {
ERR_ARCH_MISMATCH => 1,
- ERR_INFRA => 2,
- ERR_BD_PROBLEM => 3,
- ERR_DETECT_WRONG_ARCH => 4,
- ERR_CRASH => 5,
- ERR_BUILD_PROBLEM => 6,
- ERR_TEST_PROBLEM => 7,
- ERR_BUILD_TIMEOUT => 8,
+ ERR_NO_SOURCE => 2,
+ ERR_INFRA => 3,
+ ERR_BD_PROBLEM => 4,
+ ERR_DETECT_WRONG_ARCH => 5,
+ ERR_CRASH => 6,
+ ERR_BUILD_PROBLEM => 7,
+ ERR_TEST_PROBLEM => 8,
+ ERR_BUILD_TIMEOUT => 9,
};
my @err_descriptions;
$err_descriptions [ERR_ARCH_MISMATCH] = "Architecture mismatches";
+$err_descriptions [ERR_NO_SOURCE] = "No source found";
$err_descriptions [ERR_INFRA] = "Infrastructure errors";
$err_descriptions [ERR_BD_PROBLEM] = "Problems with build-deps";
$err_descriptions [ERR_DETECT_WRONG_ARCH] = "Builds detected wrong architecture";
message => 'Architecture mismatch',
check => 1,
stop => 1,
+ analyze => 0,
type => ERR_ARCH_MISMATCH,
},
{
message => 'Architecture mismatch',
check => 1,
stop => 1,
+ analyze => 0,
type => ERR_ARCH_MISMATCH,
},
{
message => 'No binaries built',
check => 1,
stop => 1,
+ analyze => 1,
type => ERR_ARCH_MISMATCH,
},
+ {
+ string => 'E: Can not find version \S+ of package',
+ message => 'Could not find specified source package',
+ check => 1,
+ stop => 1,
+ analyze => 0,
+ type => ERR_NO_SOURCE,
+ },
{
string => 'schroot.*File is not owned by user root',
message => 'Schroot setup failure',
check => 1,
stop => 1,
+ analyze => 0,
type => ERR_INFRA,
},
{
message => 'Build ran out of disk space',
check => 1,
stop => 1,
+ analyze => 0,
type => ERR_INFRA,
},
{
message => 'Build ran out of ptys',
check => 1,
stop => 1,
+ analyze => 0,
type => ERR_INFRA,
},
{
message => 'Wrong arch detected',
check => 1,
stop => 1,
+ analyze => 1,
type => ERR_DETECT_WRONG_ARCH,
},
{
message => 'Wrong arch detected',
check => 0,
stop => 1,
+ analyze => 1,
type => ERR_DETECT_WRONG_ARCH,
},
{
message => 'Wrong arch detected',
check => 1,
stop => 1,
+ analyze => 1,
type => ERR_DETECT_WRONG_ARCH,
},
{
message => 'Alignment problem',
check => 1,
stop => 1,
+ analyze => 1,
type => ERR_CRASH,
},
{
message => 'Segmentation fault when installing RESULT',
check => 1,
stop => 1,
+ analyze => 1,
type => ERR_CRASH,
},
{
message => 'Segmentation fault',
check => 1,
stop => 1,
+ analyze => 1,
type => ERR_CRASH,
},
{
message => 'Illegal instruction when installing RESULT',
check => 1,
stop => 1,
+ analyze => 1,
type => ERR_CRASH,
},
{
message => 'Illegal instruction',
check => 1,
stop => 1,
+ analyze => 1,
type => ERR_CRASH,
},
{
message => 'Build-dep failed to install (RESULT)',
check => 1,
stop => 0,
+ analyze => 0,
type => ERR_BD_PROBLEM,
},
{
message => 'Pbuilder build-deps failed',
check => 1,
stop => 1,
+ analyze => 0,
type => ERR_BD_PROBLEM,
},
{
message => 'Build-deps failed',
check => 1,
stop => 1,
+ analyze => 0,
type => ERR_BD_PROBLEM,
},
{
message => 'Missing build-dep (RESULT)',
check => 1,
stop => 1,
+ analyze => 0,
type => ERR_BD_PROBLEM,
},
{
message => 'Unsatisfiable build-dep conflict (RESULT)',
check => 1,
stop => 1,
+ analyze => 0,
type => ERR_BD_PROBLEM,
},
{
message => 'Build-deps not satisfiable',
check => 1,
stop => 1,
+ analyze => 0,
type => ERR_BD_PROBLEM,
},
{
message => 'dpkg-source failure',
check => 1,
stop => 1,
+ analyze => 0,
type => ERR_BUILD_PROBLEM,
},
{
message => 'Build failure: missing library - missing build-dep?',
check => 1,
stop => 1,
+ analyze => 0,
type => ERR_BUILD_PROBLEM,
},
{
message => 'Build failure: missing header - missing build-dep?',
check => 1,
stop => 1,
+ analyze => 0,
type => ERR_BUILD_PROBLEM,
},
{
message => 'Build failure - missing build-dep?',
check => 1,
stop => 1,
+ analyze => 0,
type => ERR_BUILD_PROBLEM,
},
{
message => 'Build failure (missing binary)',
check => 1,
stop => 1,
+ analyze => 1,
type => ERR_BUILD_PROBLEM,
},
{
message => 'Build failure (java/javadoc)',
check => 1,
stop => 1,
+ analyze => 0,
type => ERR_BUILD_PROBLEM,
},
{
# Build failed
- string => 'make.*returned exit code',
+ string => '^make.*\*\*\*.* \[debian/rules.*Error \d+$',
message => 'Build failure (other)',
check => 1,
- stop => 0,
+ stop => 1,
+ analyze => 1,
type => ERR_BUILD_PROBLEM,
},
{
# Build failed
- string => '^make.*\*\*\*.* \[debian/rules.*Error \d+$',
+ string => 'make.*returned exit code',
message => 'Build failure (other)',
check => 1,
- stop => 1,
+ stop => 0,
+ analyze => 1,
type => ERR_BUILD_PROBLEM,
},
{
message => 'Build failure (other)',
check => 1,
stop => 1,
+ analyze => 1,
type => ERR_BUILD_PROBLEM,
},
{
message => 'Build failure (clean failed)',
check => 1,
stop => 1,
+ analyze => 0,
type => ERR_BUILD_PROBLEM,
},
{
message => 'Build failure (install failed)',
check => 1,
stop => 1,
+ analyze => 1,
type => ERR_BUILD_PROBLEM,
},
{
message => 'Build failure (configure failed)',
check => 1,
stop => 1,
+ analyze => 1,
type => ERR_BUILD_PROBLEM,
},
{
message => 'Build failure (RESULT)',
check => 1,
stop => 1,
+ analyze => 1,
+ type => ERR_BUILD_PROBLEM,
+ },
+ {
+ # Build failed
+ string => '^debian/.*\*\*\* (.*). Stop.',
+ message => 'Build error (RESULT)',
+ check => 1,
+ stop => 1,
+ analyze => 1,
+ type => ERR_BUILD_PROBLEM,
+ },
+ {
+ # Build failed
+ string => 'dpkg-buildpackage: error:.*(debian/rules \S+) subprocess returned exit status 2',
+ message => 'Build error (RESULT)',
+ check => 1,
+ stop => 1,
+ analyze => 1,
type => ERR_BUILD_PROBLEM,
},
{
message => 'Build failure (other)',
check => 0,
stop => 1,
+ analyze => 1,
type => ERR_BUILD_PROBLEM,
},
{
message => 'Python EPERM test failure',
check => 1,
stop => 1,
+ analyze => 1,
type => ERR_TEST_PROBLEM,
},
{
message => 'Test failure',
check => 1,
stop => 1,
+ analyze => 1,
type => ERR_TEST_PROBLEM,
},
{
message => 'Pbuilder build timeout',
check => 1,
stop => 1,
+ analyze => 0,
type => ERR_BUILD_TIMEOUT,
},
{
message => 'Sbuild build timeout',
check => 1,
stop => 1,
+ analyze => 0,
type => ERR_BUILD_TIMEOUT,
},
);
my $stop = 0;
my $lineno = 0;
my $errors = 0;
+ my $errors_need_analysis = 0;
my $oldline = "";
my %file_results;
print "<li>Looking at <a href=\"$input\">$input</a>:\n";
print " <li>Line $lineno: $message\n";
$errors++;
}
+ if ($check{analyze}) {
+ $errors_need_analysis++;
+ }
if ($check{stop}) {
# print " stopping processing\n";
$stop = 1;
print " <li>$line\n";
}
close IN;
+ } else {
+ if ($errors_need_analysis) {
+ print " <li><strong>Needs analysis</strong>\n";
+ }
}
print "</ul>\n";
$log_results{$file_results{$key}}{$key} += 1;
# print "now have $log_results{$key} for \"$key\"\n";
}
+ if ($errors_need_analysis) {
+ $awaiting_analysis++;
+ }
}
print "</ol>\n";
print "<a name=\"summary\"</a>\n";
print "<h2>Summary of results from $num_fail failed builds:</h2>\n";
+print "<p>$awaiting_analysis logs still need analysis</p>\n";
print "<ul>\n";
-print "<li> Found $existing_bugs existing bugs in the Debian BTS</li>\n";
+print " <li>Found $existing_bugs existing bugs in the Debian BTS</li>\n";
foreach my $type (sort keys %log_results) {
print " <h3>$err_descriptions[$type]</h3>\n";
my $tmp = $log_results{$type};
$time_taken = $time_end - $time_start;
$date = strftime "%a %b %e %H:%M:%S %Z %Y", localtime;
$hostname = `hostname`;
+chomp $hostname;
print "<hr>\n";
print "<p>Log analysis generated on $hostname, $date.\n";