Chromium Code Reviews| 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) |
| # 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, |