OLD | NEW |
1 #!/usr/bin/python | 1 #!/usr/bin/python |
2 # Copyright (c) 2012 The Native Client Authors. All rights reserved. | 2 # Copyright (c) 2012 The Native Client 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 # Enable 'with' statements in Python 2.5 | 6 # Enable 'with' statements in Python 2.5 |
7 from __future__ import with_statement | 7 from __future__ import with_statement |
8 | 8 |
9 import os.path | 9 import os.path |
10 import re | 10 import re |
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
97 def SetupContextVars(context): | 97 def SetupContextVars(context): |
98 # The branch is set to native_client on the main bots, on the trybots it's | 98 # The branch is set to native_client on the main bots, on the trybots it's |
99 # set to ''. Otherwise, we should assume a particular branch is being used. | 99 # set to ''. Otherwise, we should assume a particular branch is being used. |
100 context['branch'] = os.environ.get('BUILDBOT_BRANCH', 'native_client') | 100 context['branch'] = os.environ.get('BUILDBOT_BRANCH', 'native_client') |
101 context['off_trunk'] = context['branch'] not in ['native_client', ''] | 101 context['off_trunk'] = context['branch'] not in ['native_client', ''] |
102 | 102 |
103 | 103 |
104 def ValidatorTest(context, architecture, validator): | 104 def ValidatorTest(context, architecture, validator): |
105 Command(context, | 105 Command(context, |
106 cmd=[sys.executable, | 106 cmd=[sys.executable, |
107 'tests/validator_regression/validator_regression_test.py', | 107 'tests/abi_corpus/validator_regression_test.py', |
108 '--keep-going', | 108 '--keep-going', |
109 '--validator', validator, | 109 '--validator', validator, |
110 '--arch', architecture]) | 110 '--arch', architecture]) |
111 | 111 |
112 | 112 |
113 def BuildScript(status, context): | 113 def BuildScript(status, context): |
114 inside_toolchain = context['inside_toolchain'] | 114 inside_toolchain = context['inside_toolchain'] |
115 # When off the trunk, we don't have anywhere to get Chrome binaries | 115 # When off the trunk, we don't have anywhere to get Chrome binaries |
116 # from the appropriate branch, so we can't test the right Chrome. | 116 # from the appropriate branch, so we can't test the right Chrome. |
117 do_integration_tests = (not inside_toolchain and | 117 do_integration_tests = (not inside_toolchain and |
(...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
223 with Step('clobber ragel_validator', status): | 223 with Step('clobber ragel_validator', status): |
224 Command(context, cmd=['make', 'clean'], | 224 Command(context, cmd=['make', 'clean'], |
225 cwd='src/trusted/validator_ragel/unreviewed') | 225 cwd='src/trusted/validator_ragel/unreviewed') |
226 with Step('build ragel_validator', status): | 226 with Step('build ragel_validator', status): |
227 Command(context, cmd=['make'], | 227 Command(context, cmd=['make'], |
228 cwd='src/trusted/validator_ragel/unreviewed') | 228 cwd='src/trusted/validator_ragel/unreviewed') |
229 | 229 |
230 with Step('predownload validator corpus', status): | 230 with Step('predownload validator corpus', status): |
231 Command(context, | 231 Command(context, |
232 cmd=[sys.executable, | 232 cmd=[sys.executable, |
233 'tests/validator_regression/validator_regression_test.py', | 233 'tests/abi_corpus/validator_regression_test.py', |
234 '--download-only']) | 234 '--download-only']) |
235 | 235 |
236 with Step('validator_regression_test current x86-32', status, | 236 with Step('validator_regression_test current x86-32', status, |
237 halt_on_fail=False): | 237 halt_on_fail=False): |
238 ValidatorTest( | 238 ValidatorTest( |
239 context, 'x86-32', 'scons-out/opt-linux-x86-32/staging/ncval') | 239 context, 'x86-32', 'scons-out/opt-linux-x86-32/staging/ncval') |
240 with Step('validator_regression_test current x86-64', status, | 240 with Step('validator_regression_test current x86-64', status, |
241 halt_on_fail=False): | 241 halt_on_fail=False): |
242 ValidatorTest( | 242 ValidatorTest( |
243 context, 'x86-64', 'scons-out/opt-linux-x86-64/staging/ncval') | 243 context, 'x86-64', 'scons-out/opt-linux-x86-64/staging/ncval') |
(...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
354 SetupLinuxEnvironment(context) | 354 SetupLinuxEnvironment(context) |
355 elif context.Mac(): | 355 elif context.Mac(): |
356 SetupMacEnvironment(context) | 356 SetupMacEnvironment(context) |
357 else: | 357 else: |
358 raise Exception("Unsupported platform.") | 358 raise Exception("Unsupported platform.") |
359 RunBuild(BuildScript, status) | 359 RunBuild(BuildScript, status) |
360 | 360 |
361 | 361 |
362 if __name__ == '__main__': | 362 if __name__ == '__main__': |
363 Main() | 363 Main() |
OLD | NEW |