+ emulator execution support added

This commit is contained in:
florian 2005-01-01 18:59:50 +00:00
parent 159271443c
commit b55e201b6f
4 changed files with 57 additions and 10 deletions

View File

@ -1,5 +1,5 @@
#
# Don't edit, this file is generated by FPCMake Version 1.1 [2004/12/20]
# Don't edit, this file is generated by FPCMake Version 1.1 [2005/01/01]
#
default: allexectests
MAKEFILETARGETS=linux go32v2 win32 os2 freebsd beos netbsd amiga atari sunos qnx netware openbsd wdosx palmos macos darwin emx watcom morphos netwlibc
@ -1507,7 +1507,7 @@ endif
endif
endif
endif
TEST_OUTPUTDIR=output/$(FULL_TARGET)
TEST_OUTPUTDIR=output/$(TEST_FULL_TARGET)
ifndef FAILLIST
export FAILLIST:=$(TEST_OUTPUTDIR)/faillist
endif
@ -1598,6 +1598,9 @@ endif
ifdef DOALL
override DOTESTOPT+=-a
endif
ifdef EMULATOR
override DOTESTOPT+=-M$(EMULATOR)
endif
DIRS=webtbs webtbf tbs tbf $(TESTDIRS)
vpath %.log $(TEST_OUTPUTDIR)
vpath %.elg $(TEST_OUTPUTDIR)

View File

@ -67,7 +67,7 @@ endif
endif
# Target dir where the ppu and binaries are created
TEST_OUTPUTDIR=output/$(FULL_TARGET)
TEST_OUTPUTDIR=output/$(TEST_FULL_TARGET)
################################
@ -217,6 +217,10 @@ ifdef DOALL
override DOTESTOPT+=-a
endif
ifdef EMULATOR
override DOTESTOPT+=-M$(EMULATOR)
endif
################################
# Run tests

View File

@ -126,4 +126,16 @@ make TEST_FPC=$HOME/fpc/compiler/ppcsparc TEST_BINUTILSPREFIX=sparc-linux- TEST_
make TEST_FPC=$HOME/fpc/compiler/ppcsparc TEST_BINUTILSPREFIX=sparc-linux- TEST_SSH=fpc@sunny TEST_REMOTEPATH=/tmp/tests
Example for win32/putty:
make TEST_FPC=c:\fpc\compiler\ppcarm TEST_BINUTILSPREFIX=arm-linux- TEST_PUTTY=root@192.168.42.210 TEST_REMOTEPATH=/tmp TEST_DELTEMP=1 "TEST_REMOTEPW=xxx" FPC=c:\fpc\compiler\ppc386
make TEST_FPC=c:\fpc\compiler\ppcarm TEST_BINUTILSPREFIX=arm-linux- TEST_PUTTY=root@192.168.42.210 TEST_REMOTEPATH=/tmp TEST_DELTEMP=1 "TEST_REMOTEPW=xxx" FPC=c:\fpc\compiler\ppc386
Emulator execution
------------------
Emulator execution is possible as well. It can't be combined with remote execution though.
EMULATOR name of the emulator to use
Example:
make TEST_FPC=~/fpc/compiler/ppcrossarm TEST_OPT=-XParm-linux- EMULATOR=qemu-arm
make TEST_FPC=~/fpc/compiler/ppcrossarm TEST_OPT=-XParm-linux- EMULATOR=qemu-arm digest DBDIGESTOPT="-C qemu-arm" USESQL=YES

View File

@ -74,6 +74,7 @@ const
rshprog : string = 'rsh';
rcpprog : string = 'rcp';
rquote : char = '''';
emulatorname : string = '';
Function FileExists (Const F : String) : Boolean;
{
@ -631,10 +632,16 @@ var
execres : boolean;
function ExecuteRemote(const prog,args:string):boolean;
begin
Verbose(V_Debug,'RemoteExecuting '+Prog+' '+args);
ExecuteRemote:=ExecuteRedir(prog,args,'',EXELogFile,'stdout');
end;
begin
Verbose(V_Debug,'RemoteExecuting '+Prog+' '+args);
ExecuteRemote:=ExecuteRedir(prog,args,'',EXELogFile,'stdout');
end;
function ExecuteEmulated(const prog,args:string):boolean;
begin
Verbose(V_Debug,'EmulatorExecuting '+Prog+' '+args);
ExecuteEmulated:=ExecuteRedir(prog,args,'',FullExeLogFile,'stdout');
end;
begin
RunExecutable:=false;
@ -644,7 +651,22 @@ begin
TestExe:=OutputFileName(PPFile,ExeExt)
else
TestExe:=OutputFileName(PPFile,'');
if RemoteAddr<>'' then
if EmulatorName<>'' then
begin
{ Get full name out log file, because we change the directory during
execution }
FullExeLogFile:=FExpand(EXELogFile);
{$I-}
GetDir(0,OldDir);
ChDir(TestOutputDir);
{$I+}
ioresult;
execres:=ExecuteEmulated(EmulatorName,CurrDir+SplitFileName(TestExe));
{$I-}
ChDir(OldDir);
{$I+}
end
else if RemoteAddr<>'' then
begin
{ We don't want to create subdirs, remove paths from the test }
TestRemoteExe:=RemotePath+'/'+SplitFileName(TestExe);
@ -754,6 +776,7 @@ var
writeln(' -G include graph tests');
writeln(' -K include known bug tests');
writeln(' -I include interactive tests');
writeln(' -M<emulator> run the tests using the given emulator');
writeln(' -R<remote> run the tests remotely with the given rsh/ssh address');
writeln(' -S use ssh instead of rsh');
writeln(' -T remove temporary files (executable,ppu,o)');
@ -810,6 +833,8 @@ begin
DoUsual:=false;
end;
'M' : EmulatorName:=Para;
'P' : RemotePath:=Para;
'R' : RemoteAddr:=Para;
@ -1088,7 +1113,10 @@ begin
end.
{
$Log$
Revision 1.42 2004-11-29 21:25:32 peter
Revision 1.43 2005-01-01 18:59:52 florian
+ emulator execution support added
Revision 1.42 2004/11/29 21:25:32 peter
support for limit83fs
Revision 1.41 2004/11/09 23:13:50 peter