зеркало из https://github.com/mozilla/pjs.git
Add check to make sure versions table is OK.
This commit is contained in:
Родитель
7671215b4c
Коммит
b6e395f91e
|
@ -51,10 +51,28 @@ PutHeader("Bugzilla Sanity Check");
|
|||
print "OK, now running sanity checks.<P>\n";
|
||||
|
||||
my @row;
|
||||
my @checklist;
|
||||
|
||||
Status("Checking version/products");
|
||||
|
||||
SendSQL("select distinct product, version from bugs");
|
||||
while (@row = FetchSQLData()) {
|
||||
my @copy = @row;
|
||||
push(@checklist, \@copy);
|
||||
}
|
||||
|
||||
foreach my $ref (@checklist) {
|
||||
my ($product, $version) = (@$ref);
|
||||
SendSQL("select count(*) from versions where program = '$product' and value = '$version'");
|
||||
if (FetchOneColumn() != 1) {
|
||||
Alert("Bug(s) found with invalid product/version: $product/$version");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Status("Checking components/products");
|
||||
|
||||
my @checklist;
|
||||
@checklist = ();
|
||||
SendSQL("select distinct product, component from bugs");
|
||||
while (@row = FetchSQLData()) {
|
||||
my @copy = @row;
|
||||
|
|
Загрузка…
Ссылка в новой задаче