Clean up after running the tests.
authorZdeněk Šustr <sustr4@cesnet.cz>
Fri, 14 Nov 2008 10:05:32 +0000 (10:05 +0000)
committerZdeněk Šustr <sustr4@cesnet.cz>
Fri, 14 Nov 2008 10:05:32 +0000 (10:05 +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 2a0f3fd..0181f8c 100755 (executable)
@@ -32,6 +32,8 @@ LBJOBSTATUS=glite-lb-job_status
 LBPURGE=glite-lb-purge
 LBCHANGEACL=glite-lb-change_acl
 LBMON=glite-lb-lbmon
+LBNOTIFY=glite-lb-notify
+LBPURGE=glite-lb-purge
 
 LB_LOGD=glite-lb-logd 
 LB_INTERLOGD=glite-lb-interlogd
index a1f16d0..836d1ef 100755 (executable)
@@ -12,7 +12,7 @@ Prerequisities:
    - environment variables set:
 
      GLITE_LB_SERVER_PORT - if nondefault port (9000) is used
-     GLITE_LB_IL_SOCK - if nondevailt socket at /tmp/interlogger.sock is used
+     GLITE_LB_IL_SOCK - if nondefault socket at /tmp/interlogger.sock is used
      GLITE_LB_LOGGER_PORT - if nondefault port (9002) is used  
 
 Tests called:
index 05d4829..ef645d5 100755 (executable)
@@ -104,17 +104,33 @@ else
                        print_error "Failed to register job"
                else
                        test_done
-               fi
 
-               jobstate=`${LBJOBSTATUS} ${jobid} | $SYS_GREP "state :" | ${SYS_AWK} '{print $3}'`
-               printf "Is the testing job ($jobid) in a correct state? $jobstate"
+                       # Check result
+                       jobstate=`${LBJOBSTATUS} ${jobid} | $SYS_GREP "state :" | ${SYS_AWK} '{print $3}'`
+                       printf "Is the testing job ($jobid) in a correct state? $jobstate"
+
+                       if [ "${jobstate}" = "Submitted" ]; then
+                               test_done
+                       else
+                               test_failed
+                               print_error "Job has not been submitted"
+                       fi
+
+                       #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}
+
 
-               if [ "${jobstate}" = "Submitted" ]; then
-                       test_done
-               else
-                       test_failed
-                       print_error "Job has not been submitted"
                fi
+
+               
+               
        fi
 fi