Limit log size to 50000, and add all testrun information at start

git-svn-id: trunk@36317 -
This commit is contained in:
pierre 2017-05-24 21:53:01 +00:00
parent 91513dc414
commit 3a9ed7db72
2 changed files with 13 additions and 4 deletions

View File

@ -402,7 +402,8 @@ Var
ConfigID : Integer;
Procedure GetIDs;
var
qry : string;
begin
TestCPUID := GetCPUId(TestCPU);
If TestCPUID=-1 then
@ -425,11 +426,15 @@ begin
If (TestRunID=-1) then
begin
TestRunID:=AddRun(TestOSID,TestCPUID,TestVersionID,TestCategoryID,TestDate);
If TestRUnID=-1 then
If TestRunID=-1 then
Verbose(V_Error,'Could not insert new testrun record!');
end
else
CleanTestRun(TestRunID);
{ Add known infomration at start }
qry:=format('UPDATE TESTRUN SET TU_SUBMITTER=''%s'', TU_MACHINE=''%s'', TU_COMMENT=''%s'', TU_DATE=''%s''',[Submitter,Machine,Comment,SqlDate(TestDate)]);
qry:=qry+' WHERE TU_ID='+format('%d',[TestRunID]);
ExecuteQuery(Qry,False);
end;
@ -467,7 +472,8 @@ begin
{ End of file marker }
if eof(LongLogFile) or (pos('>>>>>>>>>>>',S)=1) then
exit;
Result:=Result+S+LineEnding;
if length(Result)<MaxLogSize then
Result:=Result+S+LineEnding;
end;
end
else if IsFirst then

View File

@ -49,6 +49,8 @@ type
Const
DoVerbose : boolean = false;
DoSQL : boolean = false;
MaxLogSize : LongInt = 50000;
procedure TrimB(var s:string);
procedure TrimE(var s:string);
@ -320,7 +322,8 @@ begin
While Not(EOF(F)) do
begin
ReadLn(F,S);
Result:=Result+S+LineEnding;
if length(Result)<MaxLogSize then
Result:=Result+S+LineEnding;
end;
Close(F);
end;