예제 #1
0
 def test_reregister_named_process(self, quite=0):
     if not quite: self.progress_message("\ntest_reregister_named_process:")
     process.register_named_process('test', os.getpid())
     try:
         process.register_named_process('test', os.getpid())
     except process.EProcessRunning:
         return
     raise 'Did not detect self already running.'
예제 #2
0
 def test_reregister_named_process(self, quite=0):
     if not quite:
         self.progress_message("\ntest_reregister_named_process:")
     process.register_named_process("test", os.getpid())
     try:
         process.register_named_process("test", os.getpid())
     except process.EProcessRunning:
         return
     raise "Did not detect self already running."
예제 #3
0
 def test_status_from_name(self, quite=0):
     if not quite: self.progress_message("\ntest_status_from_name:")
     process.register_named_process('test', os.getpid())
     status = process.status_from_name('test')
     if status.name != 'test':
         raise 'Did not set the name correctly.'
     if status.pid != os.getpid():
         raise 'Self does not have my process id.'
     if status.state != process.StatusEnum.EXISTS:
         raise 'Self does not EXIST, using status_from_name.'
     return
예제 #4
0
 def test_status_from_name(self, quite=0):
     if not quite:
         self.progress_message("\ntest_status_from_name:")
     process.register_named_process("test", os.getpid())
     status = process.status_from_name("test")
     if status.name != "test":
         raise "Did not set the name correctly."
     if status.pid != os.getpid():
         raise "Self does not have my process id."
     if status.state != process.StatusEnum.EXISTS:
         raise "Self does not EXIST, using status_from_name."
     return
예제 #5
0
 def test_terminate_named_process(self, quite=0):
     if not quite: self.progress_message("\ntest_terminate_named_process:")
     child = popen2.Popen4('bash -c "while true; do sleep 1; done"')
     process.register_named_process('child', child.pid)
     status = process.status_from_name('child')
     if status.name != 'child':
         raise 'Did not set the name correctly.'
     if status.pid != child.pid:
         raise 'Child does not have the correct pid.'
     if status.state != process.StatusEnum.EXISTS:
         raise 'Child does not EXIST.'
     exit_status = process.terminate_named_process('child')
     return
예제 #6
0
 def test_terminate_named_process(self, quite=0):
     if not quite:
         self.progress_message("\ntest_terminate_named_process:")
     child = popen2.Popen4('bash -c "while true; do sleep 1; done"')
     process.register_named_process("child", child.pid)
     status = process.status_from_name("child")
     if status.name != "child":
         raise "Did not set the name correctly."
     if status.pid != child.pid:
         raise "Child does not have the correct pid."
     if status.state != process.StatusEnum.EXISTS:
         raise "Child does not EXIST."
     exit_status = process.terminate_named_process("child")
     return
예제 #7
0
 def test_register_named_process(self, quite=0):
     if not quite: self.progress_message("\ntest_register_named_process:")
     process.register_named_process('test', os.getpid())
     return
예제 #8
0
 def test_register_named_process(self, quite=0):
     if not quite:
         self.progress_message("\ntest_register_named_process:")
     process.register_named_process("test", os.getpid())
     return