Changeset - 568d2e62b7e7
[Not reviewed]
0 1 0
Jan Kaluza - 14 years ago 2011-06-09 08:30:41
hanzz.k@gmail.com
Allow all tests
1 file changed with 4 insertions and 4 deletions:
0 comments (0 inline, 0 general)
tests/runtests.py
Show inline comments
 
@@ -20,43 +20,43 @@ def run_spectrum(backend, test):
 
	database = test.sql\n\
 
	prefix=icq\n\
 
	" % (backend, backend)
 
	)
 
	f.close()
 
	p = Popen("../spectrum/src/spectrum sample.cfg > " + backend + "_" + test + ".log 2>&1", shell=True)
 
	time.sleep(3)
 
	time.sleep(4)
 
	return p
 

	
 
def one_test_run():
 
	os.system("killall spectrum 2> /dev/null")
 
	os.system("rm *.log")
 

	
 
	for backend in os.listdir("../backends"):
 
		if not os.path.isdir("../backends/" + backend) or backend == "CMakeFiles" or backend.startswith("libirc"):
 
		if not os.path.isdir("../backends/" + backend) or backend == "CMakeFiles":
 
			continue
 

	
 
		for d in os.listdir("."):
 
			binary = d + "/" + d + "_test"
 
			if not os.path.exists(binary) or d.find("bad") != -1:
 
			if not os.path.exists(binary):
 
				continue
 

	
 
			p = run_spectrum(backend, d)
 

	
 
			if backend.find("purple") >= 0:
 
				p = Popen(binary + " pyjim%jabber.cz@localhost test", shell=True)
 
				
 
			else:
 
				p = Popen(binary + " testnickname%irc.freenode.net@localhost test", shell=True)
 

	
 
			seconds = 0
 
			while p.poll() is None and seconds < 20:
 
				time.sleep(1)
 
				seconds += 1
 

	
 
			if p.returncode == 0 and seconds < 20:
 
				print "[ PASS ]", backend, binary
 
				
 
			else:
 
				if seconds == 20:
 
					print "[ TIME ]", backend, binary
 
				else:
 
					print "[ FAIL ]", backend, binary
 

	
0 comments (0 inline, 0 general)