don't use python process pool for regression tests. add -s flag to always build the latest version (for slow machines)

This commit is contained in:
Arvid Norberg 2013-09-22 13:47:33 +00:00
parent 04825115b4
commit 5586df1a03
2 changed files with 24 additions and 16 deletions

View File

@ -76,6 +76,7 @@ options:
-j<n> use n parallel processes for running tests
-i build incrementally (i.e. don't clean between checkouts)
-valgrind run tests with valgrind (requires valgrind to be installed)
-s skip. always run tests on the latest version
'''
@ -85,17 +86,24 @@ def loop():
print_usage()
sys.exit(1)
rev_file = os.path.join(os.getcwd(), '.rev')
print 'restoring last state from "%s"' % rev_file
skip = '-s' in sys.argv
try:
last_rev = int(open(rev_file, 'r').read())
except:
if skip:
sys.argv.remove('-s')
last_rev = run_tests.svn_info()[0] - 1
open(rev_file, 'w+').write('%d' % last_rev)
else:
rev_file = os.path.join(os.getcwd(), '.rev')
print 'restoring last state from "%s"' % rev_file
try:
last_rev = int(open(rev_file, 'r').read())
except:
last_rev = run_tests.svn_info()[0] - 1
open(rev_file, 'w+').write('%d' % last_rev)
while True:
revs = svn_fetch(last_rev)
if skip and len(revs): revs = revs[-1:]
for r in revs:
print '\n\nREVISION %d ===\n' % r

View File

@ -241,7 +241,7 @@ def main(argv):
timestamp = datetime.now()
tester_pool = Pool(processes=num_processes)
# tester_pool = Pool(processes=num_processes)
print '%s-%d - %s - %s' % (branch_name, revision, author, timestamp)
@ -283,18 +283,18 @@ def main(argv):
if not toolset in results: results[toolset] = {}
toolset_found = False
futures = []
for features in configs:
futures.append(tester_pool.apply_async(run_tests, [toolset, tests, features, options, test_dir, time_limit, incremental]))
for future in futures:
(compiler, r) = future.get()
results[toolset].update(r)
# futures = []
# for features in configs:
# (compiler, r) = run_tests(toolset, tests, features, options, test_dir, time_limit, incremental)
# futures.append(tester_pool.apply_async(run_tests, [toolset, tests, features, options, test_dir, time_limit, incremental]))
# for future in futures:
# (compiler, r) = future.get()
# results[toolset].update(r)
for features in configs:
(compiler, r) = run_tests(toolset, tests, features, options, test_dir, time_limit, incremental)
results[toolset].update(r)
print ''
if len(clean_files) > 0: