./runall.py: execute parse_results from time to time

This commit is contained in:
Denis Bilenko
2008-11-24 12:57:52 +06:00
parent 242ab72916
commit 281340d2af

View File

@@ -6,17 +6,19 @@ import random
from glob import glob from glob import glob
from optparse import OptionParser, Option from optparse import OptionParser, Option
from copy import copy from copy import copy
from time import time
from with_eventlet import import_reactor from with_eventlet import import_reactor
first_hubs = ['selecthub', 'poll', 'selects', 'twistedr'] first_hubs = ['selecthub', 'poll', 'selects', 'twistedr']
first_reactors = ['selectreactor', 'pollreactor', 'epollreactor'] first_reactors = ['selectreactor', 'pollreactor', 'epollreactor']
COMMAND = './record_results.py ./with_timeout.py ./with_eventlet.py %(setup)s %(test)s' COMMAND = './record_results.py ./with_timeout.py ./with_eventlet.py %(setup)s %(test)s'
PARSE_PERIOD = 10
# the following aren't in the default list unless --all option present # the following aren't in the default list unless --all option present
NOT_HUBS = set(['nginx']) NOT_HUBS = set(['nginx'])
NOT_REACTORS = set(['wxreactor', 'glib2reactor', 'gtk2reactor']) NOT_REACTORS = set(['wxreactor', 'glib2reactor', 'gtk2reactor'])
NOT_TESTS = set(['test_threading_green.py', 'httpc_test.py', 'httpd_test.py', 'wsgi_test.py']) NOT_TESTS = set(['test_threading_green.py', 'httpd_test.py', 'wsgi_test.py'])
def w(s): def w(s):
sys.stderr.write("%s\n" % (s, )) sys.stderr.write("%s\n" % (s, ))
@@ -129,11 +131,17 @@ def main():
else: else:
setups.append('--hub %s' % hub) setups.append('--hub %s' % hub)
last_time = time()
for setup in setups: for setup in setups:
w(setup) w(setup)
for test in options.tests: for test in options.tests:
w(test) w(test)
cmd(COMMAND % locals()) cmd(COMMAND % locals())
if time()-last_time>PARSE_PERIOD:
os.system('./parse_results.py')
last_time = PARSE_PERIOD
os.system('./parse_results.py')
if __name__=='__main__': if __name__=='__main__':
main() main()