* explanation for running the testsuite remotely

+ dotest supports remote execution using scp/ssh
This commit is contained in:
florian 2004-03-21 19:15:18 +00:00
parent 9d8b53c9cc
commit 94ab3f4457
2 changed files with 53 additions and 6 deletions

View File

@ -34,3 +34,14 @@ make full This should create a log of all failed tests.
make rundigest scans the created log file and outputs some statistics
make rundigest USESQL=YES sends the results to an SQL database
Also remote execution of the testsuite is possible
Requirements:
- current build tree contains a cross compiled rtl/fcl
- the cross compiler is installed works without passing extra parameters
- the tests tree is somewhere on the remote machine e.g. /mnt/cf/fpc/tests
- some dir, e.g. i386-utils contains a dotest executable for the host system
- ssh must work without keyboard interaction or extra parameters
then a example make command could be
make DOTEST=i386-utils/dotest FPC=ppcarm "DOTESTOPT=-Y-XParm-linux- -Rroot@192.168.44.9 -P/mnt/cf/fpc/tests -T"

View File

@ -51,6 +51,10 @@ const
DoKnown : boolean = false;
DoAll : boolean = false;
DoUsual : boolean = true;
ExtraCompilerOpts : string = '';
DelExecutable : boolean = false;
RemoteAddr : string = '';
RemotePath : string = '';
Function FileExists (Const F : String) : Boolean;
{
@ -373,7 +377,7 @@ var
begin
RunCompiler:=false;
OutName:=ForceExtension(PPFile,'log');
args:='-n -Fuunits';
args:='-n -Fuunits '+ExtraCompilerOpts;
{$ifdef unix}
{ Add runtime library path to current dir to find .so files }
if Config.NeedLibrary then
@ -477,11 +481,26 @@ begin
TestExe:=ForceExtension(PPFile,ExeExt);
OutName:=ForceExtension(PPFile,'elg');
Verbose(V_Debug,'Executing '+TestExe);
{ don't redirect interactive and graph programs .. }
if Config.IsInteractive or Config.UsesGraph then
ExecuteRedir(TestExe,'','','','')
if RemoteAddr<>'' then
begin
ExecuteRedir('ssh',RemoteAddr+' rm -f '+RemotePath+'/'+TestExe,'',OutName,'');
ExecuteRedir('scp',TestExe+' '+RemoteAddr+':'+RemotePath+'/'+TestExe,'',OutName,'');
{ don't redirect interactive and graph programs .. }
if Config.IsInteractive or Config.UsesGraph then
ExecuteRedir(TestExe,'','','','')
else
ExecuteRedir('ssh',RemoteAddr+' '+RemotePath+'/'+TestExe,'',OutName,'');
if DelExecutable then
ExecuteRedir('ssh',RemoteAddr+' rm -f '+RemotePath+'/'+TestExe,'',OutName,'');
end
else
ExecuteRedir(TestExe,'','',OutName,'');
begin
{ don't redirect interactive and graph programs .. }
if Config.IsInteractive or Config.UsesGraph then
ExecuteRedir(TestExe,'','','','')
else
ExecuteRedir(TestExe,'','',OutName,'');
end;
Verbose(V_Debug,'Exitcode '+ToStr(ExecuteResult));
if ExecuteResult<>Config.ResultCode then
begin
@ -533,6 +552,10 @@ var
writeln(' -G include graph tests');
writeln(' -K include known bug tests');
writeln(' -I include interactive tests');
writeln(' -R<remote> run the tests remotely with the given ssh address');
writeln(' -P<path> path to the tests tree on the remote machine');
writeln(' -T remove executables after execution (applies only for remote tests)');
writeln(' -Y<opts> extra options passed to the compiler');
halt(1);
end;
@ -575,7 +598,16 @@ begin
DoUsual:=false;
end;
'V' : DoVerbose:=true;
'X' : UseComSpec:=false;
'P' : RemotePath:=Para;
'Y' : ExtraCompilerOpts:=Para;
'R' : RemoteAddr:=Para;
'T' : DelExecutable:=true;
end;
end
else
@ -793,7 +825,11 @@ begin
end.
{
$Log$
Revision 1.29 2003-10-31 16:14:20 peter
Revision 1.30 2004-03-21 19:15:18 florian
* explanation for running the testsuite remotely
+ dotest supports remote execution using scp/ssh
Revision 1.29 2003/10/31 16:14:20 peter
* remove compileerror10, note10
* remove known, use knowncompileerror,knownrunerror instead
* knowncompileerror,knownrunerror tests are now really skipped