mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-12 08:49:33 +02:00
Fix failure for windows make, related to the use of redirection,
which on mingw32 make generate the use of a batch file, incompatible with forward slashes usd for createlst and gparmake. * utils/createlst.pp: Modify to add a first parameter with the name of the output file. Makefile.fpc: Adapt to new parameter of createlst. Change list name for directory TEST from TESTfilelist.lst to filelistTEST.lst to avoid generating files that start as the directory. git-svn-id: trunk@34328 -
This commit is contained in:
parent
c4347e28b9
commit
05542fbed9
tests
@ -527,16 +527,16 @@ $(MAKEINC): $(GPARMAKE) $(CREATELST)
|
||||
# new call with a gap insuring that all the previous files have lower index
|
||||
# even if CHUNKSIZE is equal to 1.
|
||||
$(Q)$(MAKE) $(TEST_OUTPUTDIR)
|
||||
$(Q)$(CREATELST) $(TESTDIRS) > testfilelist.lst
|
||||
$(Q)$(GPARMAKE) $(MAKEINC) test 1 $(CHUNKSIZE) @testfilelist.lst
|
||||
$(Q)$(CREATELST) tbs > tbsfilelist.lst
|
||||
$(Q)$(GPARMAKE) -a $(MAKEINC) tbs 10000 $(CHUNKSIZE) @tbsfilelist.lst
|
||||
$(Q)$(CREATELST) tbf > tbffilelist.lst
|
||||
$(Q)$(GPARMAKE) -a $(MAKEINC) tbf 15000 $(CHUNKSIZE) @tbffilelist.lst
|
||||
$(Q)$(CREATELST) webtbs > webtbsfilelist.lst
|
||||
$(Q)$(GPARMAKE) -a $(MAKEINC) webtbs 20000 $(CHUNKSIZE) @webtbsfilelist.lst
|
||||
$(Q)$(CREATELST) webtbf > webtbffilelist.lst
|
||||
$(Q)$(GPARMAKE) -a $(MAKEINC) webtbf 30000 $(CHUNKSIZE) @webtbffilelist.lst
|
||||
$(CREATELST) filelisttest.lst $(TESTDIRS)
|
||||
$(GPARMAKE) $(MAKEINC) test 1 $(CHUNKSIZE) @filelisttest.lst
|
||||
$(CREATELST) filelisttbs.lst tbs
|
||||
$(GPARMAKE) -a $(MAKEINC) tbs 10000 $(CHUNKSIZE) @filelisttbs.lst
|
||||
$(CREATELST) filelisttbf.lst tbf
|
||||
$(GPARMAKE) -a $(MAKEINC) tbf 15000 $(CHUNKSIZE) @filelisttbf.lst
|
||||
$(CREATELST) filelistwebtbs.lst webtbs
|
||||
$(GPARMAKE) -a $(MAKEINC) webtbs 20000 $(CHUNKSIZE) @filelistwebtbs.lst
|
||||
$(CREATELST) filelistwebtbf.lst webtbf
|
||||
$(GPARMAKE) -a $(MAKEINC) webtbf 30000 $(CHUNKSIZE) @filelistwebtbf.lst
|
||||
|
||||
|
||||
# only include the targets to compile/run the tests when we want to
|
||||
|
@ -4,32 +4,61 @@ uses
|
||||
SysUtils, Classes;
|
||||
|
||||
var
|
||||
i: LongInt;
|
||||
i,ioerror : LongInt;
|
||||
outfile : text;
|
||||
sr: TSearchRec;
|
||||
path: String;
|
||||
sl: TStringList;
|
||||
begin
|
||||
if ParamCount = 0 then begin
|
||||
Writeln('createlst PATH [PATH [...]]');
|
||||
Exit;
|
||||
end;
|
||||
if ParamCount < 2 then
|
||||
begin
|
||||
Writeln('createlst OUTPUTFILE PATH [PATH [...]]');
|
||||
Halt(1);
|
||||
end;
|
||||
|
||||
sl := TStringList.Create;
|
||||
|
||||
for i := 1 to ParamCount do begin
|
||||
path := IncludeTrailingPathDelimiter(ParamStr(i));
|
||||
if FindFirst(path + 't*.pp', 0, sr) = 0 then begin
|
||||
repeat
|
||||
sl.Add(path + sr.Name);
|
||||
until FindNext(sr) <> 0;
|
||||
{$i-}
|
||||
assign(outfile,paramstr(1));
|
||||
rewrite(outfile);
|
||||
ioerror:=IOResult;
|
||||
|
||||
FindClose(sr);
|
||||
if ioerror<>0 then
|
||||
begin
|
||||
Writeln('Rewrite(',ParamStr(1),') failed, IOResult=',ioerror);
|
||||
Halt(2);
|
||||
end;
|
||||
|
||||
for i := 2 to ParamCount do
|
||||
begin
|
||||
path := IncludeTrailingPathDelimiter(ParamStr(i));
|
||||
if FindFirst(path + 't*.pp', 0, sr) = 0 then
|
||||
begin
|
||||
repeat
|
||||
sl.Add(path + sr.Name);
|
||||
until FindNext(sr) <> 0;
|
||||
FindClose(sr);
|
||||
end;
|
||||
end;
|
||||
end;
|
||||
|
||||
sl.Sort;
|
||||
for i := 0 to sl.Count - 1 do
|
||||
Writeln(sl[i]);
|
||||
begin
|
||||
Writeln(outfile,sl[i]);
|
||||
ioerror:=IOResult;
|
||||
if ioerror<>0 then
|
||||
begin
|
||||
Writeln('write to file ',ParamStr(1),' failed, IOResult=',ioerror);
|
||||
Halt(3);
|
||||
end;
|
||||
end;
|
||||
|
||||
close(outfile);
|
||||
ioerror:=IOResult;
|
||||
if ioerror<>0 then
|
||||
begin
|
||||
Writeln('Close(',ParamStr(1),') failed, IOResult=',ioerror);
|
||||
Halt(4);
|
||||
end;
|
||||
sl.Free;
|
||||
end.
|
||||
|
Loading…
Reference in New Issue
Block a user