mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-09-05 00:10:37 +02:00
* fixed library tests
* fix test cases to generate their own temporary files
This commit is contained in:
parent
95e0ed26f8
commit
161cbe3824
@ -1551,8 +1551,8 @@ units:
|
||||
OPT="$(TEST_OPT)" CCOMPILER=$(TEST_CCOMPILER) BINUTILSPREFIX=$(TEST_BINUTILSPREFIX)
|
||||
copyfiles: $(TEST_OUTPUTDIR)
|
||||
$(COPY) test/cg/obj/$(TEST_OS_TARGET)/$(TEST_CPU_TARGET)/ctest.o test/cg
|
||||
-$(MKDIRTREE) $(TEST_OUTPUTDIR)/tests/units/system
|
||||
$(COPY) test/units/system/test*.txt $(TEST_OUTPUTDIR)/tests/units/system
|
||||
-$(MKDIRTREE) $(TEST_OUTPUTDIR)/test/units/system
|
||||
$(COPY) test/units/system/test*.txt $(TEST_OUTPUTDIR)/test/units/system
|
||||
testprep: testprep-stamp.$(TEST_FULL_TARGET)
|
||||
testprep-stamp.$(TEST_FULL_TARGET): $(TEST_OUTPUTDIR) utils units copyfiles
|
||||
$(ECHO) $(DATE) > testprep-stamp.$(TEST_FULL_TARGET)
|
||||
|
@ -142,8 +142,8 @@ units:
|
||||
|
||||
copyfiles: $(TEST_OUTPUTDIR)
|
||||
$(COPY) test/cg/obj/$(TEST_OS_TARGET)/$(TEST_CPU_TARGET)/ctest.o test/cg
|
||||
-$(MKDIRTREE) $(TEST_OUTPUTDIR)/tests/units/system
|
||||
$(COPY) test/units/system/test*.txt $(TEST_OUTPUTDIR)/tests/units/system
|
||||
-$(MKDIRTREE) $(TEST_OUTPUTDIR)/test/units/system
|
||||
$(COPY) test/units/system/test*.txt $(TEST_OUTPUTDIR)/test/units/system
|
||||
|
||||
################################
|
||||
# Preparation for tests
|
||||
|
@ -10,7 +10,14 @@ var
|
||||
L:longint;
|
||||
S:string;
|
||||
begin
|
||||
assign(F,'tbs/tb0084.pp'); { Assign F to itself }
|
||||
{ Create temp }
|
||||
assign(F,'tb0084.tmp'); { Assign F to itself }
|
||||
rewrite(f);
|
||||
for l:=1 to 100 do
|
||||
writeln('Hello world');
|
||||
close(f);
|
||||
|
||||
assign(F,'tb0084.tmp'); { Assign F to itself }
|
||||
reset(F); { Open it (as a textfile) }
|
||||
ReadLn(F); { Just read some lines }
|
||||
ReadLn(F);
|
||||
|
@ -1,10 +1,10 @@
|
||||
{ Old file: tbs0227.pp }
|
||||
{ external var does strange things when declared in localsymtable OK 0.99.11 (PFV) }
|
||||
|
||||
function getstacksize:longint;assembler;
|
||||
var
|
||||
stacksize : ptrint;external name '__stklen';
|
||||
// sbrk : longint;external name '___sbrk';
|
||||
|
||||
function getstacksize:longint;assembler;
|
||||
asm
|
||||
{$ifdef CPUI386}
|
||||
movl stacksize,%eax
|
||||
|
@ -473,7 +473,7 @@ begin
|
||||
{$ifdef unix}
|
||||
{ Add runtime library path to current dir to find .so files }
|
||||
if Config.NeedLibrary then
|
||||
args:=args+' ''-k-rpath .''';
|
||||
args:=args+' -Fl'+TestOutputDir+' ''-k-rpath .''';
|
||||
{$endif unix}
|
||||
if Config.NeedOptions<>'' then
|
||||
args:=args+' '+Config.NeedOptions;
|
||||
@ -1081,7 +1081,11 @@ begin
|
||||
end.
|
||||
{
|
||||
$Log$
|
||||
Revision 1.40 2004-11-09 21:26:29 peter
|
||||
Revision 1.41 2004-11-09 23:13:50 peter
|
||||
* fixed library tests
|
||||
* fix test cases to generate their own temporary files
|
||||
|
||||
Revision 1.40 2004/11/09 21:26:29 peter
|
||||
* use ./ before executable under unix
|
||||
|
||||
Revision 1.39 2004/11/09 17:26:28 peter
|
||||
|
@ -4,12 +4,18 @@ uses
|
||||
sysutils;
|
||||
|
||||
const
|
||||
fname = 'Makefile';
|
||||
fname = 'tw1479.tmp';
|
||||
|
||||
ThisDir = '.'+DirectorySeparator;
|
||||
var
|
||||
fn : string;
|
||||
f : text;
|
||||
begin
|
||||
assign(f,fname);
|
||||
rewrite(f);
|
||||
writeln(f,'hello');
|
||||
close(f);
|
||||
|
||||
fn:=FileSearch(fname,PathSeparator);
|
||||
writeln('found: ',fn);
|
||||
if fn<>fname then
|
||||
|
Loading…
Reference in New Issue
Block a user