prepup.pp 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  1. {
  2. This file is part of the Free Pascal test suite.
  3. Copyright (c) 2006 by the Free Pascal development team.
  4. This program collects the results of a testsuite run
  5. and prepares things for an upload of the results to the
  6. database
  7. See the file COPYING.FPC, included in this distribution,
  8. for details about the copyright.
  9. This program is distributed in the hope that it will be useful,
  10. but WITHOUT ANY WARRANTY; without even the implied warranty of
  11. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
  12. **********************************************************************}
  13. program prepup;
  14. uses
  15. sysutils;
  16. procedure dosearch(const dir : string);
  17. procedure domask(const s : string);
  18. Var Info : TSearchRec;
  19. begin
  20. If FindFirst (dir+DirectorySeparator+s,faAnyFile,Info)=0 then
  21. begin
  22. Repeat
  23. With Info do
  24. writeln (dir+DirectorySeparator+Name);
  25. Until FindNext(info)<>0;
  26. end;
  27. FindClose(Info);
  28. end;
  29. Var Info : TSearchRec;
  30. Begin
  31. If FindFirst (dir+DirectorySeparator+'*',faDirectory,Info)=0 then
  32. begin
  33. Repeat
  34. With Info do
  35. begin
  36. If ((Attr and faDirectory) = faDirectory) and (name<>'.') and (name<>'..') then
  37. dosearch(dir+DirectorySeparator+name);
  38. end;
  39. Until FindNext(info)<>0;
  40. end;
  41. FindClose(Info);
  42. domask('*.elg');
  43. domask('*.log');
  44. End;
  45. begin
  46. dosearch('.');
  47. end.