mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-09-01 14:30:27 +02:00
+ emulator execution support added
This commit is contained in:
parent
159271443c
commit
b55e201b6f
@ -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
|
default: allexectests
|
||||||
MAKEFILETARGETS=linux go32v2 win32 os2 freebsd beos netbsd amiga atari sunos qnx netware openbsd wdosx palmos macos darwin emx watcom morphos netwlibc
|
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
|
endif
|
||||||
endif
|
endif
|
||||||
TEST_OUTPUTDIR=output/$(FULL_TARGET)
|
TEST_OUTPUTDIR=output/$(TEST_FULL_TARGET)
|
||||||
ifndef FAILLIST
|
ifndef FAILLIST
|
||||||
export FAILLIST:=$(TEST_OUTPUTDIR)/faillist
|
export FAILLIST:=$(TEST_OUTPUTDIR)/faillist
|
||||||
endif
|
endif
|
||||||
@ -1598,6 +1598,9 @@ endif
|
|||||||
ifdef DOALL
|
ifdef DOALL
|
||||||
override DOTESTOPT+=-a
|
override DOTESTOPT+=-a
|
||||||
endif
|
endif
|
||||||
|
ifdef EMULATOR
|
||||||
|
override DOTESTOPT+=-M$(EMULATOR)
|
||||||
|
endif
|
||||||
DIRS=webtbs webtbf tbs tbf $(TESTDIRS)
|
DIRS=webtbs webtbf tbs tbf $(TESTDIRS)
|
||||||
vpath %.log $(TEST_OUTPUTDIR)
|
vpath %.log $(TEST_OUTPUTDIR)
|
||||||
vpath %.elg $(TEST_OUTPUTDIR)
|
vpath %.elg $(TEST_OUTPUTDIR)
|
||||||
|
@ -67,7 +67,7 @@ endif
|
|||||||
endif
|
endif
|
||||||
|
|
||||||
# Target dir where the ppu and binaries are created
|
# 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
|
override DOTESTOPT+=-a
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
ifdef EMULATOR
|
||||||
|
override DOTESTOPT+=-M$(EMULATOR)
|
||||||
|
endif
|
||||||
|
|
||||||
|
|
||||||
################################
|
################################
|
||||||
# Run tests
|
# Run tests
|
||||||
|
@ -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
|
make TEST_FPC=$HOME/fpc/compiler/ppcsparc TEST_BINUTILSPREFIX=sparc-linux- TEST_SSH=fpc@sunny TEST_REMOTEPATH=/tmp/tests
|
||||||
|
|
||||||
Example for win32/putty:
|
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
|
||||||
|
@ -74,6 +74,7 @@ const
|
|||||||
rshprog : string = 'rsh';
|
rshprog : string = 'rsh';
|
||||||
rcpprog : string = 'rcp';
|
rcpprog : string = 'rcp';
|
||||||
rquote : char = '''';
|
rquote : char = '''';
|
||||||
|
emulatorname : string = '';
|
||||||
|
|
||||||
Function FileExists (Const F : String) : Boolean;
|
Function FileExists (Const F : String) : Boolean;
|
||||||
{
|
{
|
||||||
@ -631,10 +632,16 @@ var
|
|||||||
execres : boolean;
|
execres : boolean;
|
||||||
|
|
||||||
function ExecuteRemote(const prog,args:string):boolean;
|
function ExecuteRemote(const prog,args:string):boolean;
|
||||||
begin
|
begin
|
||||||
Verbose(V_Debug,'RemoteExecuting '+Prog+' '+args);
|
Verbose(V_Debug,'RemoteExecuting '+Prog+' '+args);
|
||||||
ExecuteRemote:=ExecuteRedir(prog,args,'',EXELogFile,'stdout');
|
ExecuteRemote:=ExecuteRedir(prog,args,'',EXELogFile,'stdout');
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
function ExecuteEmulated(const prog,args:string):boolean;
|
||||||
|
begin
|
||||||
|
Verbose(V_Debug,'EmulatorExecuting '+Prog+' '+args);
|
||||||
|
ExecuteEmulated:=ExecuteRedir(prog,args,'',FullExeLogFile,'stdout');
|
||||||
|
end;
|
||||||
|
|
||||||
begin
|
begin
|
||||||
RunExecutable:=false;
|
RunExecutable:=false;
|
||||||
@ -644,7 +651,22 @@ begin
|
|||||||
TestExe:=OutputFileName(PPFile,ExeExt)
|
TestExe:=OutputFileName(PPFile,ExeExt)
|
||||||
else
|
else
|
||||||
TestExe:=OutputFileName(PPFile,'');
|
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
|
begin
|
||||||
{ We don't want to create subdirs, remove paths from the test }
|
{ We don't want to create subdirs, remove paths from the test }
|
||||||
TestRemoteExe:=RemotePath+'/'+SplitFileName(TestExe);
|
TestRemoteExe:=RemotePath+'/'+SplitFileName(TestExe);
|
||||||
@ -754,6 +776,7 @@ var
|
|||||||
writeln(' -G include graph tests');
|
writeln(' -G include graph tests');
|
||||||
writeln(' -K include known bug tests');
|
writeln(' -K include known bug tests');
|
||||||
writeln(' -I include interactive 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(' -R<remote> run the tests remotely with the given rsh/ssh address');
|
||||||
writeln(' -S use ssh instead of rsh');
|
writeln(' -S use ssh instead of rsh');
|
||||||
writeln(' -T remove temporary files (executable,ppu,o)');
|
writeln(' -T remove temporary files (executable,ppu,o)');
|
||||||
@ -810,6 +833,8 @@ begin
|
|||||||
DoUsual:=false;
|
DoUsual:=false;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
'M' : EmulatorName:=Para;
|
||||||
|
|
||||||
'P' : RemotePath:=Para;
|
'P' : RemotePath:=Para;
|
||||||
|
|
||||||
'R' : RemoteAddr:=Para;
|
'R' : RemoteAddr:=Para;
|
||||||
@ -1088,7 +1113,10 @@ begin
|
|||||||
end.
|
end.
|
||||||
{
|
{
|
||||||
$Log$
|
$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
|
support for limit83fs
|
||||||
|
|
||||||
Revision 1.41 2004/11/09 23:13:50 peter
|
Revision 1.41 2004/11/09 23:13:50 peter
|
||||||
|
Loading…
Reference in New Issue
Block a user