зеркало из https://github.com/mozilla/gecko-dev.git
Added express mode for just printing table out. -mcafee
This commit is contained in:
Родитель
7cd70969a2
Коммит
46b9025cc5
|
@ -19,24 +19,37 @@
|
||||||
|
|
||||||
sub PrintUsage {
|
sub PrintUsage {
|
||||||
die <<END_USAGE
|
die <<END_USAGE
|
||||||
usage: $0 <filename>
|
usage: $0 <filename> ["express"]
|
||||||
END_USAGE
|
END_USAGE
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if ($#ARGV < 0) {
|
||||||
if ($#ARGV != 0) {
|
|
||||||
PrintUsage();
|
PrintUsage();
|
||||||
}
|
}
|
||||||
|
|
||||||
$DATAFILE = $ARGV[0];
|
my $DATAFILE = $ARGV[0];
|
||||||
|
my $MODE;
|
||||||
|
|
||||||
|
if($#ARGV > 0) {
|
||||||
|
$MODE = $ARGV[1];
|
||||||
|
} else {
|
||||||
|
$MODE = "";
|
||||||
|
}
|
||||||
|
|
||||||
|
my $express = 0;
|
||||||
|
|
||||||
|
if($MODE eq "express") {
|
||||||
|
$express = 1;
|
||||||
|
}
|
||||||
|
|
||||||
my $ngdir = "http://geckoqa.mcom.com/ngdriver/"; #$input->url(-base=>1) . "/ngdriver/";
|
my $ngdir = "http://geckoqa.mcom.com/ngdriver/"; #$input->url(-base=>1) . "/ngdriver/";
|
||||||
my $ngsuites = $ngdir . "suites/";
|
my $ngsuites = $ngdir . "suites/";
|
||||||
my $conffile = "ngdriver.conf";
|
my $conffile = "ngdriver.conf";
|
||||||
my $HTMLreport = "";
|
my $HTMLreport = "";
|
||||||
|
|
||||||
print "Content-type: text/html\n\n";
|
unless ($express) {
|
||||||
|
print "Content-type: text/html\n\n";
|
||||||
|
}
|
||||||
|
|
||||||
&generateResults;
|
&generateResults;
|
||||||
|
|
||||||
|
@ -149,6 +162,25 @@ sub generateHTML
|
||||||
|
|
||||||
my $os = `uname -s`; # Cheap OS id for now
|
my $os = `uname -s`; # Cheap OS id for now
|
||||||
|
|
||||||
|
my %Matrices;
|
||||||
|
|
||||||
|
# Hard-coded from ngdriver.conf, I didn't want extra files in tree.
|
||||||
|
|
||||||
|
$extList{"mb"} = "http://cemicrobrowser.web.aol.com/bugReportDetail.php?RID=%";
|
||||||
|
$extList{"bs"} = "http://bugscape.nscp.aoltw.net/show_bug.cgi?id=%";
|
||||||
|
$extList{"bz"} = "http://bugzilla.mozilla.org/show_bug.cgi?id=%";
|
||||||
|
$extList{"bzx"} = "http://bugzilla.mozilla.org/show_bug.cgi?id=%";
|
||||||
|
|
||||||
|
$prjExtension = "bz"; # Buffy hard-coded here.
|
||||||
|
|
||||||
|
$Matricies{"dom-core"} = "http://geckoqa.mcom.com/browser/standards/dom1/tcmatrix/index.html";
|
||||||
|
$Matricies{"dom-html"} = "http://geckoqa.mcom.com/browser/standards/dom1/tcmatrix/index.html";
|
||||||
|
$Matricies{"domevents"} = "http://geckoqa.mcom.com/browser/standards/dom1/tcmatrix/index.html";
|
||||||
|
$Matricies{"javascript"} = "http://geckoqa.mcom.com/browser/standards/javascript/tcmatrix/index.html";
|
||||||
|
$Matricies{"forms"} = "http://geckoqa.mcom.com/browser/standards/form_submission/tcmatrix/index.html";
|
||||||
|
$Matricies{"formsec"} = "http://geckoqa.mcom.com/browser/standards/form_submission/tcmatrix/index.html";
|
||||||
|
|
||||||
|
unless ($express) {
|
||||||
$HTMLreport .= <<END_PRINT;
|
$HTMLreport .= <<END_PRINT;
|
||||||
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
||||||
<html>
|
<html>
|
||||||
|
@ -172,37 +204,24 @@ sub generateHTML
|
||||||
<h3><u>The Following Test Suites Were Run:</u></h3>
|
<h3><u>The Following Test Suites Were Run:</u></h3>
|
||||||
<UL>
|
<UL>
|
||||||
END_PRINT
|
END_PRINT
|
||||||
|
|
||||||
my %Matrices;
|
|
||||||
|
|
||||||
# Hard-coded from ngdriver.conf, I didn't want extra files in tree.
|
for (my $var = 0;$File{'SuiteList'}->[$var]->{'Name'};$var++) {
|
||||||
|
if (my $href = $Matrices{$File{'SuiteList'}->[$var]->{'Name'}}) {
|
||||||
$extList{"mb"} = "http://cemicrobrowser.web.aol.com/bugReportDetail.php?RID=%";
|
$HTMLreport .= "<li><a href=\"$href\">$File{'SuiteList'}->[$var]->{'Title'}</a></li>\n";
|
||||||
$extList{"bs"} = "http://bugscape.nscp.aoltw.net/show_bug.cgi?id=%";
|
} else {
|
||||||
$extList{"bz"} = "http://bugzilla.mozilla.org/show_bug.cgi?id=%";
|
$HTMLreport .= "<li><a href=\"$ngsuites$File{'SuiteList'}->[$var]->{'Name'}\">$File{'SuiteList'}->[$var]->{'Title'}</a></li>\n";
|
||||||
$extList{"bzx"} = "http://bugzilla.mozilla.org/show_bug.cgi?id=%";
|
}
|
||||||
|
|
||||||
$prjExtension = "bz"; # Buffy hard-coded here.
|
|
||||||
|
|
||||||
$Matricies{"dom-core"} = "http://geckoqa.mcom.com/browser/standards/dom1/tcmatrix/index.html";
|
|
||||||
$Matricies{"dom-html"} = "http://geckoqa.mcom.com/browser/standards/dom1/tcmatrix/index.html";
|
|
||||||
$Matricies{"domevents"} = "http://geckoqa.mcom.com/browser/standards/dom1/tcmatrix/index.html";
|
|
||||||
$Matricies{"javascript"} = "http://geckoqa.mcom.com/browser/standards/javascript/tcmatrix/index.html";
|
|
||||||
$Matricies{"forms"} = "http://geckoqa.mcom.com/browser/standards/form_submission/tcmatrix/index.html";
|
|
||||||
$Matricies{"formsec"} = "http://geckoqa.mcom.com/browser/standards/form_submission/tcmatrix/index.html";
|
|
||||||
|
|
||||||
for (my $var = 0;$File{'SuiteList'}->[$var]->{'Name'};$var++) {
|
|
||||||
if (my $href = $Matrices{$File{'SuiteList'}->[$var]->{'Name'}}) {
|
|
||||||
$HTMLreport .= "<li><a href=\"$href\">$File{'SuiteList'}->[$var]->{'Title'}</a></li>\n";
|
|
||||||
} else {
|
|
||||||
$HTMLreport .= "<li><a href=\"$ngsuites$File{'SuiteList'}->[$var]->{'Name'}\">$File{'SuiteList'}->[$var]->{'Title'}</a></li>\n";
|
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
$HTMLreport .= <<END_PRINT;
|
$HTMLreport .= <<END_PRINT;
|
||||||
</UL>
|
</UL>
|
||||||
|
|
||||||
<h3><u>Test Result Summary:</u></h3>
|
<h3><u>Test Result Summary:</u></h3>
|
||||||
|
END_PRINT
|
||||||
|
} # !express
|
||||||
|
|
||||||
|
|
||||||
|
$HTMLreport .= <<END_PRINT;
|
||||||
<table BORDER=2 CELLSPACING=0>
|
<table BORDER=2 CELLSPACING=0>
|
||||||
<tr>
|
<tr>
|
||||||
<td VALIGN=TOP BGCOLOR="#999999"> </td>
|
<td VALIGN=TOP BGCOLOR="#999999"> </td>
|
||||||
|
@ -254,7 +273,10 @@ END_PRINT
|
||||||
<td VALIGN=TOP BGCOLOR="#FFFFCC"><font color="#990000">$pctFail</font></td>
|
<td VALIGN=TOP BGCOLOR="#FFFFCC"><font color="#990000">$pctFail</font></td>
|
||||||
</tr>
|
</tr>
|
||||||
</TABLE>
|
</TABLE>
|
||||||
|
END_PRINT
|
||||||
|
|
||||||
|
unless ($express) {
|
||||||
|
$HTMLreport .= <<END_PRINT;
|
||||||
<h3>Failed Testcases:</h3>
|
<h3>Failed Testcases:</h3>
|
||||||
END_PRINT
|
END_PRINT
|
||||||
|
|
||||||
|
@ -283,7 +305,6 @@ END_PRINT
|
||||||
($none,$fName,$fDesc,$fStat,$fBug,$fExpected,$fActual) = split(/<->/,$curFile);
|
($none,$fName,$fDesc,$fStat,$fBug,$fExpected,$fActual) = split(/<->/,$curFile);
|
||||||
$HTMLreport.= "<TR><TD><A href=\"$ngsuites$curSuite->{'Name'}/$fName\" target=\"_new\">$fName</A></TD><TD>";
|
$HTMLreport.= "<TR><TD><A href=\"$ngsuites$curSuite->{'Name'}/$fName\" target=\"_new\">$fName</A></TD><TD>";
|
||||||
|
|
||||||
|
|
||||||
# Quiet perl warnings about unused variables.
|
# Quiet perl warnings about unused variables.
|
||||||
my $tmp; $tmp = $fStat; $tmp = $fActual; $tmp = $fExpected;
|
my $tmp; $tmp = $fStat; $tmp = $fActual; $tmp = $fExpected;
|
||||||
|
|
||||||
|
@ -315,6 +336,7 @@ END_PRINT
|
||||||
</BODY>
|
</BODY>
|
||||||
</HTML>
|
</HTML>
|
||||||
END_PRINT
|
END_PRINT
|
||||||
|
} # !express
|
||||||
|
|
||||||
1;
|
1;
|
||||||
}
|
}
|
||||||
|
|
Загрузка…
Ссылка в новой задаче