-
Notifications
You must be signed in to change notification settings - Fork 30k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
win,v8: Support for MSVS 2015 in v0.12 #2843
Changes from all commits
b865f9d
f352570
8d0cfac
b066e6a
a7a402f
689de86
cd13a9e
11fe371
934b7b3
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,34 +3,26 @@ | |
# Use of this source code is governed by a BSD-style license that can be | ||
# found in the LICENSE file. | ||
|
||
|
||
"""Argument-less script to select what to run on the buildbots.""" | ||
|
||
|
||
import os | ||
import shutil | ||
import subprocess | ||
import sys | ||
|
||
|
||
if sys.platform in ['win32', 'cygwin']: | ||
EXE_SUFFIX = '.exe' | ||
else: | ||
EXE_SUFFIX = '' | ||
|
||
|
||
BUILDBOT_DIR = os.path.dirname(os.path.abspath(__file__)) | ||
TRUNK_DIR = os.path.dirname(BUILDBOT_DIR) | ||
ROOT_DIR = os.path.dirname(TRUNK_DIR) | ||
ANDROID_DIR = os.path.join(ROOT_DIR, 'android') | ||
CMAKE_DIR = os.path.join(ROOT_DIR, 'cmake') | ||
CMAKE_BIN_DIR = os.path.join(CMAKE_DIR, 'bin') | ||
OUT_DIR = os.path.join(TRUNK_DIR, 'out') | ||
|
||
|
||
def CallSubProcess(*args, **kwargs): | ||
"""Wrapper around subprocess.call which treats errors as build exceptions.""" | ||
retcode = subprocess.call(*args, **kwargs) | ||
with open(os.devnull) as devnull_fd: | ||
retcode = subprocess.call(stdin=devnull_fd, *args, **kwargs) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Assign a default value to |
||
if retcode != 0: | ||
print '@@@STEP_EXCEPTION@@@' | ||
sys.exit(1) | ||
|
@@ -49,10 +41,6 @@ def PrepareCmake(): | |
|
||
print '@@@BUILD_STEP Initialize CMake checkout@@@' | ||
os.mkdir(CMAKE_DIR) | ||
CallSubProcess(['git', 'config', '--global', 'user.name', 'trybot']) | ||
CallSubProcess(['git', 'config', '--global', | ||
'user.email', 'chrome-bot@google.com']) | ||
CallSubProcess(['git', 'config', '--global', 'color.ui', 'false']) | ||
|
||
print '@@@BUILD_STEP Sync CMake@@@' | ||
CallSubProcess( | ||
|
@@ -73,41 +61,7 @@ def PrepareCmake(): | |
CallSubProcess( ['make', 'cmake'], cwd=CMAKE_DIR) | ||
|
||
|
||
def PrepareAndroidTree(): | ||
"""Prepare an Android tree to run 'android' format tests.""" | ||
if os.environ['BUILDBOT_CLOBBER'] == '1': | ||
print '@@@BUILD_STEP Clobber Android checkout@@@' | ||
shutil.rmtree(ANDROID_DIR) | ||
|
||
# The release of Android we use is static, so there's no need to do anything | ||
# if the directory already exists. | ||
if os.path.isdir(ANDROID_DIR): | ||
return | ||
|
||
print '@@@BUILD_STEP Initialize Android checkout@@@' | ||
os.mkdir(ANDROID_DIR) | ||
CallSubProcess(['git', 'config', '--global', 'user.name', 'trybot']) | ||
CallSubProcess(['git', 'config', '--global', | ||
'user.email', 'chrome-bot@google.com']) | ||
CallSubProcess(['git', 'config', '--global', 'color.ui', 'false']) | ||
CallSubProcess( | ||
['repo', 'init', | ||
'-u', 'https://android.googlesource.com/platform/manifest', | ||
'-b', 'android-4.2.1_r1', | ||
'-g', 'all,-notdefault,-device,-darwin,-mips,-x86'], | ||
cwd=ANDROID_DIR) | ||
|
||
print '@@@BUILD_STEP Sync Android@@@' | ||
CallSubProcess(['repo', 'sync', '-j4'], cwd=ANDROID_DIR) | ||
|
||
print '@@@BUILD_STEP Build Android@@@' | ||
CallSubProcess( | ||
['/bin/bash', | ||
'-c', 'source build/envsetup.sh && lunch full-eng && make -j4'], | ||
cwd=ANDROID_DIR) | ||
|
||
|
||
def GypTestFormat(title, format=None, msvs_version=None): | ||
def GypTestFormat(title, format=None, msvs_version=None, tests=[]): | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Using if tests is None:
tests = [] |
||
"""Run the gyp tests for a given format, emitting annotator tags. | ||
|
||
See annotator docs at: | ||
|
@@ -126,22 +80,13 @@ def GypTestFormat(title, format=None, msvs_version=None): | |
if msvs_version: | ||
env['GYP_MSVS_VERSION'] = msvs_version | ||
command = ' '.join( | ||
[sys.executable, 'trunk/gyptest.py', | ||
[sys.executable, 'gyp/gyptest.py', | ||
'--all', | ||
'--passed', | ||
'--format', format, | ||
'--path', CMAKE_BIN_DIR, | ||
'--chdir', 'trunk']) | ||
if format == 'android': | ||
# gyptest needs the environment setup from envsetup/lunch in order to build | ||
# using the 'android' backend, so this is done in a single shell. | ||
retcode = subprocess.call( | ||
['/bin/bash', | ||
'-c', 'source build/envsetup.sh && lunch full-eng && cd %s && %s' | ||
% (ROOT_DIR, command)], | ||
cwd=ANDROID_DIR, env=env) | ||
else: | ||
retcode = subprocess.call(command, cwd=ROOT_DIR, env=env, shell=True) | ||
'--chdir', 'gyp'] + tests) | ||
retcode = subprocess.call(command, cwd=ROOT_DIR, env=env, shell=True) | ||
if retcode: | ||
# Emit failure tag, and keep going. | ||
print '@@@STEP_FAILURE@@@' | ||
|
@@ -157,11 +102,7 @@ def GypBuild(): | |
print 'Done.' | ||
|
||
retcode = 0 | ||
# The Android gyp bot runs on linux so this must be tested first. | ||
if os.environ['BUILDBOT_BUILDERNAME'] == 'gyp-android': | ||
PrepareAndroidTree() | ||
retcode += GypTestFormat('android') | ||
elif sys.platform.startswith('linux'): | ||
if sys.platform.startswith('linux'): | ||
retcode += GypTestFormat('ninja') | ||
retcode += GypTestFormat('make') | ||
PrepareCmake() | ||
|
@@ -173,8 +114,13 @@ def GypBuild(): | |
elif sys.platform == 'win32': | ||
retcode += GypTestFormat('ninja') | ||
if os.environ['BUILDBOT_BUILDERNAME'] == 'gyp-win64': | ||
retcode += GypTestFormat('msvs-2010', format='msvs', msvs_version='2010') | ||
retcode += GypTestFormat('msvs-2012', format='msvs', msvs_version='2012') | ||
retcode += GypTestFormat('msvs-ninja-2013', format='msvs-ninja', | ||
msvs_version='2013', | ||
tests=[ | ||
r'test\generator-output\gyptest-actions.py', | ||
r'test\generator-output\gyptest-relocate.py', | ||
r'test\generator-output\gyptest-rules.py']) | ||
retcode += GypTestFormat('msvs-2013', format='msvs', msvs_version='2013') | ||
else: | ||
raise Exception('Unknown platform') | ||
if retcode: | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
set noparent | ||
bradnelson@chromium.org | ||
bradnelson@google.com | ||
iannucci@chromium.org | ||
scottmg@chromium.org | ||
thakis@chromium.org |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
cq_config.json describes the trybots that must pass in order | ||
to land a change through the commit queue. | ||
Comments are here as the file is strictly JSON. |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
{ | ||
"trybots": { | ||
"launched": { | ||
"tryserver.nacl": { | ||
"gyp-presubmit": ["defaulttests"], | ||
"gyp-linux": ["defaulttests"], | ||
"gyp-mac": ["defaulttests"], | ||
"gyp-win32": ["defaulttests"], | ||
"gyp-win64": ["defaulttests"] | ||
} | ||
}, | ||
"triggered": { | ||
} | ||
} | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,10 @@ | ||
# This file is used by gcl to get repository specific information. | ||
CODE_REVIEW_SERVER: codereview.chromium.org | ||
CC_LIST: gyp-developer@googlegroups.com | ||
VIEW_VC: http://code.google.com/p/gyp/source/detail?r= | ||
TRY_ON_UPLOAD: True | ||
VIEW_VC: https://chromium.googlesource.com/external/gyp/+/ | ||
TRY_ON_UPLOAD: False | ||
TRYSERVER_PROJECT: gyp | ||
TRYSERVER_PATCHLEVEL: 0 | ||
TRYSERVER_ROOT: trunk | ||
TRYSERVER_PATCHLEVEL: 1 | ||
TRYSERVER_ROOT: gyp | ||
TRYSERVER_SVN_URL: svn://svn.chromium.org/chrome-try/try-nacl | ||
|
||
PROJECT: gyp |
This file was deleted.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Use set literal, like this
{'defaulttests'}
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is from gyp upstream I believe, no point changing it here