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

Unified Diff: build/gyp_chromium

Issue 183923014: Add free space print to see how near edge bots are (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
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: build/gyp_chromium
diff --git a/build/gyp_chromium b/build/gyp_chromium
index 97179c1b150b508da82d7c7e2a949b73ace15123..a6300a3073f410fe834cba657d0f94ab6712dec7 100755
--- a/build/gyp_chromium
+++ b/build/gyp_chromium
@@ -7,6 +7,7 @@
# This script is wrapper for Chromium that adds some support for how GYP
# is invoked by Chromium beyond what can be done in the gclient hooks.
+import ctypes
import glob
import gyp_helper
import json
@@ -393,6 +394,14 @@ def CopyVsRuntimeDlls(output_dir, runtime_dirs):
copy_runtime(out_release_nacl64, x64, 'msvc%s120.dll')
+def GetFreeSpaceMBWindows(path):
+ """Returns the number of mebibytes free for a given directory."""
+ free_bytes = ctypes.c_ulonglong(0)
+ ctypes.windll.kernel32.GetDiskFreeSpaceExW(
+ ctypes.c_wchar_p(path), None, None, ctypes.pointer(free_bytes))
+ return free_bytes.value / 1024 / 1024
+
+
if __name__ == '__main__':
args = sys.argv[1:]
@@ -516,8 +525,12 @@ if __name__ == '__main__':
# Include the VS runtime in the PATH in case it's not machine-installed.
runtime_path = ';'.join(vs2013_runtime_dll_dirs)
os.environ['PATH'] = runtime_path + ';' + os.environ['PATH']
- print('Using automatic toolchain in %s (%s edition).' % (
- toolchain, 'Pro' if version_is_pro else 'Express'))
+ # TODO(scottmg): Temporarily add free space print to try to see how close
+ # we're getting to failures on windows bots. http://crbug.com/348350
+ print('Using automatic toolchain in %s (%s edition), free space: %dM.' % (
+ toolchain,
+ 'Pro' if version_is_pro else 'Express',
+ GetFreeSpaceMBWindows(GetOutputDirectory())))
# If CHROMIUM_GYP_SYNTAX_CHECK is set to 1, it will invoke gyp with --check
# to enfore syntax checking.
« 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