* support TestSrcDir option, where the *.pp files can be found

git-svn-id: trunk@149 -
This commit is contained in:
fpc 2005-05-29 20:21:48 +00:00
parent f67de71de2
commit 70fbf3bf17
2 changed files with 16 additions and 4 deletions

View File

@ -198,7 +198,8 @@ TConfigOpt = (
coDate,
coSubmitter,
coMachine,
coComment
coComment,
coTestSrcDir
);
Const
@ -215,11 +216,12 @@ ConfigStrings : Array [TConfigOpt] of string = (
'date',
'submitter',
'machine',
'comment'
'comment',
'testsrcdir'
);
ConfigOpts : Array[TConfigOpt] of char
= ('d','h','u','p','l','o','c','v','t','s','m','C');
= ('d','h','u','p','l','o','c','v','t','s','m','C','S');
Var
TestOS,
@ -251,6 +253,12 @@ begin
coSubmitter : Submitter:=Value;
coMachine : Machine:=Value;
coComment : Comment:=Value;
coTestSrcDir :
begin
TestSrcDir:=Value;
if (TestSrcDir<>'') and (TestSrcDir[length(TestSrcDir)]<>'/') then
TestSrcDir:=TestSrcDir+'/';
end;
end;
end;

View File

@ -48,6 +48,9 @@ Function IDQuery(Qry : String) : Integer;
Function EscapeSQL( S : String) : String;
Function SQLDate(D : TDateTime) : String;
var
TestSrcDir : string;
Implementation
Uses
@ -257,7 +260,8 @@ Var
begin
Result:=-1;
If FileExists(Name) and GetConfig(Name,Info) then
If FileExists(TestSrcDir+Name) and
GetConfig(TestSrcDir+Name,Info) then
begin
If RunQuery(Format(SInsertTest,[ExtractFileName(Name),Name]),Res) then
begin