Changeset - 1547306bcde1
[Not reviewed]
0 1 0
Jan Kaluza - 10 years ago 2015-12-21 18:29:51
jkaluza@redhat.com
debug prosody log
1 file changed with 1 insertions and 0 deletions:
0 comments (0 inline, 0 general)
spectrum/src/tests/start.py
Show inline comments
 
@@ -110,48 +110,49 @@ class LibcommuniServerModeConf(BaseTest):
 
		os.system("ngircd -f ngircd.conf &")
 

	
 
	def post_test(self):
 
		os.system("killall ngircd 2>/dev/null")
 
		os.system("killall spectrum2_libcommuni_backend 2>/dev/null")
 

	
 
class JabberServerModeConf(BaseTest):
 
	def __init__(self):
 
		BaseTest.__init__(self, "jabber_test.cfg", True, "room%conference.localhost@localhostxmpp")
 
		self.client_jid = "client%localhost@localhostxmpp"
 
		self.responder_jid = "responder%localhost@localhostxmpp"
 

	
 
	def skip_test(self, test):
 
		if test in ["muc_whois.py", "muc_change_topic.py"]:
 
			return True
 
		return False
 

	
 
	def pre_test(self):
 
		os.system("prosody --config prosody.cfg.lua >prosody.log &")
 
		time.sleep(3)
 
		os.system("../../../spectrum_manager/src/spectrum2_manager -c manager.conf localhostxmpp register client%localhost@localhostxmpp client@localhost password 2>/dev/null >/dev/null")
 
		os.system("../../../spectrum_manager/src/spectrum2_manager -c manager.conf localhostxmpp register responder%localhost@localhostxmpp responder@localhost password 2>/dev/null >/dev/null")
 

	
 
	def post_test(self):
 
		os.system("cat prosody.log")
 
		os.system("killall lua-5.1 2>/dev/null")
 
		os.system("killall spectrum2_libpurple_backend 2>/dev/null")
 

	
 
configurations = []
 
#configurations.append(LibcommuniServerModeSingleServerConf())
 
#configurations.append(LibcommuniServerModeConf())
 
configurations.append(JabberServerModeConf())
 

	
 
exitcode = 0
 

	
 
for conf in configurations:
 
	for f in os.listdir("."):
 
		if not f.endswith(".py") or f == "start.py":
 
			continue
 

	
 
		if len(sys.argv) == 2 and sys.argv[1] != f:
 
			continue
 

	
 
		print conf.__class__.__name__ + ": Starting " + f + " test ..."
 
		test = imp.load_source('test', './' + f)
 
		if conf.skip_test(f):
 
			print "Skipped."
 
			continue
 
		#try:
0 comments (0 inline, 0 general)