Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(26)

Unified Diff: presubmit_support.py

Issue 2296723006: Shutdown multiprocess pool after running tests to avoid _finalizer spew on Windows (Closed)
Patch Set: mock something something Created 4 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | tests/presubmit_unittest.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: presubmit_support.py
diff --git a/presubmit_support.py b/presubmit_support.py
index 5851178f11cc619791e7ab8c6f0d48e8495ce4cc..342388e64ae5d34e4983b70127a4ae17270047c1 100755
--- a/presubmit_support.py
+++ b/presubmit_support.py
@@ -563,6 +563,11 @@ class InputApi(object):
msgs.extend(map(CallCommand, tests))
return [m for m in msgs if m]
+ def ShutdownPool(self):
+ self._run_tests_pool.close()
+ self._run_tests_pool.join()
+ self._run_tests_pool = None
+
class _DiffCache(object):
"""Caches diffs retrieved from a particular SCM."""
@@ -1448,6 +1453,8 @@ class PresubmitExecuter(object):
else:
result = () # no error since the script doesn't care about current event.
+ input_api.ShutdownPool()
+
# Return the process to the original working directory.
os.chdir(main_path)
return result
« no previous file with comments | « no previous file | tests/presubmit_unittest.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698