Beispiel #1
0
 def _startProcess(self, command, env):
     """Start OpenOffice.org process"""
     for i in range(5):
         self.stop()
         waitStopDaemon(self, self.timeout)
         self.process = Popen(command, close_fds=True, env=env)
         if not waitStartDaemon(self, self.timeout):
             continue
         if self._testOpenOffice(self.hostname, self.port):
             return
Beispiel #2
0
 def stop(self):
   """Stop the process"""
   if hasattr(self, 'process') and self.status():
     process_pid = self.process.pid
     logger.debug("Stop Pid - %s" % process_pid)
     try:
       self.process.terminate()
       waitStopDaemon(self, self.timeout)
     finally:
       if pid_exists(process_pid) or self.status():
         Process(process_pid).kill()
     delattr(self, "process")
Beispiel #3
0
 def _startProcess(self, command, env):
   """Start OpenOffice.org process"""
   for i in range(5):
     self.stop()
     waitStopDaemon(self, self.timeout)
     self.process = Popen(command,
                          close_fds=True,
                          env=env)
     if not waitStartDaemon(self, self.timeout):
       continue
     if self._testOpenOffice(self.hostname, self.port):
       return
Beispiel #4
0
 def stop(self):
     """Stop the process"""
     if hasattr(self, 'process') and self.status():
         process_pid = self.process.pid
         logger.debug("Stop Pid - %s" % process_pid)
         try:
             self.process.terminate()
             waitStopDaemon(self, self.timeout)
         finally:
             if pid_exists(process_pid) or self.status():
                 Process(process_pid).kill()
         delattr(self, "process")
Beispiel #5
0
 def testOpenOfficeStop(self):
   """Test if the stop method works correctly"""
   self.openoffice.stop()
   waitStopDaemon(self.openoffice)
   self.assertEquals(self.openoffice.status(), False)
Beispiel #6
0
 def testOpenOfficeStop(self):
   """Test if the stop method works correctly"""
   self.openoffice.stop()
   waitStopDaemon(self.openoffice)
   self.assertEquals(self.openoffice.status(), False)