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

Unified Diff: win_toolchain/get_toolchain_if_necessary.py

Issue 146583012: win_toolchain: add timeout before nuke, hide taskkill output (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/tools/depot_tools
Patch Set: Created 6 years, 10 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 | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: win_toolchain/get_toolchain_if_necessary.py
diff --git a/win_toolchain/get_toolchain_if_necessary.py b/win_toolchain/get_toolchain_if_necessary.py
index 446a801634d19379751f9f781819fc468b778bd3..5e55f620d024dbde2a3057b867eb725027e5cd2c 100755
--- a/win_toolchain/get_toolchain_if_necessary.py
+++ b/win_toolchain/get_toolchain_if_necessary.py
@@ -32,6 +32,7 @@ import json
import os
import subprocess
import sys
+import time
BASEDIR = os.path.dirname(os.path.abspath(__file__))
@@ -158,8 +159,21 @@ def main():
HaveSrcInternalAccess())
print('Windows toolchain out of date or doesn\'t exist, updating (%s)...' %
('Pro' if should_get_pro else 'Express'))
+ print ' current_hash', current_hash
+ print ' desired_hashes', desired_hashes
M-A Ruel 2014/02/13 02:46:46 print(' desired hashes: %s' % desired_hashes) I
scottmg 2014/02/13 17:54:47 Done.
+ # A small grace period before deleting the old directory and causing a new
+ # toolchain to be pulled.
+ if os.path.isdir(target_dir):
M-A Ruel 2014/02/13 02:46:46 if bool(int(os.environ.get('CHROME_HEADLESS', '0')
scottmg 2014/02/13 17:54:47 Done.
+ for i in range(9, 0, -1):
+ sys.stdout.write(
+ '\rRemoving old toolchain in %ds... (Ctrl-C to cancel)' % i)
+ sys.stdout.flush()
+ time.sleep(1)
+ print
# This stays resident and will make the rmdir below fail.
- subprocess.call(['taskkill', '/f', '/im', 'mspdbsrv.exe'])
+ with open(os.devnull, 'w') as nul:
M-A Ruel 2014/02/13 02:46:46 'wb' You don't want non-binary on Windows...
scottmg 2014/02/13 17:54:47 Done.
+ subprocess.call(['taskkill', '/f', '/im', 'mspdbsrv.exe'],
+ stdin=nul, stdout=nul, stderr=nul)
if os.path.isdir(target_dir):
subprocess.check_call('rmdir /s/q "%s"' % target_dir, shell=True)
args = [sys.executable,
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698