fix testbot misc
This commit is contained in:
parent
22c80eaf54
commit
9aa08adef8
14
test/testbot
14
test/testbot
@ -3,6 +3,7 @@
|
|||||||
import argparse
|
import argparse
|
||||||
import slixmpp
|
import slixmpp
|
||||||
import configparser
|
import configparser
|
||||||
|
import time
|
||||||
|
|
||||||
CONFIG_PATH = "./testconfig.ini"
|
CONFIG_PATH = "./testconfig.ini"
|
||||||
|
|
||||||
@ -31,14 +32,21 @@ def allmsgsrecv():
|
|||||||
for i in results2:
|
for i in results2:
|
||||||
if i[2] == 0:
|
if i[2] == 0:
|
||||||
return False
|
return False
|
||||||
|
return ret
|
||||||
|
|
||||||
# Print results and exit
|
# Print results and exit
|
||||||
def printandexit():
|
def printandexit():
|
||||||
print("Results of test:")
|
print("Results of test:")
|
||||||
for i in results1:
|
for i in results1:
|
||||||
print(i[0].rstrip + " : " + str(round(i[2]-i[1],2)) + " secounds")
|
if i[2] == 0:
|
||||||
|
print(i[0] + " : Not recieved)
|
||||||
|
else:
|
||||||
|
print(i[0].rstrip() + " : " + str(round(i[2]-i[1],2)) + " secounds")
|
||||||
for i in results2:
|
for i in results2:
|
||||||
print(i[0].rstrip + " : " + str(round(i[2]-i[1],2)) + " secounds")
|
if i[2] == 0:
|
||||||
|
print(i[0] + " : Not recieved)
|
||||||
|
else:
|
||||||
|
print(i[0].rstrip() + " : " + str(round(i[2]-i[1],2)) + " secounds")
|
||||||
exit()
|
exit()
|
||||||
|
|
||||||
def show_version():
|
def show_version():
|
||||||
@ -93,7 +101,7 @@ class MUCBot(slixmpp.ClientXMPP):
|
|||||||
if i[0] == body:
|
if i[0] == body:
|
||||||
i[2] = rtime
|
i[2] = rtime
|
||||||
|
|
||||||
if allmsgsrecv:
|
if allmsgsrecv() is True:
|
||||||
printandexit()
|
printandexit()
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user