Routnine purging of jobs created during testing
authorZdeněk Šustr <sustr4@cesnet.cz>
Fri, 14 Nov 2008 13:53:18 +0000 (13:53 +0000)
committerZdeněk Šustr <sustr4@cesnet.cz>
Fri, 14 Nov 2008 13:53:18 +0000 (13:53 +0000)
org.glite.testsuites.ctb/LB/tests/lb-common.sh
org.glite.testsuites.ctb/LB/tests/lb-test-event-delivery.sh
org.glite.testsuites.ctb/LB/tests/lb-test-job-registration.sh

index 0181f8c..bbc3663 100755 (executable)
@@ -188,8 +188,22 @@ function check_socket_listener()
 
 #df /var/lib/mysql/ | tail -n 1 | awk '{ print $4 }'
 
+function try_purge()
+{
+                        #Purge test job
+                        joblist=$1
+                        echo $jobid > ${joblist}
+
+                        printf "Purging test job (Trying the best, result will not be tested)\n"
+
+                        ${LBPURGE} -j ${joblist}
+
+                        rm ${joblist}
+       
+}
+
 function test_args()
 {
-        echo $@
+        gcho $@
 }
 
index 836d1ef..fee7120 100755 (executable)
@@ -148,6 +148,12 @@ else
                        test_failed
                        print_error "Job is not in appropriate state"
                fi
+
+               #Purge test job
+               joblist=$$_jobs_to_purge.txt
+               echo $jobid > ${joblist}
+               try_purge ${joblist}
+
        fi
 fi
 
index ef645d5..fd916a1 100755 (executable)
@@ -119,13 +119,7 @@ else
                        #Purge test job
                        joblist=$$_jobs_to_purge.txt
                        echo $jobid > ${joblist}
-
-                       printf "Purging test job (Trying the best, result will not be tested)\n"
-
-                       ${LBPURGE} -j ${joblist}
-
-                       rm ${joblist}
-
+                       try_purge ${joblist}
 
                fi