Example #1
0
 def on_exit(self, exitCode):
     # FIXME! handling!
     # should submit captured files (AVC_ERROR, OUTPUTFILE)
     if exitCode in (0, 128 + signal.SIGTERM):
         result = RC.PASS
         message = 'rhts-test-runner.sh exited with rc=%s' % exitCode
     else:
         result = RC.FAIL
         message = "rhts-test-runner.sh exited with rc=%s. Check task's stderr." % exitCode
     if exitCode != 0:
         evt = event.result_ex(result,
                               handle="rhts_task/exit",
                               message=message,
                               statistics={'score': exitCode})
         self.send_evt(evt)
     if result == RC.PASS and self.variables['nohup']:
         log.info("waiting for finish...")
     else:
         if not self.variables['has_result']:
             evt = event.result_ex(
                 RC.FAIL,
                 handle="rhts_task/no_result",
                 message="The rhts-task has reported no result.")
             self.send_evt(evt)
         log.info("quitting...")
         self.bye(exitCode)
     self.__done = True
Example #2
0
 def on_exit(self, exitCode):
     # FIXME! handling!
     # should submit captured files (AVC_ERROR, OUTPUTFILE)
     if exitCode in (0, 128+signal.SIGTERM):
         result = RC.PASS
         message = 'rhts-test-runner.sh exited with rc=%s' % exitCode
     else:
         result = RC.FAIL
         message = "rhts-test-runner.sh exited with rc=%s. Check task's stderr." % exitCode
     if exitCode != 0:
         evt = event.result_ex(
                 result,
                 handle="rhts_task/exit",
                 message=message,
                 statistics={'score':exitCode})
         self.send_evt(evt)
     if result == RC.PASS and self.variables['nohup']:
         log.info("waiting for finish...")
     else:
         if not self.variables['has_result']:
             evt = event.result_ex(
                     RC.FAIL,
                     handle="rhts_task/no_result",
                     message="The rhts-task has reported no result."
                     )
             self.send_evt(evt)
         log.info("quitting...")
         self.bye(exitCode)
     self.__done = True
Example #3
0
 def __init__(self, parent, rc, handle=None, message=None, statistics=None):
     BeahEventObject.__init__(self, parent)
     self.the_event(
         event.result_ex(rc,
                         handle=handle,
                         message=message,
                         statistics=statistics))
Example #4
0
 def xmlrpc_result(self, test_name, parent_string, result, result_value,
                   test_version, recipe_test_id):
     if not self.main.variables['has_result']:
         self.main.variables['has_result'] = True
     log.debug("XMLRPC: results.result(%r, %r, %r, %r, %r, %r)", test_name,
               parent_string, result, result_value, test_version,
               recipe_test_id)
     evt = event.result_ex(result_rhts_to_beah(result),
                           handle=test_name,
                           message='(%s)' % result,
                           statistics={'score': result_value},
                           test_version=test_version,
                           recipe_test_id=recipe_test_id)
     self.main.send_evt(evt)
     return evt.id()
Example #5
0
 def xmlrpc_result(self, test_name, parent_string, result, result_value,
         test_version, recipe_test_id):
     if not self.main.variables['has_result']:
         self.main.variables['has_result'] = True
     log.debug("XMLRPC: results.result(%r, %r, %r, %r, %r, %r)",
             test_name, parent_string, result, result_value, test_version,
             recipe_test_id)
     evt = event.result_ex(
             result_rhts_to_beah(result),
             handle=test_name,
             message='(%s)' % result,
             statistics={'score':result_value},
             test_version=test_version,
             recipe_test_id=recipe_test_id)
     self.main.send_evt(evt)
     return evt.id()
Example #6
0
 def __init__(self, parent, rc, handle=None, message=None, statistics=None):
     BeahEventObject.__init__(self, parent)
     self.the_event(event.result_ex(rc, handle=handle, message=message, statistics=statistics))