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

Side by Side Diff: native_client_sdk/src/build_tools/buildbot_common.py

Issue 566963002: Add gyp_vars to fake context in sdk build script. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 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 unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 # Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 # Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 # Use of this source code is governed by a BSD-style license that can be 2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file. 3 # found in the LICENSE file.
4 4
5 """Common utilities for all buildbot scripts that specifically don't rely 5 """Common utilities for all buildbot scripts that specifically don't rely
6 on having a full chromium checkout. 6 on having a full chromium checkout.
7 """ 7 """
8 8
9 import os 9 import os
10 import subprocess 10 import subprocess
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
73 def __getitem__(self, key): 73 def __getitem__(self, key):
74 return self.env[key] 74 return self.env[key]
75 75
76 def SetEnv(self, key, value): 76 def SetEnv(self, key, value):
77 self.env[key] = value 77 self.env[key] = value
78 78
79 def __setitem__(self, key, value): 79 def __setitem__(self, key, value):
80 self.env[key] = value 80 self.env[key] = value
81 81
82 context = FakeContext() 82 context = FakeContext()
83 context['gyp_vars'] = []
83 buildbot_standard.SetupWindowsEnvironment(context) 84 buildbot_standard.SetupWindowsEnvironment(context)
84 85
85 # buildbot_standard.SetupWindowsEnvironment adds the directory which contains 86 # buildbot_standard.SetupWindowsEnvironment adds the directory which contains
86 # vcvarsall.bat to the path, but not the directory which contains cl.exe, 87 # vcvarsall.bat to the path, but not the directory which contains cl.exe,
87 # link.exe, etc. 88 # link.exe, etc.
88 # Running vcvarsall.bat adds the correct directories to the path, which we 89 # Running vcvarsall.bat adds the correct directories to the path, which we
89 # extract below. 90 # extract below.
90 process = subprocess.Popen('vcvarsall.bat x86 > NUL && set', 91 process = subprocess.Popen('vcvarsall.bat x86 > NUL && set',
91 stdout=subprocess.PIPE, env=context.env, shell=True) 92 stdout=subprocess.PIPE, env=context.env, shell=True)
92 stdout, _ = process.communicate() 93 stdout, _ = process.communicate()
(...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after
200 # Without shell=True the windows implementation of subprocess.call will not 201 # Without shell=True the windows implementation of subprocess.call will not
201 # search the PATH for the executable: http://bugs.python.org/issue8557 202 # search the PATH for the executable: http://bugs.python.org/issue8557
202 shell = getos.GetPlatform() == 'win' 203 shell = getos.GetPlatform() == 'win'
203 204
204 cmd = [GetGsutil(), 'cp', '-a', 'public-read', filename, full_dst] 205 cmd = [GetGsutil(), 'cp', '-a', 'public-read', filename, full_dst]
205 Run(cmd, shell=shell, cwd=cwd) 206 Run(cmd, shell=shell, cwd=cwd)
206 url = 'https://storage.googleapis.com/%s/%s' % (bucket_path, filename) 207 url = 'https://storage.googleapis.com/%s/%s' % (bucket_path, filename)
207 if step_link: 208 if step_link:
208 sys.stdout.flush() 209 sys.stdout.flush()
209 sys.stderr.write('@@@STEP_LINK@download@%s@@@\n' % url) 210 sys.stderr.write('@@@STEP_LINK@download@%s@@@\n' % url)
OLDNEW
« 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