testsuite report: show pie chart before table with results

git-svn-id: trunk@16162 -
This commit is contained in:
vincents 2008-08-20 12:02:00 +00:00
parent 63cfdf7dfa
commit 65d0624d9c
2 changed files with 32 additions and 24 deletions

View File

@ -25,6 +25,11 @@
<FormatVersion Value="1"/>
<LaunchingApplication PathPlusParams="/usr/X11R6/bin/xterm -T 'Lazarus Run Output' -e $(LazarusDir)/tools/runwait.sh $(TargetCmdLine)"/>
</local>
<environment>
<UserOverrides Count="1">
<Variable0 Name="action" Value="2"/>
</UserOverrides>
</environment>
</RunParams>
<Units Count="2">
<Unit0>
@ -40,15 +45,13 @@
</Units>
</ProjectOptions>
<CompilerOptions>
<Version Value="5"/>
<Version Value="8"/>
<PathDelim Value="\"/>
<Target>
<Filename Value="testsuite.cgi"/>
</Target>
<CodeGeneration>
<Generate Value="Faster"/>
</CodeGeneration>
<Other>
<CustomOptions Value="-XLAfreetype-6=freetype6"/>
<CompilerPath Value="$(CompPath)"/>
</Other>
</CompilerOptions>

View File

@ -749,6 +749,7 @@ Var
Qry : String;
Q : TSQLQuery;
FL : String;
DelayedResponse: TMemoryStream;
begin
ConnectToDB;
@ -765,25 +766,6 @@ begin
HeaderEnd(2);
If ShowRunData then
begin
HeaderStart(2);
Write('Detailed test run results:');
FL:='';
If FOnlyFailed or FNoSkipped then
begin
FL:='';
If FOnlyFailed then
FL:='successful';
if FNoSkipped then
begin
If (FL<>'') then
FL:=FL+' and ';
FL:=FL+'skipped';
end;
Write(' ('+FL+' tests are hidden)');
end;
HeaderEnd(2);
ParaGraphStart;
S:='SELECT T_ID as Id,T_NAME as Filename,TR_SKIP as Skipped'
+',TR_OK as OK,TR_RESULT as Result'
+' FROM TESTRESULTS,TESTS'
@ -800,6 +782,7 @@ begin
Writeln('Query : '+Qry);
Flush(stdout);
end;
DelayedResponse := TMemoryStream.Create;
FRunCount:=0;
FRunSkipCount:=0;
FRunFailedCount:=0;
@ -824,7 +807,7 @@ begin
TableColumns.ColumnByNAme('Result').OnGetCellContents:=
@FormatTestResult;
//(TableColumns.Items[0] as TTableColumn).ActionURL:=ALink;
CreateTable(Response);
CreateTable(DelayedResponse);
Finally
Free;
end;
@ -840,6 +823,28 @@ begin
ParaGraphStart;
TagStart('IMG',Format('Src="'+TestsuiteCGIURL+'?action=2&pietotal=%d&piefailed=%d&pieskipped=%d"',[FRunCount,FRunFailedCount,FRunSkipCount]));
end;
HeaderStart(2);
Write('Detailed test run results:');
FL:='';
If FOnlyFailed or FNoSkipped then
begin
FL:='';
If FOnlyFailed then
FL:='successful';
if FNoSkipped then
begin
If (FL<>'') then
FL:=FL+' and ';
FL:=FL+'skipped';
end;
Write(' ('+FL+' tests are hidden)');
end;
HeaderEnd(2);
ParaGraphStart;
DelayedResponse.Position:=0;
Response.CopyFrom(DelayedResponse, DelayedResponse.Size);
DelayedResponse.Free;
end
else
Write('No data for test run with ID: '+FRunID);