Beispiel #1
0
  def runParset( self, starttimeout = 30, runtime = 60, stoptimeout = 120, parsetstartdelay = 30 ):
    # finalise and check parset BEFORE we start doing anything fancy
    self.parset = buildParset( parset=self.parset, args="start=+%d,run=%d" % (parsetstartdelay,runtime,), partition=self.partition )
    self.parset.preWrite()
    self.parset.check()

    self.results["started"] = True

    class CorrelatorThread(Thread):
      def __init__(self,partition):
        Thread.__init__(self)
        self.partition = partition

      def run(self):
        runCorrelator( self.partition )

    info( "********** Starting test '%s' **********" % (self.testname,) )

    try:
      # start the correlator (ni a separate process to allow full control in runCorrelator
      info( "Starting correlator." )
      pid = os.fork()
      if pid == 0:
        # child process
        try:
          Locations.files["logdir"] = self.logdir
          info("Logdir = %s" % (self.logdir,))
          try:
            os.makedirs( self.logdir )
          except OSError,e:
            warning( "Error creating directory %s: %s" % (self.logdir,e) )

          runCorrelator( self.partition )
        except:
          error( "Correlator aborted." )
          os._exit(1)
        else:  
          info( "Correlator stopped." )
          os._exit(0)
Beispiel #2
0
 def run(self):
   runCorrelator( self.partition )