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

Side by Side Diff: scripts/master/factory/v8_factory.py

Issue 4079003: Initial new v8 setup, this does not include windows setup. I will add this se... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/tools/build/
Patch Set: '' Created 10 years, 2 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 | Annotate | Revision Log
OLDNEW
1 #!/usr/bin/python 1 #!/usr/bin/python
2 # Copyright (c) 2010 The Chromium Authors. All rights reserved. 2 # Copyright (c) 2010 The Chromium Authors. All rights reserved.
3 # Use of this source code is governed by a BSD-style license that can be 3 # Use of this source code is governed by a BSD-style license that can be
4 # found in the LICENSE file. 4 # found in the LICENSE file.
5 5
6 """Utility class to build the v8 master BuildFactory's. 6 """Utility class to build the v8 master BuildFactory's.
7 7
8 Based on gclient_factory.py and adds v8-specific steps.""" 8 Based on gclient_factory.py and adds v8-specific steps."""
9 9
10 from master.factory import v8_commands 10 from master.factory import v8_commands
11 from master.factory import gclient_factory 11 from master.factory import gclient_factory
12 import config 12 import config
13 13
14 14
15 class V8Factory(gclient_factory.GClientFactory): 15 class V8Factory(gclient_factory.GClientFactory):
16 """Encapsulates data and methods common to the v8 master.cfg files.""" 16 """Encapsulates data and methods common to the v8 master.cfg files."""
17 17
18 DEFAULT_TARGET_PLATFORM = config.Master.default_platform 18 DEFAULT_TARGET_PLATFORM = config.Master.default_platform
19 19
20 20
21 CUSTOM_DEPS_PYTHON = ('src/third_party/python_24', 21 CUSTOM_DEPS_PYTHON = ('src/third_party/python_24',
22 config.Master.trunk_url + 22 config.Master.trunk_url +
23 '/deps/third_party/python_24') 23 '/deps/third_party/python_24')
24 24
25 CUSTOM_DEPS_ES5CONFORM = ('bleeding_edge/test/es5conform/data', 25 CUSTOM_DEPS_ES5CONFORM = ('bleeding_edge/test/es5conform/data',
26 'https://es5conform.svn.codeplex.com/svn@62998') 26 'https://es5conform.svn.codeplex.com/svn@71525')
27 27
28 CUSTOM_DEPS_SPUTNIK = ('bleeding_edge/test/sputnik/sputniktests', 28 CUSTOM_DEPS_SPUTNIK = ('bleeding_edge/test/sputnik/sputniktests',
29 'http://sputniktests.googlecode.com/svn/trunk@28') 29 'http://sputniktests.googlecode.com/svn/trunk@28')
30 30
31 CUSTOM_DEPS_SCONS = ('third_party/scons', 31 CUSTOM_DEPS_SCONS = ('third_party/scons',
32 'svn://chrome-svn.corp.google.com/chrome/trunk/src/third_ party/scons') 32 config.Master.trunk_url +
33 '/src/third_party/scons')
33 34
34 CUSTOM_DEPS_VALGRIND = ('src/third_party/valgrind', 35 CUSTOM_DEPS_VALGRIND = ('src/third_party/valgrind',
35 config.Master.trunk_url + '/deps/third_party/valgrind/binaries') 36 config.Master.trunk_url +
37 '/deps/third_party/valgrind/binaries')
38
39 CUSTOM_DEPS_WIN7SDK = ('third_party/win7sdk',
40 config.Master.trunk_internal_url +
41 '/third_party/platformsdk_win7/files')
36 42
37 CUSTOM_DEPS_MOZILLA = ('bleeding_edge/test/mozilla/data', 43 CUSTOM_DEPS_MOZILLA = ('bleeding_edge/test/mozilla/data',
38 config.Master.trunk_url + 44 config.Master.trunk_url +
39 '/deps/third_party/mozilla-tests') 45 '/deps/third_party/mozilla-tests')
40 46
41 def __init__(self, build_dir, target_platform=None): 47 def __init__(self, build_dir, target_platform=None):
42 main = gclient_factory.GClientSolution(config.Master.v8_bleeding_edge) 48 main = gclient_factory.GClientSolution(config.Master.v8_bleeding_edge)
43 49
44 custom_deps_list = [main] 50 custom_deps_list = [main]
45 51
46 gclient_factory.GClientFactory.__init__(self, build_dir, custom_deps_list, 52 gclient_factory.GClientFactory.__init__(self, build_dir, custom_deps_list,
47 target_platform=target_platform) 53 target_platform=target_platform)
48 54
49 @staticmethod 55
50 def _AddTests(factory_cmd_obj, tests, mode=None, 56 def _AddTests(self, factory_cmd_obj, tests, mode=None,
51 factory_properties=None): 57 factory_properties=None):
52 """Add the tests listed in 'tests' to the factory_cmd_obj.""" 58 """Add the tests listed in 'tests' to the factory_cmd_obj."""
53 factory_properties = factory_properties or {} 59 factory_properties = factory_properties or {}
54 60
55 # Small helper function to check if we should run a test 61 # Small helper function to check if we should run a test
56 def R(test): 62 def R(test):
57 return gclient_factory.ShouldRunTest(tests, test) 63 return gclient_factory.ShouldRunTest(tests, test)
58 64
59 f = factory_cmd_obj 65 f = factory_cmd_obj
60 66
61 if R('presubmit'): f.AddPresubmitTest() 67 if R('presubmit'): f.AddPresubmitTest()
62 if R('v8testing'): f.AddV8Testing() 68 if R('v8testing'): f.AddV8Testing()
63 if R('v8_es5conform'): f.AddV8ES5Conform() 69 if R('v8_es5conform'): f.AddV8ES5Conform()
70 if R('fuzz'): f.AddFuzzer()
64 71
65 # Mozilla tests should be moved to v8 repo 72 # Mozilla tests should be moved to v8 repo
66 if R('mozilla'): 73 if R('mozilla'):
67 f.AddV8Mozilla() 74 f.AddV8Mozilla()
68 75
69 if R('sputnik'): f.AddV8Sputnik() 76 if R('sputnik'): f.AddV8Sputnik()
70 if R('arm'): f.AddArmSimTest() 77 if R('arm'):
78 f.AddV8Testing(simulator='arm')
79 f.AddV8ES5Conform(simulator='arm')
80 f.AddV8Mozilla(simulator='arm')
81 f.AddV8Sputnik(simulator='arm')
82
71 83
72 def V8Factory(self, identifier, target='release', clobber=False, 84 def V8Factory(self, identifier, target='release', clobber=False,
73 tests=None, mode=None, slave_type='BuilderTester', 85 tests=None, mode=None, slave_type='BuilderTester',
74 options=None, compile_timeout=1200, build_url=None, 86 options=None, compile_timeout=1200, build_url=None,
75 project=None, factory_properties=None): 87 project=None, factory_properties=None, target_arch=None):
76 tests = tests or [] 88 tests = tests or []
77 factory_properties = factory_properties or {} 89 factory_properties = factory_properties or {}
78 90
79 # Add scons which is not on a build slave by default 91 # Add scons which is not on a build slave by default
80 self._solutions[0].custom_deps_list.append(self.CUSTOM_DEPS_SCONS) 92 self._solutions[0].custom_deps_list.append(self.CUSTOM_DEPS_SCONS)
81 93
82 # If we are on win32 add extra python executable 94 # If we are on win32 add extra python executable
83 if (self._target_platform == 'win32'): 95 if (self._target_platform == 'win32'):
84 self._solutions[0].custom_deps_list.append(self.CUSTOM_DEPS_PYTHON) 96 self._solutions[0].custom_deps_list.append(self.CUSTOM_DEPS_PYTHON)
97 self._solutions[0].custom_deps_list.append(self.CUSTOM_DEPS_WIN7SDK)
85 98
86 if (gclient_factory.ShouldRunTest(tests, 'v8_es5conform')): 99 if (gclient_factory.ShouldRunTest(tests, 'v8_es5conform')):
87 self._solutions[0].custom_deps_list.append(self.CUSTOM_DEPS_ES5CONFORM) 100 self._solutions[0].custom_deps_list.append(self.CUSTOM_DEPS_ES5CONFORM)
88 101
89 if (gclient_factory.ShouldRunTest(tests, 'sputnik')): 102 if (gclient_factory.ShouldRunTest(tests, 'sputnik')):
90 self._solutions[0].custom_deps_list.append(self.CUSTOM_DEPS_SPUTNIK) 103 self._solutions[0].custom_deps_list.append(self.CUSTOM_DEPS_SPUTNIK)
91 104
92 if (gclient_factory.ShouldRunTest(tests, 'leak')): 105 if (gclient_factory.ShouldRunTest(tests, 'leak')):
93 self._solutions[0].custom_deps_list.append(self.CUSTOM_DEPS_VALGRIND) 106 self._solutions[0].custom_deps_list.append(self.CUSTOM_DEPS_VALGRIND)
94 107
95 if (gclient_factory.ShouldRunTest(tests, 'mozilla')): 108 if (gclient_factory.ShouldRunTest(tests, 'mozilla')):
96 self._solutions[0].custom_deps_list.append(self.CUSTOM_DEPS_MOZILLA) 109 self._solutions[0].custom_deps_list.append(self.CUSTOM_DEPS_MOZILLA)
97 110
111 if (gclient_factory.ShouldRunTest(tests, 'arm')):
112 self._solutions[0].custom_deps_list.append(self.CUSTOM_DEPS_MOZILLA)
113 self._solutions[0].custom_deps_list.append(self.CUSTOM_DEPS_SPUTNIK)
114 self._solutions[0].custom_deps_list.append(self.CUSTOM_DEPS_ES5CONFORM)
115
98 factory = self.BuildFactory(identifier, target, clobber, tests, mode, 116 factory = self.BuildFactory(identifier, target, clobber, tests, mode,
99 slave_type, options, compile_timeout, build_url, 117 slave_type, options, compile_timeout, build_url,
100 project, factory_properties) 118 project, factory_properties)
101 119
102 # Get the factory command object to create new steps to the factory. 120 # Get the factory command object to create new steps to the factory.
103 # Note - we give '' as build_dir as we use our own build in test tools 121 # Note - we give '' as build_dir as we use our own build in test tools
104 v8_cmd_obj = v8_commands.V8Commands(factory, identifier, 122 v8_cmd_obj = v8_commands.V8Commands(factory, identifier,
105 target, 123 target,
106 '', 124 '',
107 self._target_platform) 125 self._target_platform,
126 target_arch)
127 if factory_properties.get('archive_build'):
128 v8_cmd_obj.AddArchiveBuild(
129 extra_archive_paths=factory_properties.get('extra_archive_paths'))
130
131 if (slave_type == 'Tester'):
132 v8_cmd_obj.AddMoveExtracted()
133
108 # Add all the tests. 134 # Add all the tests.
109 self._AddTests(v8_cmd_obj, tests, mode, factory_properties) 135 self._AddTests(v8_cmd_obj, tests, mode, factory_properties)
110 return factory 136 return factory
OLDNEW
« scripts/master/factory/v8_commands.py ('K') | « scripts/master/factory/v8_commands.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698