Skip to content

Commit f0fba0b

Browse files
committed
deps: update gyp to 25ed9ac
This is a port of a525c72 . Original commit message: Gyp update to be able to generate VS2015 projects. PR-URL: nodejs/node-v0.x-archive#25857 Reviewed-By: Alexis Campailla <alexis@janeasystems.com> PR-URL: #2843 Reviewed-By: rvagg - Rod Vagg <rod@vagg.org> Reviewed-By: orangemocha - Alexis Campailla <orangemocha@nodejs.org> Reviewed-By: bnoordhuis - Ben Noordhuis <info@bnoordhuis.nl>
1 parent 44d7054 commit f0fba0b

40 files changed

+3480
-2593
lines changed

tools/gyp/PRESUBMIT.py

+22-4
Original file line numberDiff line numberDiff line change
@@ -16,15 +16,17 @@
1616
'test/lib/TestCmd.py',
1717
'test/lib/TestCommon.py',
1818
'test/lib/TestGyp.py',
19-
# Needs style fix.
20-
'pylib/gyp/generator/xcode.py',
2119
]
2220

2321

2422
PYLINT_DISABLED_WARNINGS = [
2523
# TODO: fix me.
2624
# Many tests include modules they don't use.
2725
'W0611',
26+
# Possible unbalanced tuple unpacking with sequence.
27+
'W0632',
28+
# Attempting to unpack a non-sequence.
29+
'W0633',
2830
# Include order doesn't properly include local files?
2931
'F0401',
3032
# Some use of built-in names.
@@ -40,6 +42,10 @@
4042
'W0613',
4143
# String has no effect (docstring in wrong place).
4244
'W0105',
45+
# map/filter on lambda could be replaced by comprehension.
46+
'W0110',
47+
# Use of eval.
48+
'W0123',
4349
# Comma not followed by space.
4450
'C0324',
4551
# Access to a protected member.
@@ -56,6 +62,8 @@
5662
'E1101',
5763
# Dangerous default {}.
5864
'W0102',
65+
# Cyclic import.
66+
'R0401',
5967
# Others, too many to sort.
6068
'W0201', 'W0232', 'E1103', 'W0621', 'W0108', 'W0223', 'W0231',
6169
'R0201', 'E0101', 'C0321',
@@ -116,5 +124,15 @@ def CheckChangeOnCommit(input_api, output_api):
116124
return report
117125

118126

119-
def GetPreferredTrySlaves():
120-
return ['gyp-win32', 'gyp-win64', 'gyp-linux', 'gyp-mac', 'gyp-android']
127+
TRYBOTS = [
128+
'gyp-win32',
129+
'gyp-win64',
130+
'gyp-linux',
131+
'gyp-mac',
132+
]
133+
134+
135+
def GetPreferredTryMasters(_, change):
136+
return {
137+
'tryserver.nacl': { t: set(['defaulttests']) for t in TRYBOTS },
138+
}

tools/gyp/buildbot/buildbot_run.py

+14-68
Original file line numberDiff line numberDiff line change
@@ -3,34 +3,26 @@
33
# Use of this source code is governed by a BSD-style license that can be
44
# found in the LICENSE file.
55

6-
76
"""Argument-less script to select what to run on the buildbots."""
87

9-
108
import os
119
import shutil
1210
import subprocess
1311
import sys
1412

1513

16-
if sys.platform in ['win32', 'cygwin']:
17-
EXE_SUFFIX = '.exe'
18-
else:
19-
EXE_SUFFIX = ''
20-
21-
2214
BUILDBOT_DIR = os.path.dirname(os.path.abspath(__file__))
2315
TRUNK_DIR = os.path.dirname(BUILDBOT_DIR)
2416
ROOT_DIR = os.path.dirname(TRUNK_DIR)
25-
ANDROID_DIR = os.path.join(ROOT_DIR, 'android')
2617
CMAKE_DIR = os.path.join(ROOT_DIR, 'cmake')
2718
CMAKE_BIN_DIR = os.path.join(CMAKE_DIR, 'bin')
2819
OUT_DIR = os.path.join(TRUNK_DIR, 'out')
2920

3021

3122
def CallSubProcess(*args, **kwargs):
3223
"""Wrapper around subprocess.call which treats errors as build exceptions."""
33-
retcode = subprocess.call(*args, **kwargs)
24+
with open(os.devnull) as devnull_fd:
25+
retcode = subprocess.call(stdin=devnull_fd, *args, **kwargs)
3426
if retcode != 0:
3527
print '@@@STEP_EXCEPTION@@@'
3628
sys.exit(1)
@@ -49,10 +41,6 @@ def PrepareCmake():
4941

5042
print '@@@BUILD_STEP Initialize CMake checkout@@@'
5143
os.mkdir(CMAKE_DIR)
52-
CallSubProcess(['git', 'config', '--global', 'user.name', 'trybot'])
53-
CallSubProcess(['git', 'config', '--global',
54-
'user.email', 'chrome-bot@google.com'])
55-
CallSubProcess(['git', 'config', '--global', 'color.ui', 'false'])
5644

5745
print '@@@BUILD_STEP Sync CMake@@@'
5846
CallSubProcess(
@@ -73,41 +61,7 @@ def PrepareCmake():
7361
CallSubProcess( ['make', 'cmake'], cwd=CMAKE_DIR)
7462

7563

76-
def PrepareAndroidTree():
77-
"""Prepare an Android tree to run 'android' format tests."""
78-
if os.environ['BUILDBOT_CLOBBER'] == '1':
79-
print '@@@BUILD_STEP Clobber Android checkout@@@'
80-
shutil.rmtree(ANDROID_DIR)
81-
82-
# The release of Android we use is static, so there's no need to do anything
83-
# if the directory already exists.
84-
if os.path.isdir(ANDROID_DIR):
85-
return
86-
87-
print '@@@BUILD_STEP Initialize Android checkout@@@'
88-
os.mkdir(ANDROID_DIR)
89-
CallSubProcess(['git', 'config', '--global', 'user.name', 'trybot'])
90-
CallSubProcess(['git', 'config', '--global',
91-
'user.email', 'chrome-bot@google.com'])
92-
CallSubProcess(['git', 'config', '--global', 'color.ui', 'false'])
93-
CallSubProcess(
94-
['repo', 'init',
95-
'-u', 'https://android.googlesource.com/platform/manifest',
96-
'-b', 'android-4.2.1_r1',
97-
'-g', 'all,-notdefault,-device,-darwin,-mips,-x86'],
98-
cwd=ANDROID_DIR)
99-
100-
print '@@@BUILD_STEP Sync Android@@@'
101-
CallSubProcess(['repo', 'sync', '-j4'], cwd=ANDROID_DIR)
102-
103-
print '@@@BUILD_STEP Build Android@@@'
104-
CallSubProcess(
105-
['/bin/bash',
106-
'-c', 'source build/envsetup.sh && lunch full-eng && make -j4'],
107-
cwd=ANDROID_DIR)
108-
109-
110-
def GypTestFormat(title, format=None, msvs_version=None):
64+
def GypTestFormat(title, format=None, msvs_version=None, tests=[]):
11165
"""Run the gyp tests for a given format, emitting annotator tags.
11266
11367
See annotator docs at:
@@ -126,22 +80,13 @@ def GypTestFormat(title, format=None, msvs_version=None):
12680
if msvs_version:
12781
env['GYP_MSVS_VERSION'] = msvs_version
12882
command = ' '.join(
129-
[sys.executable, 'trunk/gyptest.py',
83+
[sys.executable, 'gyp/gyptest.py',
13084
'--all',
13185
'--passed',
13286
'--format', format,
13387
'--path', CMAKE_BIN_DIR,
134-
'--chdir', 'trunk'])
135-
if format == 'android':
136-
# gyptest needs the environment setup from envsetup/lunch in order to build
137-
# using the 'android' backend, so this is done in a single shell.
138-
retcode = subprocess.call(
139-
['/bin/bash',
140-
'-c', 'source build/envsetup.sh && lunch full-eng && cd %s && %s'
141-
% (ROOT_DIR, command)],
142-
cwd=ANDROID_DIR, env=env)
143-
else:
144-
retcode = subprocess.call(command, cwd=ROOT_DIR, env=env, shell=True)
88+
'--chdir', 'gyp'] + tests)
89+
retcode = subprocess.call(command, cwd=ROOT_DIR, env=env, shell=True)
14590
if retcode:
14691
# Emit failure tag, and keep going.
14792
print '@@@STEP_FAILURE@@@'
@@ -157,11 +102,7 @@ def GypBuild():
157102
print 'Done.'
158103

159104
retcode = 0
160-
# The Android gyp bot runs on linux so this must be tested first.
161-
if os.environ['BUILDBOT_BUILDERNAME'] == 'gyp-android':
162-
PrepareAndroidTree()
163-
retcode += GypTestFormat('android')
164-
elif sys.platform.startswith('linux'):
105+
if sys.platform.startswith('linux'):
165106
retcode += GypTestFormat('ninja')
166107
retcode += GypTestFormat('make')
167108
PrepareCmake()
@@ -173,8 +114,13 @@ def GypBuild():
173114
elif sys.platform == 'win32':
174115
retcode += GypTestFormat('ninja')
175116
if os.environ['BUILDBOT_BUILDERNAME'] == 'gyp-win64':
176-
retcode += GypTestFormat('msvs-2010', format='msvs', msvs_version='2010')
177-
retcode += GypTestFormat('msvs-2012', format='msvs', msvs_version='2012')
117+
retcode += GypTestFormat('msvs-ninja-2013', format='msvs-ninja',
118+
msvs_version='2013',
119+
tests=[
120+
r'test\generator-output\gyptest-actions.py',
121+
r'test\generator-output\gyptest-relocate.py',
122+
r'test\generator-output\gyptest-rules.py'])
123+
retcode += GypTestFormat('msvs-2013', format='msvs', msvs_version='2013')
178124
else:
179125
raise Exception('Unknown platform')
180126
if retcode:
+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
set noparent
2+
bradnelson@chromium.org
3+
bradnelson@google.com
4+
iannucci@chromium.org
5+
scottmg@chromium.org
6+
thakis@chromium.org
+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
cq_config.json describes the trybots that must pass in order
2+
to land a change through the commit queue.
3+
Comments are here as the file is strictly JSON.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
{
2+
"trybots": {
3+
"launched": {
4+
"tryserver.nacl": {
5+
"gyp-presubmit": ["defaulttests"],
6+
"gyp-linux": ["defaulttests"],
7+
"gyp-mac": ["defaulttests"],
8+
"gyp-win32": ["defaulttests"],
9+
"gyp-win64": ["defaulttests"]
10+
}
11+
},
12+
"triggered": {
13+
}
14+
}
15+
}

tools/gyp/codereview.settings

+5-5
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
# This file is used by gcl to get repository specific information.
22
CODE_REVIEW_SERVER: codereview.chromium.org
33
CC_LIST: gyp-developer@googlegroups.com
4-
VIEW_VC: http://code.google.com/p/gyp/source/detail?r=
5-
TRY_ON_UPLOAD: True
4+
VIEW_VC: https://chromium.googlesource.com/external/gyp/+/
5+
TRY_ON_UPLOAD: False
66
TRYSERVER_PROJECT: gyp
7-
TRYSERVER_PATCHLEVEL: 0
8-
TRYSERVER_ROOT: trunk
7+
TRYSERVER_PATCHLEVEL: 1
8+
TRYSERVER_ROOT: gyp
99
TRYSERVER_SVN_URL: svn://svn.chromium.org/chrome-try/try-nacl
10-
10+
PROJECT: gyp

tools/gyp/gyp

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/bin/bash
1+
#!/bin/sh
22
# Copyright 2013 The Chromium Authors. All rights reserved.
33
# Use of this source code is governed by a BSD-style license that can be
44
# found in the LICENSE file.

tools/gyp/gyp_dummy.c

-7
This file was deleted.

tools/gyp/gyptest.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
import subprocess
1414
import sys
1515

16-
class CommandRunner:
16+
class CommandRunner(object):
1717
"""
1818
Executor class for commands, including "commands" implemented by
1919
Python functions.
@@ -117,7 +117,7 @@ def run(self, command, display=None, stdout=None, stderr=None):
117117
return self.execute(command, stdout, stderr)
118118

119119

120-
class Unbuffered:
120+
class Unbuffered(object):
121121
def __init__(self, fp):
122122
self.fp = fp
123123
def write(self, arg):
@@ -224,7 +224,7 @@ def main(argv=None):
224224
'win32': ['msvs', 'ninja'],
225225
'linux2': ['make', 'ninja'],
226226
'linux3': ['make', 'ninja'],
227-
'darwin': ['make', 'ninja', 'xcode'],
227+
'darwin': ['make', 'ninja', 'xcode', 'xcode-ninja'],
228228
}[sys.platform]
229229

230230
for format in format_list:

tools/gyp/pylib/gyp/MSVSNew.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -172,7 +172,7 @@ def set_msbuild_toolset(self, msbuild_toolset):
172172
#------------------------------------------------------------------------------
173173

174174

175-
class MSVSSolution:
175+
class MSVSSolution(object):
176176
"""Visual Studio solution."""
177177

178178
def __init__(self, path, version, entries=None, variants=None,

0 commit comments

Comments
 (0)