mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-18 08:09:28 +02:00
* some dummy .o files for solaris
* support running testsuite for non-default compiler targets (i.e. non-linux) git-svn-id: trunk@2468 -
This commit is contained in:
parent
4be3a232fc
commit
24fa3cc3bf
4
.gitattributes
vendored
4
.gitattributes
vendored
@ -5410,6 +5410,9 @@ tests/test/cg/obj/macos/powerpc/ctest.o -text
|
|||||||
tests/test/cg/obj/netbsd/m68k/ctest.o -text
|
tests/test/cg/obj/netbsd/m68k/ctest.o -text
|
||||||
tests/test/cg/obj/os2/i386/ctest.o -text
|
tests/test/cg/obj/os2/i386/ctest.o -text
|
||||||
tests/test/cg/obj/readme.txt svneol=native#text/plain
|
tests/test/cg/obj/readme.txt svneol=native#text/plain
|
||||||
|
tests/test/cg/obj/solaris/sparc/ctest.o -text
|
||||||
|
tests/test/cg/obj/solaris/sparc/tcext3.o -text
|
||||||
|
tests/test/cg/obj/solaris/sparc/tcext4.o -text
|
||||||
tests/test/cg/obj/tcext3.c -text
|
tests/test/cg/obj/tcext3.c -text
|
||||||
tests/test/cg/obj/tcext4.c -text
|
tests/test/cg/obj/tcext4.c -text
|
||||||
tests/test/cg/obj/win32/i386/ctest.o -text
|
tests/test/cg/obj/win32/i386/ctest.o -text
|
||||||
@ -5616,6 +5619,7 @@ tests/test/tgeneric2.pp svneol=native#text/plain
|
|||||||
tests/test/tgeneric3.pp svneol=native#text/plain
|
tests/test/tgeneric3.pp svneol=native#text/plain
|
||||||
tests/test/tgeneric4.pp svneol=native#text/plain
|
tests/test/tgeneric4.pp svneol=native#text/plain
|
||||||
tests/test/tgeneric5.pp svneol=native#text/plain
|
tests/test/tgeneric5.pp svneol=native#text/plain
|
||||||
|
tests/test/tgeneric6.pp svneol=native#text/plain
|
||||||
tests/test/tgoto.pp svneol=native#text/plain
|
tests/test/tgoto.pp svneol=native#text/plain
|
||||||
tests/test/theap.pp svneol=native#text/plain
|
tests/test/theap.pp svneol=native#text/plain
|
||||||
tests/test/thintdir.pp svneol=native#text/plain
|
tests/test/thintdir.pp svneol=native#text/plain
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
#
|
#
|
||||||
# Don't edit, this file is generated by FPCMake Version 2.0.0 [2006/01/13]
|
# Don't edit, this file is generated by FPCMake Version 2.0.0 [2006/02/06]
|
||||||
#
|
#
|
||||||
default: allexectests
|
default: allexectests
|
||||||
MAKEFILETARGETS=i386-linux i386-go32v2 i386-win32 i386-os2 i386-freebsd i386-beos i386-netbsd i386-solaris i386-qnx i386-netware i386-openbsd i386-wdosx i386-emx i386-watcom i386-netwlibc i386-wince m68k-linux m68k-freebsd m68k-netbsd m68k-amiga m68k-atari m68k-openbsd m68k-palmos powerpc-linux powerpc-netbsd powerpc-macos powerpc-darwin powerpc-morphos sparc-linux sparc-netbsd sparc-solaris x86_64-linux x86_64-freebsd x86_64-win64 arm-linux arm-wince powerpc64-linux
|
MAKEFILETARGETS=i386-linux i386-go32v2 i386-win32 i386-os2 i386-freebsd i386-beos i386-netbsd i386-solaris i386-qnx i386-netware i386-openbsd i386-wdosx i386-emx i386-watcom i386-netwlibc i386-wince m68k-linux m68k-freebsd m68k-netbsd m68k-amiga m68k-atari m68k-openbsd m68k-palmos powerpc-linux powerpc-netbsd powerpc-macos powerpc-darwin powerpc-morphos sparc-linux sparc-netbsd sparc-solaris x86_64-linux x86_64-freebsd x86_64-win64 arm-linux arm-palmos arm-wince powerpc64-linux
|
||||||
BSDs = freebsd netbsd openbsd darwin
|
BSDs = freebsd netbsd openbsd darwin
|
||||||
UNIXs = linux $(BSDs) solaris qnx
|
UNIXs = linux $(BSDs) solaris qnx
|
||||||
LIMIT83fs = go32v2 os2 emx watcom
|
LIMIT83fs = go32v2 os2 emx watcom
|
||||||
@ -1406,8 +1406,8 @@ ifeq ($(findstring -c$(TEST_FPC),$(DOTESTOPT)),)
|
|||||||
override DOTESTOPT+=-c$(TEST_FPC)
|
override DOTESTOPT+=-c$(TEST_FPC)
|
||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
ifneq ($(OS_TARGET),$(TEST_OS_TARGET))
|
ifneq ($(FULL_TARGET),$(TEST_FULL_TARGET))
|
||||||
override DOTESTOPT+=-Y-T$(TEST_OS_TARGET)
|
override DOTESTOPT+=-T$(TEST_FULL_TARGET)
|
||||||
endif
|
endif
|
||||||
ifneq ($(TEST_BINUTILSPREFIX),)
|
ifneq ($(TEST_BINUTILSPREFIX),)
|
||||||
override DOTESTOPT+=-Y-XP$(TEST_BINUTILSPREFIX) -Y-Xd
|
override DOTESTOPT+=-Y-XP$(TEST_BINUTILSPREFIX) -Y-Xd
|
||||||
@ -1422,7 +1422,7 @@ ifdef TEST_REMOTEPATH
|
|||||||
override DOTESTOPT+=-P$(TEST_REMOTEPATH)
|
override DOTESTOPT+=-P$(TEST_REMOTEPATH)
|
||||||
endif
|
endif
|
||||||
ifdef TEST_DELTEMP
|
ifdef TEST_DELTEMP
|
||||||
override DOTESTOPT+=-T
|
override DOTESTOPT+=-Z
|
||||||
endif
|
endif
|
||||||
ifdef TEST_VERBOSE
|
ifdef TEST_VERBOSE
|
||||||
override DOTESTOPT+=-V
|
override DOTESTOPT+=-V
|
||||||
|
@ -179,8 +179,8 @@ override DOTESTOPT+=-c$(TEST_FPC)
|
|||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
|
|
||||||
ifneq ($(OS_TARGET),$(TEST_OS_TARGET))
|
ifneq ($(FULL_TARGET),$(TEST_FULL_TARGET))
|
||||||
override DOTESTOPT+=-Y-T$(TEST_OS_TARGET)
|
override DOTESTOPT+=-T$(TEST_FULL_TARGET)
|
||||||
endif
|
endif
|
||||||
ifneq ($(TEST_BINUTILSPREFIX),)
|
ifneq ($(TEST_BINUTILSPREFIX),)
|
||||||
override DOTESTOPT+=-Y-XP$(TEST_BINUTILSPREFIX) -Y-Xd
|
override DOTESTOPT+=-Y-XP$(TEST_BINUTILSPREFIX) -Y-Xd
|
||||||
@ -195,7 +195,7 @@ ifdef TEST_REMOTEPATH
|
|||||||
override DOTESTOPT+=-P$(TEST_REMOTEPATH)
|
override DOTESTOPT+=-P$(TEST_REMOTEPATH)
|
||||||
endif
|
endif
|
||||||
ifdef TEST_DELTEMP
|
ifdef TEST_DELTEMP
|
||||||
override DOTESTOPT+=-T
|
override DOTESTOPT+=-Z
|
||||||
endif
|
endif
|
||||||
ifdef TEST_VERBOSE
|
ifdef TEST_VERBOSE
|
||||||
override DOTESTOPT+=-V
|
override DOTESTOPT+=-V
|
||||||
|
BIN
tests/test/cg/obj/solaris/sparc/ctest.o
Normal file
BIN
tests/test/cg/obj/solaris/sparc/ctest.o
Normal file
Binary file not shown.
0
tests/test/cg/obj/solaris/sparc/tcext3.o
Normal file
0
tests/test/cg/obj/solaris/sparc/tcext3.o
Normal file
0
tests/test/cg/obj/solaris/sparc/tcext4.o
Normal file
0
tests/test/cg/obj/solaris/sparc/tcext4.o
Normal file
50
tests/test/tgeneric6.pp
Executable file
50
tests/test/tgeneric6.pp
Executable file
@ -0,0 +1,50 @@
|
|||||||
|
{$mode objfpc}
|
||||||
|
|
||||||
|
type
|
||||||
|
generic PListItem<_T>=^specialize TListItem<_T>;
|
||||||
|
generic TListItem<_T>=record
|
||||||
|
data : _T;
|
||||||
|
next : specialize PListItem<_T>;
|
||||||
|
end;
|
||||||
|
|
||||||
|
generic TList<_T>=class(TObject)
|
||||||
|
first : specialize PListItem<_T>;
|
||||||
|
procedure Add(item: _T);
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TList.Add(data: _T);
|
||||||
|
var
|
||||||
|
newitem : specialize PListItem<_T>;
|
||||||
|
begin
|
||||||
|
new(newitem);
|
||||||
|
newitem.data:=data;
|
||||||
|
newitem.next:=first;
|
||||||
|
end;
|
||||||
|
|
||||||
|
type
|
||||||
|
TMyIntList = specialize TList<integer>;
|
||||||
|
TMyStringList = specialize TList<string>;
|
||||||
|
|
||||||
|
var
|
||||||
|
ilist : TMyIntList;
|
||||||
|
slist : TMyStringList;
|
||||||
|
someInt : integer;
|
||||||
|
begin
|
||||||
|
someInt:=10;
|
||||||
|
ilist := TMyIntList.Create;
|
||||||
|
ilist.Add(someInt);
|
||||||
|
ilist.Add(someInt+1);
|
||||||
|
writeln(ilist.first^.data);
|
||||||
|
if ilist.data<>10 then
|
||||||
|
halt(1);
|
||||||
|
writeln(ilist.first^.next^.data);
|
||||||
|
if ilist.data<>11 then
|
||||||
|
halt(1);
|
||||||
|
|
||||||
|
slist := TMyStringList.Create;
|
||||||
|
slist.Add('Test1');
|
||||||
|
slist.Add('Test2');
|
||||||
|
writeln(slist.data);
|
||||||
|
if slist.data<>'Test1' then
|
||||||
|
halt(1);
|
||||||
|
end.
|
@ -56,10 +56,13 @@ var
|
|||||||
RTLUnitsDir,
|
RTLUnitsDir,
|
||||||
TestOutputDir,
|
TestOutputDir,
|
||||||
OutputDir : string;
|
OutputDir : string;
|
||||||
CompilerBin : string;
|
CompilerBin,
|
||||||
CompilerCPU : string;
|
CompilerCPU,
|
||||||
CompilerTarget : string;
|
CompilerTarget,
|
||||||
CompilerVersion : string;
|
CompilerVersion,
|
||||||
|
DefaultCompilerCPU,
|
||||||
|
DefaultCompilerTarget,
|
||||||
|
DefaultCompilerVersion : string;
|
||||||
PPFile : string;
|
PPFile : string;
|
||||||
PPFileInfo : string;
|
PPFileInfo : string;
|
||||||
TestName : string;
|
TestName : string;
|
||||||
@ -353,11 +356,32 @@ begin
|
|||||||
return the first info }
|
return the first info }
|
||||||
case c of
|
case c of
|
||||||
compver :
|
compver :
|
||||||
hs:='-iVTPTO';
|
begin
|
||||||
|
if DefaultCompilerVersion<>'' then
|
||||||
|
begin
|
||||||
|
GetCompilerInfo:=true;
|
||||||
|
exit;
|
||||||
|
end;
|
||||||
|
hs:='-iVTPTO';
|
||||||
|
end;
|
||||||
compcpu :
|
compcpu :
|
||||||
hs:='-iTPTOV';
|
begin
|
||||||
|
if DefaultCompilerCPU<>'' then
|
||||||
|
begin
|
||||||
|
GetCompilerInfo:=true;
|
||||||
|
exit;
|
||||||
|
end;
|
||||||
|
hs:='-iTPTOV';
|
||||||
|
end;
|
||||||
comptarget :
|
comptarget :
|
||||||
hs:='-iTOTPV';
|
begin
|
||||||
|
if DefaultCompilerTarget<>'' then
|
||||||
|
begin
|
||||||
|
GetCompilerInfo:=true;
|
||||||
|
exit;
|
||||||
|
end;
|
||||||
|
hs:='-iTOTPV';
|
||||||
|
end;
|
||||||
end;
|
end;
|
||||||
ExecuteRedir(CompilerBin,hs,'','out','');
|
ExecuteRedir(CompilerBin,hs,'','out','');
|
||||||
assign(t,'out');
|
assign(t,'out');
|
||||||
@ -375,21 +399,21 @@ begin
|
|||||||
case c of
|
case c of
|
||||||
compver :
|
compver :
|
||||||
begin
|
begin
|
||||||
CompilerVersion:=GetToken(hs);
|
DefaultCompilerVersion:=GetToken(hs);
|
||||||
CompilerCPU:=GetToken(hs);
|
DefaultCompilerCPU:=GetToken(hs);
|
||||||
CompilerTarget:=GetToken(hs);
|
DefaultCompilerTarget:=GetToken(hs);
|
||||||
end;
|
end;
|
||||||
compcpu :
|
compcpu :
|
||||||
begin
|
begin
|
||||||
CompilerCPU:=GetToken(hs);
|
DefaultCompilerCPU:=GetToken(hs);
|
||||||
CompilerTarget:=GetToken(hs);
|
DefaultCompilerTarget:=GetToken(hs);
|
||||||
CompilerVersion:=GetToken(hs);
|
DefaultCompilerVersion:=GetToken(hs);
|
||||||
end;
|
end;
|
||||||
comptarget :
|
comptarget :
|
||||||
begin
|
begin
|
||||||
CompilerTarget:=GetToken(hs);
|
DefaultCompilerTarget:=GetToken(hs);
|
||||||
CompilerCPU:=GetToken(hs);
|
DefaultCompilerCPU:=GetToken(hs);
|
||||||
CompilerVersion:=GetToken(hs);
|
DefaultCompilerVersion:=GetToken(hs);
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
GetCompilerInfo:=true;
|
GetCompilerInfo:=true;
|
||||||
@ -400,7 +424,10 @@ end;
|
|||||||
function GetCompilerVersion:boolean;
|
function GetCompilerVersion:boolean;
|
||||||
begin
|
begin
|
||||||
if CompilerVersion='' then
|
if CompilerVersion='' then
|
||||||
GetCompilerVersion:=GetCompilerInfo(compver)
|
begin
|
||||||
|
GetCompilerVersion:=GetCompilerInfo(compver);
|
||||||
|
CompilerVersion:=DefaultCompilerVersion;
|
||||||
|
end
|
||||||
else
|
else
|
||||||
GetCompilerVersion:=true;
|
GetCompilerVersion:=true;
|
||||||
if GetCompilerVersion then
|
if GetCompilerVersion then
|
||||||
@ -411,7 +438,10 @@ end;
|
|||||||
function GetCompilerCPU:boolean;
|
function GetCompilerCPU:boolean;
|
||||||
begin
|
begin
|
||||||
if CompilerCPU='' then
|
if CompilerCPU='' then
|
||||||
GetCompilerCPU:=GetCompilerInfo(compcpu)
|
begin
|
||||||
|
GetCompilerCPU:=GetCompilerInfo(compcpu);
|
||||||
|
CompilerCPU:=DefaultCompilerCPU;
|
||||||
|
end
|
||||||
else
|
else
|
||||||
GetCompilerCPU:=true;
|
GetCompilerCPU:=true;
|
||||||
if GetCompilerCPU then
|
if GetCompilerCPU then
|
||||||
@ -422,7 +452,10 @@ end;
|
|||||||
function GetCompilerTarget:boolean;
|
function GetCompilerTarget:boolean;
|
||||||
begin
|
begin
|
||||||
if CompilerTarget='' then
|
if CompilerTarget='' then
|
||||||
GetCompilerTarget:=GetCompilerInfo(comptarget)
|
begin
|
||||||
|
GetCompilerTarget:=GetCompilerInfo(comptarget);
|
||||||
|
CompilerTarget:=DefaultCompilerTarget;
|
||||||
|
end
|
||||||
else
|
else
|
||||||
GetCompilerTarget:=true;
|
GetCompilerTarget:=true;
|
||||||
if GetCompilerTarget then
|
if GetCompilerTarget then
|
||||||
@ -488,7 +521,7 @@ var
|
|||||||
execres : boolean;
|
execres : boolean;
|
||||||
begin
|
begin
|
||||||
RunCompiler:=false;
|
RunCompiler:=false;
|
||||||
args:='-n -Fu'+RTLUnitsDir;
|
args:='-n -T'+CompilerTarget+' -Fu'+RTLUnitsDir;
|
||||||
args:=args+' -FE'+TestOutputDir;
|
args:=args+' -FE'+TestOutputDir;
|
||||||
{$ifdef macos}
|
{$ifdef macos}
|
||||||
args:=args+' -WT '; {tests should be compiled as MPWTool}
|
args:=args+' -WT '; {tests should be compiled as MPWTool}
|
||||||
@ -789,7 +822,7 @@ procedure getargs;
|
|||||||
var
|
var
|
||||||
ch : char;
|
ch : char;
|
||||||
para : string;
|
para : string;
|
||||||
i : longint;
|
i,j : longint;
|
||||||
|
|
||||||
procedure helpscreen;
|
procedure helpscreen;
|
||||||
begin
|
begin
|
||||||
@ -807,13 +840,14 @@ var
|
|||||||
writeln(' -M<emulator> run the tests using the given emulator');
|
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[cpu-]<os> run tests for target cpu and os');
|
||||||
writeln(' -P<path> path to the tests tree on the remote machine');
|
writeln(' -P<path> path to the tests tree on the remote machine');
|
||||||
writeln(' -U<remotepara>');
|
writeln(' -U<remotepara>');
|
||||||
writeln(' pass additional parameter to remote program. Multiple -U can be used');
|
writeln(' pass additional parameter to remote program. Multiple -U can be used');
|
||||||
writeln(' -V be verbose');
|
writeln(' -V be verbose');
|
||||||
writeln(' -W use putty compatible file names when testing (plink and pscp)');
|
writeln(' -W use putty compatible file names when testing (plink and pscp)');
|
||||||
writeln(' -Y<opts> extra options passed to the compiler. Several -Y<opt> can be given.');
|
writeln(' -Y<opts> extra options passed to the compiler. Several -Y<opt> can be given.');
|
||||||
|
writeln(' -Z remove temporary files (executable,ppu,o)');
|
||||||
halt(1);
|
halt(1);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
@ -874,7 +908,16 @@ begin
|
|||||||
end;
|
end;
|
||||||
|
|
||||||
'T' :
|
'T' :
|
||||||
DelExecutable:=true;
|
begin
|
||||||
|
j:=Pos('-',Para);
|
||||||
|
if j>0 then
|
||||||
|
begin
|
||||||
|
CompilerCPU:=Copy(Para,1,j-1);
|
||||||
|
CompilerTarget:=Copy(Para,j+1,255);
|
||||||
|
end
|
||||||
|
else
|
||||||
|
CompilerTarget:=Para
|
||||||
|
end;
|
||||||
|
|
||||||
'U' :
|
'U' :
|
||||||
RemotePara:=RemotePara+' '+Para;
|
RemotePara:=RemotePara+' '+Para;
|
||||||
@ -891,6 +934,9 @@ begin
|
|||||||
'X' : UseComSpec:=false;
|
'X' : UseComSpec:=false;
|
||||||
|
|
||||||
'Y' : ExtraCompilerOpts:= ExtraCompilerOpts +' '+ Para;
|
'Y' : ExtraCompilerOpts:= ExtraCompilerOpts +' '+ Para;
|
||||||
|
|
||||||
|
'Z' :
|
||||||
|
DelExecutable:=true;
|
||||||
end;
|
end;
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
|
Loading…
Reference in New Issue
Block a user