ソースを参照

+ NEEDEDAFTER to avoid deleting created files if needed for another test

git-svn-id: trunk@14405 -
pierre 15 年 前
コミット
a440104065

+ 1 - 0
tests/test/targ1a.pp

@@ -1,3 +1,4 @@
+{ %NEEDEDAFTER }
 program go32v2_crash;
 
 const

+ 1 - 0
tests/test/units/sysutils/texec1.pp

@@ -1,4 +1,5 @@
 { %result=1 }
+{ %NEEDEDAFTER }
 { this test fails when it isn't called by execansi }
   uses
     sysutils;

+ 3 - 2
tests/utils/dotest.pp

@@ -819,7 +819,8 @@ begin
         execcmd:=execcmd+s;
       end;
       execcmd:=execcmd+' '+TestRemoteExe+' ; echo "TestExitCode: $?"';
-      if deAfter in DelExecutable then
+      if (deAfter in DelExecutable) and
+         not Config.NeededAfter then
         execcmd:=execcmd+' ; rm -f '+TestRemoteExe;
       execcmd:=execcmd+rquote;
       execres:=ExecuteRemote(rshprog,execcmd);
@@ -899,7 +900,7 @@ done:
      RunExecutable:=true;
    end;
 
-  if deAfter in DelExecutable then
+  if (deAfter in DelExecutable) and not Config.NeededAfter then
     begin
       Verbose(V_Debug,'Deleting executable '+TestExe);
       RemoveFile(TestExe);

+ 4 - 0
tests/utils/testu.pp

@@ -28,6 +28,7 @@ type
     KnownCompileError : longint;
     NeedRecompile : boolean;
     NeedLibrary   : boolean;
+    NeededAfter   : boolean;
     IsInteractive : boolean;
     IsKnownRunError,
     IsKnownCompileError : boolean;
@@ -212,6 +213,9 @@ begin
               else
                if GetEntry('NEEDLIBRARY') then
                 r.NeedLibrary:=true
+              else
+               if GetEntry('NEEDEDAFTER') then
+                r.NeededAfter:=true
               else
                if GetEntry('KNOWNRUNERROR') then
                 begin