Browse Source

* Add waiting time in case of access error on windows OS

git-svn-id: trunk@32952 -
pierre 9 years ago
parent
commit
8c5adb86cd
1 changed files with 11 additions and 0 deletions
  1. 11 0
      tests/utils/dotest.pp

+ 11 - 0
tests/utils/dotest.pp

@@ -563,6 +563,17 @@ begin
   assign(t,'out.'+UniqueSuffix);
   assign(t,'out.'+UniqueSuffix);
   {$I-}
   {$I-}
    reset(t);
    reset(t);
+  {$ifdef windows}
+    { try to cope with Windows problems related to AntiVirus scanner
+      that generate lag time during which access to a given if is forbidden }
+   if (inoutres=5) then
+     begin
+       Sleep(5000);
+       ioresult;
+       Verbose(V_Warning,'Windows file not accessible out.'+UniqueSuffix);
+       reset(t);
+     end;
+   {$endif windows}
    readln(t,hs);
    readln(t,hs);
    close(t);
    close(t);
    erase(t);
    erase(t);