Example #1
0
 def subtest_done(self, subtest):
     self.nsubtests_running -= 1
     if subtest.rval == 0:
         self.rval -= 1
     if self.nsubtests_running == 0:
         if self.rval == 1:
             self.rval = 0
         ED2.breakLoop()
Example #2
0
 def results_received(results):
     global external_command
     external_command.shutdown()
     # Give threads time to finish
     sleep(0.05)
     if not results == test_data:
         print(test_data, results)
         exit(1)
     ED2.breakLoop()
Example #3
0
 def results_received(results):
     global external_command
     external_command.shutdown()
     # Give threads time to finish
     sleep(0.05)
     if not results == test_data:
         print(test_data, results)
         exit(1)
     ED2.breakLoop()
Example #4
0
 def pong_received(self, data, address, udp_server, rtime):
     if udp_server.uopts.family == socket.AF_INET:
         print('pong_received')
         if data != self.pong_data or address != self.ping_raddr:
             print(data, address, self.pong_data, self.ping_raddr)
             exit(1)
     else:
         print('pong_received6')
         if data != self.pong_data6 or address != self.ping_raddr6:
             print(data, address, self.pong_data6, self.ping_raddr6)
             exit(1)
     self.npongs -= 1
     if self.npongs == 0:
         ED2.breakLoop()
Example #5
0
 def pong_received(self, data, address, udp_server, rtime):
     if udp_server.uopts.family == socket.AF_INET:
         print('pong_received')
         if data != self.pong_data or address != self.ping_raddr:
             print(data, address, self.pong_data, self.ping_raddr)
             exit(1)
     else:
         print('pong_received6')
         if data != self.pong_data6 or address != self.ping_raddr6:
             print(data, address, self.pong_data6, self.ping_raddr6)
             exit(1)
     self.npongs -= 1
     if self.npongs == 0:
         ED2.breakLoop()
Example #6
0
 def executeStop(self):
     if not self.safe_stop:
         return
     self.global_config['_executeStop_count'] += 1
     acalls = [x for x in self.ccmap if x.state in (CCStateConnected, CCStateARComplete)]
     nactive = len(acalls)
     print('[%d]: executeStop is invoked, %d calls in map, %d active' % \
       (self.global_config['_my_pid'], len(self.ccmap), nactive))
     if self.global_config['_executeStop_count'] >= 5 and nactive > 0:
         print('executeStop: some sessions would not die, forcing exit:')
         for cc in acalls:
             print('\t' + str(cc))
         nactive = 0
     if nactive > 0:
         return
     self.er_timer.cancel()
     del self.er_timer
     sys.stdout.flush()
     sys.stderr.flush()
     ED2.breakLoop()
     return
Example #7
0
 def executeStop(self):
     if not self.safe_stop:
         return
     self.global_config['_executeStop_count'] += 1
     acalls = [
         x for x in self.ccmap
         if x.state in (CCStateConnected, CCStateARComplete)
     ]
     nactive = len(acalls)
     print('[%d]: executeStop is invoked, %d calls in map, %d active' % \
       (self.global_config['_my_pid'], len(self.ccmap), nactive))
     if self.global_config['_executeStop_count'] >= 5 and nactive > 0:
         print('executeStop: some sessions would not die, forcing exit:')
         for cc in acalls:
             print('\t' + str(cc))
         nactive = 0
     if nactive > 0:
         return
     self.er_timer.cancel()
     del self.er_timer
     sys.stdout.flush()
     sys.stderr.flush()
     ED2.breakLoop()
     return
Example #8
0
 def test2(arguments, testnum, mtm):
     arguments['delay'] = mtm.offsetFromNow()
     print(testnum, arguments['delay'])
     arguments['test'] = 'bar'
     ED2.breakLoop()
Example #9
0
 def test(arguments):
     arguments['test'] = not arguments['test']
     ED2.breakLoop()
Example #10
0
 def display(*args):
     print('got:', args)
     ED2.breakLoop()
Example #11
0
 def test1(arguments, testnum):
     print(testnum)
     arguments['test'] = True
     ED2.breakLoop()
Example #12
0
def terminate():
    ED2.breakLoop()
Example #13
0
 def display(res, ro, arg):
     print(res, arg)
     ro.rval = (res, arg)
     ED2.breakLoop()
Example #14
0
 def timeout(self):
     ED2.breakLoop()
Example #15
0
 def test2(arguments, testnum):
     print(testnum)
     arguments['test'] = 'bar'
     ED2.breakLoop()
Example #16
0
 def callback(clm, cmd):
     print('in:', cmd)
     clm.send('hello, there!\n')
     clm.close()
     ED2.breakLoop()
Example #17
0
 def display(res, ro, arg):
     print(res, arg)
     ro.rval = (res, arg)
     ED2.breakLoop()
Example #18
0
 def waitonline(rpc):
     if rpc.online:
         ED2.breakLoop()
Example #19
0
def terminate(signum):
    ED2.breakLoop()
Example #20
0
 def gotreply(self, *args):
     print(args)
     ED2.breakLoop()
Example #21
0
 def test2(arguments, testnum):
     print(testnum)
     arguments['test'] = 'bar'
     ED2.breakLoop()
Example #22
0
 def display(*args):
     print(args)
     ED2.breakLoop()
Example #23
0
 def callback(clm, cmd):
     print('in:', cmd)
     clm.send('hello, there!\n')
     clm.close()
     ED2.breakLoop()
Example #24
0
 def display(*args):
     print(args)
     ED2.breakLoop()
Example #25
0
 def test2(arguments, testnum, mtm):
     arguments['delay'] = mtm.offsetFromNow()
     print(testnum, arguments['delay'])
     arguments['test'] = 'bar'
     ED2.breakLoop()
Example #26
0
 def display(*args):
     print('got:', args)
     ED2.breakLoop()
Example #27
0
 def waitonline(rpc):
     if rpc.online:
         ED2.breakLoop()
Example #28
0
 def gotreply(self, *args):
     print(args)
     ED2.breakLoop()
Example #29
0
 def test1(arguments, testnum):
     print(testnum)
     arguments['test'] = True
     ED2.breakLoop()