redsnow 0.0.8
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.gitignore +34 -0
- data/.gitmodules +3 -0
- data/.travis.yml +20 -0
- data/CHANGELOG.md +4 -0
- data/Gemfile +4 -0
- data/LICENSE +21 -0
- data/README.md +62 -0
- data/Rakefile +36 -0
- data/Vagrantfile +20 -0
- data/ext/snowcrash/Makefile +64 -0
- data/ext/snowcrash/Vagrantfile +20 -0
- data/ext/snowcrash/bin/snowcrash +0 -0
- data/ext/snowcrash/common.gypi +163 -0
- data/ext/snowcrash/config.gypi +10 -0
- data/ext/snowcrash/config.mk +5 -0
- data/ext/snowcrash/configure +213 -0
- data/ext/snowcrash/provisioning.sh +15 -0
- data/ext/snowcrash/snowcrash.gyp +141 -0
- data/ext/snowcrash/src/ActionParser.h +503 -0
- data/ext/snowcrash/src/AssetParser.h +215 -0
- data/ext/snowcrash/src/BlockUtility.h +186 -0
- data/ext/snowcrash/src/Blueprint.h +283 -0
- data/ext/snowcrash/src/BlueprintParser.h +347 -0
- data/ext/snowcrash/src/BlueprintParserCore.h +190 -0
- data/ext/snowcrash/src/BlueprintSection.h +140 -0
- data/ext/snowcrash/src/BlueprintUtility.h +126 -0
- data/ext/snowcrash/src/CBlueprint.cc +600 -0
- data/ext/snowcrash/src/CBlueprint.h +354 -0
- data/ext/snowcrash/src/CSourceAnnotation.cc +140 -0
- data/ext/snowcrash/src/CSourceAnnotation.h +106 -0
- data/ext/snowcrash/src/CodeBlockUtility.h +189 -0
- data/ext/snowcrash/src/DescriptionSectionUtility.h +156 -0
- data/ext/snowcrash/src/HTTP.cc +46 -0
- data/ext/snowcrash/src/HTTP.h +105 -0
- data/ext/snowcrash/src/HeaderParser.h +289 -0
- data/ext/snowcrash/src/ListBlockUtility.h +273 -0
- data/ext/snowcrash/src/ListUtility.h +95 -0
- data/ext/snowcrash/src/MarkdownBlock.cc +176 -0
- data/ext/snowcrash/src/MarkdownBlock.h +93 -0
- data/ext/snowcrash/src/MarkdownParser.cc +266 -0
- data/ext/snowcrash/src/MarkdownParser.h +88 -0
- data/ext/snowcrash/src/ParameterDefinitonParser.h +570 -0
- data/ext/snowcrash/src/ParametersParser.h +252 -0
- data/ext/snowcrash/src/Parser.cc +71 -0
- data/ext/snowcrash/src/Parser.h +29 -0
- data/ext/snowcrash/src/ParserCore.cc +120 -0
- data/ext/snowcrash/src/ParserCore.h +82 -0
- data/ext/snowcrash/src/PayloadParser.h +672 -0
- data/ext/snowcrash/src/Platform.h +54 -0
- data/ext/snowcrash/src/RegexMatch.h +32 -0
- data/ext/snowcrash/src/ResourceGroupParser.h +195 -0
- data/ext/snowcrash/src/ResourceParser.h +584 -0
- data/ext/snowcrash/src/SectionUtility.h +142 -0
- data/ext/snowcrash/src/Serialize.cc +52 -0
- data/ext/snowcrash/src/Serialize.h +69 -0
- data/ext/snowcrash/src/SerializeJSON.cc +601 -0
- data/ext/snowcrash/src/SerializeJSON.h +21 -0
- data/ext/snowcrash/src/SerializeYAML.cc +336 -0
- data/ext/snowcrash/src/SerializeYAML.h +21 -0
- data/ext/snowcrash/src/SourceAnnotation.h +177 -0
- data/ext/snowcrash/src/StringUtility.h +109 -0
- data/ext/snowcrash/src/SymbolTable.h +83 -0
- data/ext/snowcrash/src/UriTemplateParser.cc +195 -0
- data/ext/snowcrash/src/UriTemplateParser.h +243 -0
- data/ext/snowcrash/src/Version.h +39 -0
- data/ext/snowcrash/src/csnowcrash.cc +23 -0
- data/ext/snowcrash/src/csnowcrash.h +38 -0
- data/ext/snowcrash/src/posix/RegexMatch.cc +99 -0
- data/ext/snowcrash/src/snowcrash.cc +18 -0
- data/ext/snowcrash/src/snowcrash.h +41 -0
- data/ext/snowcrash/src/snowcrash/snowcrash.cc +170 -0
- data/ext/snowcrash/src/win/RegexMatch.cc +78 -0
- data/ext/snowcrash/sundown/CONTRIBUTING.md +10 -0
- data/ext/snowcrash/sundown/Makefile +83 -0
- data/ext/snowcrash/sundown/Makefile.win +33 -0
- data/ext/snowcrash/sundown/examples/smartypants.c +72 -0
- data/ext/snowcrash/sundown/examples/sundown.c +80 -0
- data/ext/snowcrash/sundown/html/houdini.h +37 -0
- data/ext/snowcrash/sundown/html/houdini_href_e.c +108 -0
- data/ext/snowcrash/sundown/html/houdini_html_e.c +84 -0
- data/ext/snowcrash/sundown/html/html.c +647 -0
- data/ext/snowcrash/sundown/html/html.h +77 -0
- data/ext/snowcrash/sundown/html/html_smartypants.c +389 -0
- data/ext/snowcrash/sundown/html_block_names.txt +25 -0
- data/ext/snowcrash/sundown/src/autolink.c +297 -0
- data/ext/snowcrash/sundown/src/autolink.h +51 -0
- data/ext/snowcrash/sundown/src/buffer.c +225 -0
- data/ext/snowcrash/sundown/src/buffer.h +96 -0
- data/ext/snowcrash/sundown/src/html_blocks.h +206 -0
- data/ext/snowcrash/sundown/src/markdown.c +2701 -0
- data/ext/snowcrash/sundown/src/markdown.h +147 -0
- data/ext/snowcrash/sundown/src/src_map.c +200 -0
- data/ext/snowcrash/sundown/src/src_map.h +58 -0
- data/ext/snowcrash/sundown/src/stack.c +81 -0
- data/ext/snowcrash/sundown/src/stack.h +29 -0
- data/ext/snowcrash/sundown/sundown.def +20 -0
- data/ext/snowcrash/tools/gyp/AUTHORS +11 -0
- data/ext/snowcrash/tools/gyp/DEPS +24 -0
- data/ext/snowcrash/tools/gyp/OWNERS +1 -0
- data/ext/snowcrash/tools/gyp/PRESUBMIT.py +120 -0
- data/ext/snowcrash/tools/gyp/buildbot/buildbot_run.py +190 -0
- data/ext/snowcrash/tools/gyp/codereview.settings +10 -0
- data/ext/snowcrash/tools/gyp/data/win/large-pdb-shim.cc +12 -0
- data/ext/snowcrash/tools/gyp/gyp +8 -0
- data/ext/snowcrash/tools/gyp/gyp.bat +5 -0
- data/ext/snowcrash/tools/gyp/gyp_main.py +18 -0
- data/ext/snowcrash/tools/gyp/pylib/gyp/MSVSNew.py +340 -0
- data/ext/snowcrash/tools/gyp/pylib/gyp/MSVSProject.py +208 -0
- data/ext/snowcrash/tools/gyp/pylib/gyp/MSVSSettings.py +1063 -0
- data/ext/snowcrash/tools/gyp/pylib/gyp/MSVSToolFile.py +58 -0
- data/ext/snowcrash/tools/gyp/pylib/gyp/MSVSUserFile.py +147 -0
- data/ext/snowcrash/tools/gyp/pylib/gyp/MSVSUtil.py +267 -0
- data/ext/snowcrash/tools/gyp/pylib/gyp/MSVSVersion.py +409 -0
- data/ext/snowcrash/tools/gyp/pylib/gyp/__init__.py +537 -0
- data/ext/snowcrash/tools/gyp/pylib/gyp/__init__.pyc +0 -0
- data/ext/snowcrash/tools/gyp/pylib/gyp/common.py +521 -0
- data/ext/snowcrash/tools/gyp/pylib/gyp/common.pyc +0 -0
- data/ext/snowcrash/tools/gyp/pylib/gyp/easy_xml.py +157 -0
- data/ext/snowcrash/tools/gyp/pylib/gyp/flock_tool.py +49 -0
- data/ext/snowcrash/tools/gyp/pylib/gyp/generator/__init__.py +0 -0
- data/ext/snowcrash/tools/gyp/pylib/gyp/generator/__init__.pyc +0 -0
- data/ext/snowcrash/tools/gyp/pylib/gyp/generator/android.py +1069 -0
- data/ext/snowcrash/tools/gyp/pylib/gyp/generator/cmake.py +1143 -0
- data/ext/snowcrash/tools/gyp/pylib/gyp/generator/dump_dependency_json.py +81 -0
- data/ext/snowcrash/tools/gyp/pylib/gyp/generator/eclipse.py +335 -0
- data/ext/snowcrash/tools/gyp/pylib/gyp/generator/gypd.py +87 -0
- data/ext/snowcrash/tools/gyp/pylib/gyp/generator/gypsh.py +56 -0
- data/ext/snowcrash/tools/gyp/pylib/gyp/generator/make.py +2181 -0
- data/ext/snowcrash/tools/gyp/pylib/gyp/generator/make.pyc +0 -0
- data/ext/snowcrash/tools/gyp/pylib/gyp/generator/msvs.py +3335 -0
- data/ext/snowcrash/tools/gyp/pylib/gyp/generator/ninja.py +2156 -0
- data/ext/snowcrash/tools/gyp/pylib/gyp/generator/xcode.py +1224 -0
- data/ext/snowcrash/tools/gyp/pylib/gyp/generator/xcode.pyc +0 -0
- data/ext/snowcrash/tools/gyp/pylib/gyp/input.py +2809 -0
- data/ext/snowcrash/tools/gyp/pylib/gyp/input.pyc +0 -0
- data/ext/snowcrash/tools/gyp/pylib/gyp/mac_tool.py +510 -0
- data/ext/snowcrash/tools/gyp/pylib/gyp/msvs_emulation.py +972 -0
- data/ext/snowcrash/tools/gyp/pylib/gyp/ninja_syntax.py +160 -0
- data/ext/snowcrash/tools/gyp/pylib/gyp/ordered_dict.py +289 -0
- data/ext/snowcrash/tools/gyp/pylib/gyp/win_tool.py +292 -0
- data/ext/snowcrash/tools/gyp/pylib/gyp/xcode_emulation.py +1440 -0
- data/ext/snowcrash/tools/gyp/pylib/gyp/xcode_emulation.pyc +0 -0
- data/ext/snowcrash/tools/gyp/pylib/gyp/xcodeproj_file.py +2889 -0
- data/ext/snowcrash/tools/gyp/pylib/gyp/xcodeproj_file.pyc +0 -0
- data/ext/snowcrash/tools/gyp/pylib/gyp/xml_fix.py +69 -0
- data/ext/snowcrash/tools/gyp/pylintrc +307 -0
- data/ext/snowcrash/tools/gyp/samples/samples +81 -0
- data/ext/snowcrash/tools/gyp/samples/samples.bat +5 -0
- data/ext/snowcrash/tools/gyp/setup.py +19 -0
- data/ext/snowcrash/tools/gyp/tools/Xcode/Specifications/gyp.pbfilespec +27 -0
- data/ext/snowcrash/tools/gyp/tools/Xcode/Specifications/gyp.xclangspec +226 -0
- data/ext/snowcrash/tools/gyp/tools/emacs/gyp.el +252 -0
- data/ext/snowcrash/tools/gyp/tools/graphviz.py +100 -0
- data/ext/snowcrash/tools/gyp/tools/pretty_gyp.py +155 -0
- data/ext/snowcrash/tools/gyp/tools/pretty_sln.py +168 -0
- data/ext/snowcrash/tools/gyp/tools/pretty_vcproj.py +329 -0
- data/ext/snowcrash/tools/homebrew/snowcrash.rb +11 -0
- data/ext/snowcrash/vcbuild.bat +184 -0
- data/lib/redsnow.rb +31 -0
- data/lib/redsnow/binding.rb +132 -0
- data/lib/redsnow/blueprint.rb +365 -0
- data/lib/redsnow/object.rb +18 -0
- data/lib/redsnow/parseresult.rb +107 -0
- data/lib/redsnow/version.rb +4 -0
- data/provisioning.sh +20 -0
- data/redsnow.gemspec +35 -0
- data/test/_helper.rb +15 -0
- data/test/fixtures/sample-api-ast.json +97 -0
- data/test/fixtures/sample-api.apib +20 -0
- data/test/redsnow_binding_test.rb +35 -0
- data/test/redsnow_parseresult_test.rb +50 -0
- data/test/redsnow_test.rb +285 -0
- metadata +358 -0
@@ -0,0 +1,29 @@
|
|
1
|
+
#ifndef STACK_H__
|
2
|
+
#define STACK_H__
|
3
|
+
|
4
|
+
#include <stdlib.h>
|
5
|
+
|
6
|
+
#ifdef __cplusplus
|
7
|
+
extern "C" {
|
8
|
+
#endif
|
9
|
+
|
10
|
+
struct stack {
|
11
|
+
void **item;
|
12
|
+
size_t size;
|
13
|
+
size_t asize;
|
14
|
+
};
|
15
|
+
|
16
|
+
void stack_free(struct stack *);
|
17
|
+
int stack_grow(struct stack *, size_t);
|
18
|
+
int stack_init(struct stack *, size_t);
|
19
|
+
|
20
|
+
int stack_push(struct stack *, void *);
|
21
|
+
|
22
|
+
void *stack_pop(struct stack *);
|
23
|
+
void *stack_top(struct stack *);
|
24
|
+
|
25
|
+
#ifdef __cplusplus
|
26
|
+
}
|
27
|
+
#endif
|
28
|
+
|
29
|
+
#endif
|
@@ -0,0 +1,20 @@
|
|
1
|
+
LIBRARY SUNDOWN
|
2
|
+
EXPORTS
|
3
|
+
sdhtml_renderer
|
4
|
+
sdhtml_toc_renderer
|
5
|
+
sdhtml_smartypants
|
6
|
+
bufgrow
|
7
|
+
bufnew
|
8
|
+
bufcstr
|
9
|
+
bufprefix
|
10
|
+
bufput
|
11
|
+
bufputs
|
12
|
+
bufputc
|
13
|
+
bufrelease
|
14
|
+
bufreset
|
15
|
+
bufslurp
|
16
|
+
bufprintf
|
17
|
+
sd_markdown_new
|
18
|
+
sd_markdown_render
|
19
|
+
sd_markdown_free
|
20
|
+
sd_version
|
@@ -0,0 +1,11 @@
|
|
1
|
+
# Names should be added to this file like so:
|
2
|
+
# Name or Organization <email address>
|
3
|
+
|
4
|
+
Google Inc.
|
5
|
+
Bloomberg Finance L.P.
|
6
|
+
Yandex LLC
|
7
|
+
|
8
|
+
Steven Knight <knight@baldmt.com>
|
9
|
+
Ryan Norton <rnorton10@gmail.com>
|
10
|
+
David J. Sankel <david@sankelsoftware.com>
|
11
|
+
Eric N. Vander Weele <ericvw@gmail.com>
|
@@ -0,0 +1,24 @@
|
|
1
|
+
# DEPS file for gclient use in buildbot execution of gyp tests.
|
2
|
+
#
|
3
|
+
# (You don't need to use gclient for normal GYP development work.)
|
4
|
+
|
5
|
+
vars = {
|
6
|
+
"chrome_trunk": "http://src.chromium.org/svn/trunk",
|
7
|
+
"googlecode_url": "http://%s.googlecode.com/svn",
|
8
|
+
}
|
9
|
+
|
10
|
+
deps = {
|
11
|
+
}
|
12
|
+
|
13
|
+
deps_os = {
|
14
|
+
"win": {
|
15
|
+
"third_party/cygwin":
|
16
|
+
Var("chrome_trunk") + "/deps/third_party/cygwin@66844",
|
17
|
+
|
18
|
+
"third_party/python_26":
|
19
|
+
Var("chrome_trunk") + "/tools/third_party/python_26@89111",
|
20
|
+
|
21
|
+
"src/third_party/pefile":
|
22
|
+
(Var("googlecode_url") % "pefile") + "/trunk@63",
|
23
|
+
},
|
24
|
+
}
|
@@ -0,0 +1 @@
|
|
1
|
+
*
|
@@ -0,0 +1,120 @@
|
|
1
|
+
# Copyright (c) 2012 Google Inc. All rights reserved.
|
2
|
+
# Use of this source code is governed by a BSD-style license that can be
|
3
|
+
# found in the LICENSE file.
|
4
|
+
|
5
|
+
|
6
|
+
"""Top-level presubmit script for GYP.
|
7
|
+
|
8
|
+
See http://dev.chromium.org/developers/how-tos/depottools/presubmit-scripts
|
9
|
+
for more details about the presubmit API built into gcl.
|
10
|
+
"""
|
11
|
+
|
12
|
+
|
13
|
+
PYLINT_BLACKLIST = [
|
14
|
+
# TODO: fix me.
|
15
|
+
# From SCons, not done in google style.
|
16
|
+
'test/lib/TestCmd.py',
|
17
|
+
'test/lib/TestCommon.py',
|
18
|
+
'test/lib/TestGyp.py',
|
19
|
+
# Needs style fix.
|
20
|
+
'pylib/gyp/generator/xcode.py',
|
21
|
+
]
|
22
|
+
|
23
|
+
|
24
|
+
PYLINT_DISABLED_WARNINGS = [
|
25
|
+
# TODO: fix me.
|
26
|
+
# Many tests include modules they don't use.
|
27
|
+
'W0611',
|
28
|
+
# Include order doesn't properly include local files?
|
29
|
+
'F0401',
|
30
|
+
# Some use of built-in names.
|
31
|
+
'W0622',
|
32
|
+
# Some unused variables.
|
33
|
+
'W0612',
|
34
|
+
# Operator not preceded/followed by space.
|
35
|
+
'C0323',
|
36
|
+
'C0322',
|
37
|
+
# Unnecessary semicolon.
|
38
|
+
'W0301',
|
39
|
+
# Unused argument.
|
40
|
+
'W0613',
|
41
|
+
# String has no effect (docstring in wrong place).
|
42
|
+
'W0105',
|
43
|
+
# Comma not followed by space.
|
44
|
+
'C0324',
|
45
|
+
# Access to a protected member.
|
46
|
+
'W0212',
|
47
|
+
# Bad indent.
|
48
|
+
'W0311',
|
49
|
+
# Line too long.
|
50
|
+
'C0301',
|
51
|
+
# Undefined variable.
|
52
|
+
'E0602',
|
53
|
+
# Not exception type specified.
|
54
|
+
'W0702',
|
55
|
+
# No member of that name.
|
56
|
+
'E1101',
|
57
|
+
# Dangerous default {}.
|
58
|
+
'W0102',
|
59
|
+
# Others, too many to sort.
|
60
|
+
'W0201', 'W0232', 'E1103', 'W0621', 'W0108', 'W0223', 'W0231',
|
61
|
+
'R0201', 'E0101', 'C0321',
|
62
|
+
# ************* Module copy
|
63
|
+
# W0104:427,12:_test.odict.__setitem__: Statement seems to have no effect
|
64
|
+
'W0104',
|
65
|
+
]
|
66
|
+
|
67
|
+
|
68
|
+
def CheckChangeOnUpload(input_api, output_api):
|
69
|
+
report = []
|
70
|
+
report.extend(input_api.canned_checks.PanProjectChecks(
|
71
|
+
input_api, output_api))
|
72
|
+
return report
|
73
|
+
|
74
|
+
|
75
|
+
def CheckChangeOnCommit(input_api, output_api):
|
76
|
+
report = []
|
77
|
+
|
78
|
+
# Accept any year number from 2009 to the current year.
|
79
|
+
current_year = int(input_api.time.strftime('%Y'))
|
80
|
+
allowed_years = (str(s) for s in reversed(xrange(2009, current_year + 1)))
|
81
|
+
years_re = '(' + '|'.join(allowed_years) + ')'
|
82
|
+
|
83
|
+
# The (c) is deprecated, but tolerate it until it's removed from all files.
|
84
|
+
license = (
|
85
|
+
r'.*? Copyright (\(c\) )?%(year)s Google Inc\. All rights reserved\.\n'
|
86
|
+
r'.*? Use of this source code is governed by a BSD-style license that '
|
87
|
+
r'can be\n'
|
88
|
+
r'.*? found in the LICENSE file\.\n'
|
89
|
+
) % {
|
90
|
+
'year': years_re,
|
91
|
+
}
|
92
|
+
|
93
|
+
report.extend(input_api.canned_checks.PanProjectChecks(
|
94
|
+
input_api, output_api, license_header=license))
|
95
|
+
report.extend(input_api.canned_checks.CheckTreeIsOpen(
|
96
|
+
input_api, output_api,
|
97
|
+
'http://gyp-status.appspot.com/status',
|
98
|
+
'http://gyp-status.appspot.com/current'))
|
99
|
+
|
100
|
+
import os
|
101
|
+
import sys
|
102
|
+
old_sys_path = sys.path
|
103
|
+
try:
|
104
|
+
sys.path = ['pylib', 'test/lib'] + sys.path
|
105
|
+
blacklist = PYLINT_BLACKLIST
|
106
|
+
if sys.platform == 'win32':
|
107
|
+
blacklist = [os.path.normpath(x).replace('\\', '\\\\')
|
108
|
+
for x in PYLINT_BLACKLIST]
|
109
|
+
report.extend(input_api.canned_checks.RunPylint(
|
110
|
+
input_api,
|
111
|
+
output_api,
|
112
|
+
black_list=blacklist,
|
113
|
+
disabled_warnings=PYLINT_DISABLED_WARNINGS))
|
114
|
+
finally:
|
115
|
+
sys.path = old_sys_path
|
116
|
+
return report
|
117
|
+
|
118
|
+
|
119
|
+
def GetPreferredTrySlaves():
|
120
|
+
return ['gyp-win32', 'gyp-win64', 'gyp-linux', 'gyp-mac', 'gyp-android']
|
@@ -0,0 +1,190 @@
|
|
1
|
+
#!/usr/bin/env python
|
2
|
+
# Copyright (c) 2012 Google Inc. All rights reserved.
|
3
|
+
# Use of this source code is governed by a BSD-style license that can be
|
4
|
+
# found in the LICENSE file.
|
5
|
+
|
6
|
+
|
7
|
+
"""Argument-less script to select what to run on the buildbots."""
|
8
|
+
|
9
|
+
|
10
|
+
import os
|
11
|
+
import shutil
|
12
|
+
import subprocess
|
13
|
+
import sys
|
14
|
+
|
15
|
+
|
16
|
+
if sys.platform in ['win32', 'cygwin']:
|
17
|
+
EXE_SUFFIX = '.exe'
|
18
|
+
else:
|
19
|
+
EXE_SUFFIX = ''
|
20
|
+
|
21
|
+
|
22
|
+
BUILDBOT_DIR = os.path.dirname(os.path.abspath(__file__))
|
23
|
+
TRUNK_DIR = os.path.dirname(BUILDBOT_DIR)
|
24
|
+
ROOT_DIR = os.path.dirname(TRUNK_DIR)
|
25
|
+
ANDROID_DIR = os.path.join(ROOT_DIR, 'android')
|
26
|
+
CMAKE_DIR = os.path.join(ROOT_DIR, 'cmake')
|
27
|
+
CMAKE_BIN_DIR = os.path.join(CMAKE_DIR, 'bin')
|
28
|
+
OUT_DIR = os.path.join(TRUNK_DIR, 'out')
|
29
|
+
|
30
|
+
|
31
|
+
def CallSubProcess(*args, **kwargs):
|
32
|
+
"""Wrapper around subprocess.call which treats errors as build exceptions."""
|
33
|
+
retcode = subprocess.call(*args, **kwargs)
|
34
|
+
if retcode != 0:
|
35
|
+
print '@@@STEP_EXCEPTION@@@'
|
36
|
+
sys.exit(1)
|
37
|
+
|
38
|
+
|
39
|
+
def PrepareCmake():
|
40
|
+
"""Build CMake 2.8.8 since the version in Precise is 2.8.7."""
|
41
|
+
if os.environ['BUILDBOT_CLOBBER'] == '1':
|
42
|
+
print '@@@BUILD_STEP Clobber CMake checkout@@@'
|
43
|
+
shutil.rmtree(CMAKE_DIR)
|
44
|
+
|
45
|
+
# We always build CMake 2.8.8, so no need to do anything
|
46
|
+
# if the directory already exists.
|
47
|
+
if os.path.isdir(CMAKE_DIR):
|
48
|
+
return
|
49
|
+
|
50
|
+
print '@@@BUILD_STEP Initialize CMake checkout@@@'
|
51
|
+
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'])
|
56
|
+
|
57
|
+
print '@@@BUILD_STEP Sync CMake@@@'
|
58
|
+
CallSubProcess(
|
59
|
+
['git', 'clone',
|
60
|
+
'--depth', '1',
|
61
|
+
'--single-branch',
|
62
|
+
'--branch', 'v2.8.8',
|
63
|
+
'--',
|
64
|
+
'git://cmake.org/cmake.git',
|
65
|
+
CMAKE_DIR],
|
66
|
+
cwd=CMAKE_DIR)
|
67
|
+
|
68
|
+
print '@@@BUILD_STEP Build CMake@@@'
|
69
|
+
CallSubProcess(
|
70
|
+
['/bin/bash', 'bootstrap', '--prefix=%s' % CMAKE_DIR],
|
71
|
+
cwd=CMAKE_DIR)
|
72
|
+
|
73
|
+
CallSubProcess( ['make', 'cmake'], cwd=CMAKE_DIR)
|
74
|
+
|
75
|
+
|
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):
|
111
|
+
"""Run the gyp tests for a given format, emitting annotator tags.
|
112
|
+
|
113
|
+
See annotator docs at:
|
114
|
+
https://sites.google.com/a/chromium.org/dev/developers/testing/chromium-build-infrastructure/buildbot-annotations
|
115
|
+
Args:
|
116
|
+
format: gyp format to test.
|
117
|
+
Returns:
|
118
|
+
0 for sucesss, 1 for failure.
|
119
|
+
"""
|
120
|
+
if not format:
|
121
|
+
format = title
|
122
|
+
|
123
|
+
print '@@@BUILD_STEP ' + title + '@@@'
|
124
|
+
sys.stdout.flush()
|
125
|
+
env = os.environ.copy()
|
126
|
+
if msvs_version:
|
127
|
+
env['GYP_MSVS_VERSION'] = msvs_version
|
128
|
+
command = ' '.join(
|
129
|
+
[sys.executable, 'trunk/gyptest.py',
|
130
|
+
'--all',
|
131
|
+
'--passed',
|
132
|
+
'--format', format,
|
133
|
+
'--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)
|
145
|
+
if retcode:
|
146
|
+
# Emit failure tag, and keep going.
|
147
|
+
print '@@@STEP_FAILURE@@@'
|
148
|
+
return 1
|
149
|
+
return 0
|
150
|
+
|
151
|
+
|
152
|
+
def GypBuild():
|
153
|
+
# Dump out/ directory.
|
154
|
+
print '@@@BUILD_STEP cleanup@@@'
|
155
|
+
print 'Removing %s...' % OUT_DIR
|
156
|
+
shutil.rmtree(OUT_DIR, ignore_errors=True)
|
157
|
+
print 'Done.'
|
158
|
+
|
159
|
+
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'):
|
165
|
+
retcode += GypTestFormat('ninja')
|
166
|
+
retcode += GypTestFormat('make')
|
167
|
+
PrepareCmake()
|
168
|
+
retcode += GypTestFormat('cmake')
|
169
|
+
elif sys.platform == 'darwin':
|
170
|
+
retcode += GypTestFormat('ninja')
|
171
|
+
retcode += GypTestFormat('xcode')
|
172
|
+
retcode += GypTestFormat('make')
|
173
|
+
elif sys.platform == 'win32':
|
174
|
+
retcode += GypTestFormat('ninja')
|
175
|
+
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')
|
178
|
+
else:
|
179
|
+
raise Exception('Unknown platform')
|
180
|
+
if retcode:
|
181
|
+
# TODO(bradnelson): once the annotator supports a postscript (section for
|
182
|
+
# after the build proper that could be used for cumulative failures),
|
183
|
+
# use that instead of this. This isolates the final return value so
|
184
|
+
# that it isn't misattributed to the last stage.
|
185
|
+
print '@@@BUILD_STEP failures@@@'
|
186
|
+
sys.exit(retcode)
|
187
|
+
|
188
|
+
|
189
|
+
if __name__ == '__main__':
|
190
|
+
GypBuild()
|
@@ -0,0 +1,10 @@
|
|
1
|
+
# This file is used by gcl to get repository specific information.
|
2
|
+
CODE_REVIEW_SERVER: codereview.chromium.org
|
3
|
+
CC_LIST: gyp-developer@googlegroups.com
|
4
|
+
VIEW_VC: http://code.google.com/p/gyp/source/detail?r=
|
5
|
+
TRY_ON_UPLOAD: True
|
6
|
+
TRYSERVER_PROJECT: gyp
|
7
|
+
TRYSERVER_PATCHLEVEL: 0
|
8
|
+
TRYSERVER_ROOT: trunk
|
9
|
+
TRYSERVER_SVN_URL: svn://svn.chromium.org/chrome-try/try-nacl
|
10
|
+
|
@@ -0,0 +1,12 @@
|
|
1
|
+
// Copyright (c) 2013 Google Inc. All rights reserved.
|
2
|
+
// Use of this source code is governed by a BSD-style license that can be
|
3
|
+
// found in the LICENSE file.
|
4
|
+
|
5
|
+
// This file is used to generate an empty .pdb -- with a 4KB pagesize -- that is
|
6
|
+
// then used during the final link for modules that have large PDBs. Otherwise,
|
7
|
+
// the linker will generate a pdb with a page size of 1KB, which imposes a limit
|
8
|
+
// of 1GB on the .pdb. By generating an initial empty .pdb with the compiler
|
9
|
+
// (rather than the linker), this limit is avoided. With this in place PDBs may
|
10
|
+
// grow to 2GB.
|
11
|
+
//
|
12
|
+
// This file is referenced by the msvs_large_pdb mechanism in MSVSUtil.py.
|
@@ -0,0 +1,18 @@
|
|
1
|
+
#!/usr/bin/env python
|
2
|
+
|
3
|
+
# Copyright (c) 2009 Google Inc. All rights reserved.
|
4
|
+
# Use of this source code is governed by a BSD-style license that can be
|
5
|
+
# found in the LICENSE file.
|
6
|
+
|
7
|
+
import sys
|
8
|
+
|
9
|
+
# TODO(mark): sys.path manipulation is some temporary testing stuff.
|
10
|
+
try:
|
11
|
+
import gyp
|
12
|
+
except ImportError, e:
|
13
|
+
import os.path
|
14
|
+
sys.path.append(os.path.join(os.path.dirname(sys.argv[0]), 'pylib'))
|
15
|
+
import gyp
|
16
|
+
|
17
|
+
if __name__ == '__main__':
|
18
|
+
sys.exit(gyp.script_main())
|