mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-20 11:39:23 +02:00
tests: console testrunner accepts command line parameters for machine and submitter
git-svn-id: trunk@16124 -
This commit is contained in:
parent
2e4eb3f791
commit
da8fbdb76e
@ -31,6 +31,9 @@ type
|
|||||||
{ TLazTestRunner }
|
{ TLazTestRunner }
|
||||||
|
|
||||||
TLazTestRunner = class(TTestRunner)
|
TLazTestRunner = class(TTestRunner)
|
||||||
|
private
|
||||||
|
FSubmitter: string;
|
||||||
|
FMachine: string;
|
||||||
protected
|
protected
|
||||||
procedure AppendLongOpts; override;
|
procedure AppendLongOpts; override;
|
||||||
procedure ParseOptions; override;
|
procedure ParseOptions; override;
|
||||||
@ -52,11 +55,17 @@ begin
|
|||||||
inherited ParseOptions;
|
inherited ParseOptions;
|
||||||
if HasOption('compiler') then
|
if HasOption('compiler') then
|
||||||
Compiler := GetOptionValue('compiler');
|
Compiler := GetOptionValue('compiler');
|
||||||
|
if HasOption('submitter') then
|
||||||
|
FSubmitter := GetOptionValue('submitter');
|
||||||
|
if HasOption('machine') then
|
||||||
|
FMachine := GetOptionValue('machine');
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TLazTestRunner.WriteCustomHelp;
|
procedure TLazTestRunner.WriteCustomHelp;
|
||||||
begin
|
begin
|
||||||
writeln(' --compiler=<ppcxxx> use ppcxxx to build test projects');
|
writeln(' --compiler=<ppcxxx> use ppcxxx to build test projects');
|
||||||
|
writeln(' --submitter=SubmitterName name to be stored as sumbitter of the test results');
|
||||||
|
writeln(' --machine=MachineName name of the machine to be stored with the test results');
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TLazTestRunner.ExtendXmlDocument(Doc: TXMLDocument);
|
procedure TLazTestRunner.ExtendXmlDocument(Doc: TXMLDocument);
|
||||||
@ -78,6 +87,8 @@ begin
|
|||||||
AddElement('FPCVersion', {$I %FPCVERSION%});
|
AddElement('FPCVersion', {$I %FPCVERSION%});
|
||||||
AddElement('LazVersion', lcl_version);
|
AddElement('LazVersion', lcl_version);
|
||||||
AddElement('WidgetSet', LCLPlatformDirNames[WidgetSet.LCLPlatform]);
|
AddElement('WidgetSet', LCLPlatformDirNames[WidgetSet.LCLPlatform]);
|
||||||
|
AddElement('Submitter', FSubmitter);
|
||||||
|
AddElement('Machine', FMachine);
|
||||||
Doc.FirstChild.AppendChild(env);
|
Doc.FirstChild.AppendChild(env);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user