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

Unified Diff: chrome/test/mini_installer/test_installer.py

Issue 24126005: Use CreateProcess instead of subprocess.Popen to launch Chrome in the mini_installer test framework. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Use taskkill. Created 7 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 | « chrome/test/mini_installer/launch_chrome.py ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/test/mini_installer/test_installer.py
diff --git a/chrome/test/mini_installer/test_installer.py b/chrome/test/mini_installer/test_installer.py
index e0614243b0ee51d3c5219d77e050f43e494f4bb3..866f6e7810a91a03d00e57067c6ca024b9262384 100644
--- a/chrome/test/mini_installer/test_installer.py
+++ b/chrome/test/mini_installer/test_installer.py
@@ -200,6 +200,13 @@ def RunTests(mini_installer_path, config):
for test in config.tests:
suite.addTest(InstallerTest(test, config, path_resolver))
result = unittest.TextTestRunner(verbosity=2).run(suite)
+
+ # We want to terminate all child processes that were spawned during the tests.
+ # One way to do this is to put them in a job object. However, Chrome also uses
+ # a job object and the ability to use nested jobs was only added in Windows 8.
+ # Work around this by using taskkill.
+ subprocess.call('taskkill /f /im chrome.exe', shell=True)
gab 2013/09/13 21:16:10 If the intention is to exit cleanly, would it make
+
return result.wasSuccessful()
« no previous file with comments | « chrome/test/mini_installer/launch_chrome.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698