mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-11-03 02:09:42 +01:00
* fix dbdigest to use (full) filename to lookup tests in DB (table TESTS structure changed)
git-svn-id: trunk@6244 -
This commit is contained in:
parent
f60b66fba0
commit
0f9b9bb7de
@ -175,16 +175,9 @@ Function GetTestID(Name : string) : Integer;
|
||||
|
||||
Const
|
||||
SFromName = 'SELECT T_ID FROM TESTS WHERE (T_NAME="%s")';
|
||||
SFromFullName = 'SELECT T_ID FROM TESTS WHERE (T_FULLNAME="%s")';
|
||||
|
||||
Var
|
||||
FN : String;
|
||||
|
||||
begin
|
||||
FN:=ExtractFileName(Name);
|
||||
Result:=IDQuery(Format(SFromName,[FN]));
|
||||
If Result=-1 then
|
||||
Result:=IDQuery(Format(SFromFullName,[Name]))
|
||||
Result:=IDQuery(Format(SFromName,[Name]));
|
||||
end;
|
||||
|
||||
Function GetOSID(Name : String) : Integer;
|
||||
@ -251,8 +244,8 @@ end;
|
||||
Function AddTest(Name : String; AddSource : Boolean) : Integer;
|
||||
|
||||
Const
|
||||
SInsertTest = 'INSERT INTO TESTS (T_NAME,T_FULLNAME,T_ADDDATE)'+
|
||||
' VALUES ("%s","%s",NOW())';
|
||||
SInsertTest = 'INSERT INTO TESTS (T_NAME,T_ADDDATE)'+
|
||||
' VALUES ("%s",NOW())';
|
||||
|
||||
Var
|
||||
Info : TConfig;
|
||||
@ -263,7 +256,7 @@ begin
|
||||
If FileExists(TestSrcDir+Name) and
|
||||
GetConfig(TestSrcDir+Name,Info) then
|
||||
begin
|
||||
If RunQuery(Format(SInsertTest,[ExtractFileName(Name),Name]),Res) then
|
||||
If RunQuery(Format(SInsertTest,[Name]),Res) then
|
||||
begin
|
||||
Result:=GetTestID(Name);
|
||||
If Result=-1 then
|
||||
|
||||
@ -624,7 +624,7 @@ begin
|
||||
end;
|
||||
HeaderEnd(2);
|
||||
ParaGraphStart;
|
||||
S:='SELECT T_NAME as Test,T_FULLNAME as Filename,TR_SKIP as Skipped,TR_OK as OK'
|
||||
S:='SELECT T_NAME as Filename,TR_SKIP as Skipped,TR_OK as OK'
|
||||
+' FROM TESTRESULTS,TESTS'
|
||||
+' WHERE (TR_TEST_FK=T_ID) AND (TR_TESTRUN_FK='+FRunID+') ';
|
||||
If FOnlyFailed then
|
||||
@ -648,7 +648,7 @@ begin
|
||||
With CreateTableProducer(Q) do
|
||||
Try
|
||||
Border:=True;
|
||||
FL:='Test,Filename';
|
||||
FL:='Filename';
|
||||
If Not FNoSkipped then
|
||||
FL:=FL+',Skipped';
|
||||
If Not FOnlyFailed then
|
||||
@ -720,7 +720,7 @@ begin
|
||||
end;
|
||||
HeaderEnd(2);
|
||||
ParaGraphStart;
|
||||
S:='SELECT T_NAME as Test,T_FULLNAME as FileName,tr1.TR_SKIP as Run1_Skipped,'
|
||||
S:='SELECT T_NAME as Filename,tr1.TR_SKIP as Run1_Skipped,'
|
||||
+'tr2.TR_SKIP as Run2_Skipped,tr1.TR_OK as Run1_OK,tr2.TR_OK as Run2_OK '
|
||||
+'FROM TESTS,(select * from TESTRESULTS where TR_TESTRUN_FK='+FCompareRunID+') as tr2 '
|
||||
+'LEFT JOIN (select * from TESTRESULTS where TR_TESTRUN_FK='+FRunID+') as tr1 '
|
||||
@ -750,7 +750,7 @@ begin
|
||||
With CreateTableProducer(Q) do
|
||||
Try
|
||||
Border:=True;
|
||||
FL:='Test,FileName,Run1_OK,Run2_OK';
|
||||
FL:='Filename,Run1_OK,Run2_OK';
|
||||
If Not FNoSkipped then
|
||||
FL:=FL+',Run1_Skipped,Run2_Skipped';
|
||||
CreateColumns(FL);
|
||||
|
||||
Loading…
Reference in New Issue
Block a user