Browse Source

* don't fail if multiple dotests try to create the same directory in parallel

git-svn-id: trunk@30220 -
Jonas Maebe 10 years ago
parent
commit
f4a580d669
1 changed files with 7 additions and 2 deletions
  1. 7 2
      tests/utils/dotest.pp

+ 7 - 2
tests/utils/dotest.pp

@@ -380,8 +380,13 @@ begin
       Err := IOResult;
       Err := IOResult;
       if Err <> 0 then
       if Err <> 0 then
        begin
        begin
-        Str (Err, SErr);
-        Verbose (V_Error, 'Directory creation failed ' + SErr);
+        { did another parallel instance create it in the mean time? }
+        if not PathExists(hs) then
+          begin
+            { no -> error }
+            Str (Err, SErr);
+            Verbose (V_Error, 'Directory creation of "'+HS+'" failed ' + SErr);
+          end;
        end;
        end;
     end;
     end;
 end;
 end;