From: Zdeněk Šustr Date: Fri, 14 Nov 2008 13:53:18 +0000 (+0000) Subject: Routnine purging of jobs created during testing X-Git-Tag: test_tag~84 X-Git-Url: http://scientific.zcu.cz/git/?a=commitdiff_plain;h=eaa90237d0225c43bbe8409a5a478d0220a0a03c;p=jra1mw.git Routnine purging of jobs created during testing --- diff --git a/org.glite.testsuites.ctb/LB/tests/lb-common.sh b/org.glite.testsuites.ctb/LB/tests/lb-common.sh index 0181f8c..bbc3663 100755 --- a/org.glite.testsuites.ctb/LB/tests/lb-common.sh +++ b/org.glite.testsuites.ctb/LB/tests/lb-common.sh @@ -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 $@ } diff --git a/org.glite.testsuites.ctb/LB/tests/lb-test-event-delivery.sh b/org.glite.testsuites.ctb/LB/tests/lb-test-event-delivery.sh index 836d1ef..fee7120 100755 --- a/org.glite.testsuites.ctb/LB/tests/lb-test-event-delivery.sh +++ b/org.glite.testsuites.ctb/LB/tests/lb-test-event-delivery.sh @@ -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 diff --git a/org.glite.testsuites.ctb/LB/tests/lb-test-job-registration.sh b/org.glite.testsuites.ctb/LB/tests/lb-test-job-registration.sh index ef645d5..fd916a1 100755 --- a/org.glite.testsuites.ctb/LB/tests/lb-test-job-registration.sh +++ b/org.glite.testsuites.ctb/LB/tests/lb-test-job-registration.sh @@ -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