* 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, coDate,
coSubmitter, coSubmitter,
coMachine, coMachine,
coComment coComment,
coTestSrcDir
); );
Const Const
@ -215,11 +216,12 @@ ConfigStrings : Array [TConfigOpt] of string = (
'date', 'date',
'submitter', 'submitter',
'machine', 'machine',
'comment' 'comment',
'testsrcdir'
); );
ConfigOpts : Array[TConfigOpt] of char 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 Var
TestOS, TestOS,
@ -251,6 +253,12 @@ begin
coSubmitter : Submitter:=Value; coSubmitter : Submitter:=Value;
coMachine : Machine:=Value; coMachine : Machine:=Value;
coComment : Comment:=Value; coComment : Comment:=Value;
coTestSrcDir :
begin
TestSrcDir:=Value;
if (TestSrcDir<>'') and (TestSrcDir[length(TestSrcDir)]<>'/') then
TestSrcDir:=TestSrcDir+'/';
end;
end; end;
end; end;

View File

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