From 5586df1a03e3f1e8de8c5f3828eae579a0bea349 Mon Sep 17 00:00:00 2001 From: Arvid Norberg Date: Sun, 22 Sep 2013 13:47:33 +0000 Subject: [PATCH] don't use python process pool for regression tests. add -s flag to always build the latest version (for slow machines) --- tools/run_regression_tests.py | 20 ++++++++++++++------ tools/run_tests.py | 20 ++++++++++---------- 2 files changed, 24 insertions(+), 16 deletions(-) diff --git a/tools/run_regression_tests.py b/tools/run_regression_tests.py index 4adc864b6..12dce0715 100644 --- a/tools/run_regression_tests.py +++ b/tools/run_regression_tests.py @@ -76,6 +76,7 @@ options: -j 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 diff --git a/tools/run_tests.py b/tools/run_tests.py index 968bc62c4..01cd98eb1 100755 --- a/tools/run_tests.py +++ b/tools/run_tests.py @@ -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: