Skip to content
This repository has been archived by the owner on Apr 22, 2023. It is now read-only.

Commit

Permalink
tools: update gyp to r1426
Browse files Browse the repository at this point in the history
  • Loading branch information
bnoordhuis committed Jul 3, 2012
1 parent 5da7890 commit fc4e12b
Show file tree
Hide file tree
Showing 611 changed files with 2,983 additions and 22,714 deletions.
4 changes: 4 additions & 0 deletions tools/gyp/DEPS
Expand Up @@ -4,6 +4,7 @@

vars = {
"chrome_trunk": "http://src.chromium.org/svn/trunk",
"googlecode_url": "http://%s.googlecode.com/svn",
}

deps = {
Expand All @@ -18,5 +19,8 @@ deps_os = {

"third_party/python_26":
Var("chrome_trunk") + "/tools/third_party/python_26@89111",

"src/third_party/pefile":
(Var("googlecode_url") % "pefile") + "/trunk@63",
},
}
62 changes: 60 additions & 2 deletions tools/gyp/PRESUBMIT.py
@@ -1,4 +1,4 @@
# Copyright (c) 2011 Google Inc. All rights reserved.
# Copyright (c) 2012 Google Inc. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.

Expand All @@ -10,6 +10,62 @@
"""


PYLINT_BLACKLIST = [
# TODO: fix me.
# From SCons, not done in google style.
'test/lib/TestCmd.py',
'test/lib/TestCommon.py',
'test/lib/TestGyp.py',
# Needs style fix.
'pylib/gyp/generator/scons.py',
'pylib/gyp/generator/xcode.py',
]


PYLINT_DISABLED_WARNINGS = [
# TODO: fix me.
# Many tests include modules they don't use.
'W0611',
# Include order doesn't properly include local files?
'F0401',
# Some use of built-in names.
'W0622',
# Some unused variables.
'W0612',
# Operator not preceded/followed by space.
'C0323',
'C0322',
# Unnecessary semicolon.
'W0301',
# Unused argument.
'W0613',
# String has no effect (docstring in wrong place).
'W0105',
# Comma not followed by space.
'C0324',
# Access to a protected member.
'W0212',
# Bad indent.
'W0311',
# Line too long.
'C0301',
# Undefined variable.
'E0602',
# Not exception type specified.
'W0702',
# No member of that name.
'E1101',
# Dangerous default {}.
'W0102',
# Others, too many to sort.
'W0201', 'W0232', 'E1103', 'W0621', 'W0108', 'W0223', 'W0231',
'R0201', 'E0101', 'C0321',
# ************* Module copy
# W0104:427,12:_test.odict.__setitem__: Statement seems to have no effect
'W0104',
]


def CheckChangeOnUpload(input_api, output_api):
report = []
report.extend(input_api.canned_checks.PanProjectChecks(
Expand Down Expand Up @@ -41,7 +97,9 @@ def CheckChangeOnCommit(input_api, output_api):
sys.path = ['pylib', 'test/lib'] + sys.path
report.extend(input_api.canned_checks.RunPylint(
input_api,
output_api))
output_api,
black_list=PYLINT_BLACKLIST,
disabled_warnings=PYLINT_DISABLED_WARNINGS))
finally:
sys.path = old_sys_path
return report
Expand Down
1 change: 1 addition & 0 deletions tools/gyp/buildbot/buildbot_run.py
Expand Up @@ -79,6 +79,7 @@ def GypBuild():
retcode += GypTestFormat('xcode')
retcode += GypTestFormat('make')
elif sys.platform == 'win32':
retcode += GypTestFormat('ninja')
retcode += GypTestFormat('msvs-2008', format='msvs', msvs_version='2008')
if os.environ['BUILDBOT_BUILDERNAME'] == 'gyp-win64':
retcode += GypTestFormat('msvs-2010', format='msvs', msvs_version='2010')
Expand Down
11 changes: 7 additions & 4 deletions tools/gyp/pylib/gyp/MSVSNew.py
@@ -1,10 +1,9 @@
# Copyright (c) 2011 Google Inc. All rights reserved.
# Copyright (c) 2012 Google Inc. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.

"""New implementation of Visual Studio project generation for SCons."""

import common
import os
import random

Expand Down Expand Up @@ -139,10 +138,11 @@ def __init__(self, path, name = None, dependencies = None, guid = None,
else:
self.config_platform_overrides = {}
self.fixpath_prefix = fixpath_prefix
self.msbuild_toolset = None

def set_dependencies(self, dependencies):
self.dependencies = list(dependencies or [])

def get_guid(self):
if self.guid is None:
# Set GUID from path
Expand All @@ -160,6 +160,9 @@ def get_guid(self):
self.guid = MakeGuid(self.name)
return self.guid

def set_msbuild_toolset(self, msbuild_toolset):
self.msbuild_toolset = msbuild_toolset

#------------------------------------------------------------------------------


Expand Down Expand Up @@ -204,7 +207,7 @@ def __init__(self, path, version, entries=None, variants=None,
self.Write()


def Write(self, writer=common.WriteOnDiff):
def Write(self, writer=gyp.common.WriteOnDiff):
"""Writes the solution file to disk.
Raises:
Expand Down
4 changes: 2 additions & 2 deletions tools/gyp/pylib/gyp/MSVSProject.py
@@ -1,10 +1,10 @@
# Copyright (c) 2011 Google Inc. All rights reserved.
# Copyright (c) 2012 Google Inc. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.

"""Visual Studio project reader/writer."""

import common
import gyp.common
import gyp.easy_xml as easy_xml

#------------------------------------------------------------------------------
Expand Down
4 changes: 2 additions & 2 deletions tools/gyp/pylib/gyp/MSVSSettings.py
@@ -1,4 +1,4 @@
# Copyright (c) 2011 The Chromium Authors. All rights reserved.
# Copyright (c) 2012 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.

Expand Down Expand Up @@ -481,7 +481,7 @@ def _ValidateSettings(validators, settings, stderr):
_midl = _Tool('VCMIDLTool', 'Midl')
_rc = _Tool('VCResourceCompilerTool', 'ResourceCompile')
_lib = _Tool('VCLibrarianTool', 'Lib')
_manifest = _Tool('VCManifestTool', 'Mt')
_manifest = _Tool('VCManifestTool', 'Manifest')


_AddTool(_compile)
Expand Down
17 changes: 9 additions & 8 deletions tools/gyp/pylib/gyp/MSVSSettings_test.py
@@ -1,6 +1,6 @@
#!/usr/bin/env python

# Copyright (c) 2011 Google Inc. All rights reserved.
# Copyright (c) 2012 Google Inc. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.

Expand Down Expand Up @@ -514,7 +514,7 @@ def testValidateMSBuildSettings_settings(self):
'TreatLibWarningAsErrors': 'true',
'UseUnicodeResponseFiles': 'true',
'Verbose': 'true'},
'Mt': {
'Manifest': {
'AdditionalManifestFiles': 'file1;file2',
'AdditionalOptions': 'a string1',
'AssemblyIdentity': 'a string1',
Expand Down Expand Up @@ -550,11 +550,12 @@ def testValidateMSBuildSettings_settings(self):
self._ExpectedWarnings([
'Warning: unrecognized setting ClCompile/Enableprefast',
'Warning: unrecognized setting ClCompile/ZZXYZ',
'Warning: unrecognized setting Mt/notgood3',
"Warning: for Mt/GenerateCatalogFiles, expected bool; got 'truel'",
'Warning: unrecognized setting Manifest/notgood3',
'Warning: for Manifest/GenerateCatalogFiles, '
"expected bool; got 'truel'",
'Warning: for Lib/TargetMachine, unrecognized enumerated value '
'MachineX86i',
"Warning: for Mt/EnableDPIAwareness, expected bool; got 'fal'"])
"Warning: for Manifest/EnableDPIAwareness, expected bool; got 'fal'"])

def testConvertToMSBuildSettings_empty(self):
"""Tests an empty conversion."""
Expand Down Expand Up @@ -1054,7 +1055,7 @@ def testConvertToMSBuildSettings_full_synthetic(self):
'OutputFile': 'a_file_name',
'SuppressStartupBanner': 'true',
'UseUnicodeResponseFiles': 'true'},
'Mt': {
'Manifest': {
'AdditionalManifestFiles': 'file1;file2;file3',
'AdditionalOptions': 'a_string',
'AssemblyIdentity': 'a_string',
Expand Down Expand Up @@ -1124,7 +1125,7 @@ def testConvertToMSBuildSettings_actual(self):
AdditionalIncludeDirectories: ';%(AdditionalIncludeDirectories)',
AdditionalOptions: ' %(AdditionalOptions)',
PreprocessorDefinitions: ';%(PreprocessorDefinitions)',
Mt:
Manifest:
AdditionalManifestFiles: ';%(AdditionalManifestFiles)',
AdditionalOptions: ' %(AdditionalOptions)',
InputResourceManifests: ';%(InputResourceManifests)',
Expand Down Expand Up @@ -1442,7 +1443,7 @@ def testConvertToMSBuildSettings_actual(self):
'PreprocessorDefinitions': '_UNICODE;UNICODE2',
'ResourceOutputFileName': '$(IntDir)%(Filename)3.res',
'ShowProgress': 'true'},
'Mt': {
'Manifest': {
'AdditionalManifestFiles': 'sfsdfsd',
'AdditionalOptions': 'afdsdafsd',
'AssemblyIdentity': 'sddfdsadfsa',
Expand Down
4 changes: 2 additions & 2 deletions tools/gyp/pylib/gyp/MSVSToolFile.py
@@ -1,10 +1,10 @@
# Copyright (c) 2009 Google Inc. All rights reserved.
# Copyright (c) 2012 Google Inc. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.

"""Visual Studio project reader/writer."""

import common
import gyp.common
import gyp.easy_xml as easy_xml


Expand Down
5 changes: 3 additions & 2 deletions tools/gyp/pylib/gyp/MSVSUserFile.py
@@ -1,13 +1,14 @@
# Copyright (c) 2009 Google Inc. All rights reserved.
# Copyright (c) 2012 Google Inc. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.

"""Visual Studio user preferences file writer."""

import common
import os
import re
import socket # for gethostname

import gyp.common
import gyp.easy_xml as easy_xml


Expand Down

0 comments on commit fc4e12b

Please sign in to comment.