| OLD | NEW |
| 1 #!/usr/bin/python | 1 #!/usr/bin/python |
| 2 # Copyright (c) 2011 The Native Client Authors. All rights reserved. | 2 # Copyright (c) 2011 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 83 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 94 # The branch is set to native_client on the main bots, on the trybots it's | 94 # The branch is set to native_client on the main bots, on the trybots it's |
| 95 # set to ''. Otherwise, we should assume a particular branch is being used. | 95 # set to ''. Otherwise, we should assume a particular branch is being used. |
| 96 context['branch'] = os.environ.get('BUILDBOT_BRANCH', 'native_client') | 96 context['branch'] = os.environ.get('BUILDBOT_BRANCH', 'native_client') |
| 97 context['off_trunk'] = context['branch'] not in ['native_client', ''] | 97 context['off_trunk'] = context['branch'] not in ['native_client', ''] |
| 98 | 98 |
| 99 | 99 |
| 100 def BuildScript(status, context): | 100 def BuildScript(status, context): |
| 101 inside_toolchain = context['inside_toolchain'] | 101 inside_toolchain = context['inside_toolchain'] |
| 102 # When off the trunk, we don't have anywhere to get Chrome binaries | 102 # When off the trunk, we don't have anywhere to get Chrome binaries |
| 103 # from the appropriate branch, so we can't test the right Chrome. | 103 # from the appropriate branch, so we can't test the right Chrome. |
| 104 do_integration_tests = (not context['use_glibc'] and | 104 do_integration_tests = (not inside_toolchain and |
| 105 not inside_toolchain and | |
| 106 not context['off_trunk']) | 105 not context['off_trunk']) |
| 107 do_dso_tests = (context['use_glibc'] and | 106 do_dso_tests = (context['use_glibc'] and |
| 108 not inside_toolchain and | 107 not inside_toolchain and |
| 109 not context['off_trunk']) | 108 not context['off_trunk']) |
| 110 | 109 |
| 111 # If we're running browser tests on a 64-bit Windows machine, build a 32-bit | 110 # If we're running browser tests on a 64-bit Windows machine, build a 32-bit |
| 112 # plugin. | 111 # plugin. |
| 113 need_plugin_32 = (context.Windows() and | 112 need_plugin_32 = (context.Windows() and |
| 114 context['bits'] == '64' and | 113 context['bits'] == '64' and |
| 115 not inside_toolchain) | 114 not inside_toolchain) |
| (...skipping 127 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 243 SCons( | 242 SCons( |
| 244 context, | 243 context, |
| 245 browser_test=True, | 244 browser_test=True, |
| 246 args=['force_ppapi_plugin=' + plugin, | 245 args=['force_ppapi_plugin=' + plugin, |
| 247 'force_sel_ldr=' + sel_ldr, | 246 'force_sel_ldr=' + sel_ldr, |
| 248 'SILENT=1', | 247 'SILENT=1', |
| 249 'chrome_browser_tests']) | 248 'chrome_browser_tests']) |
| 250 | 249 |
| 251 # TODO(mcgrathr): Clean up how we organize tests and do this differently. | 250 # TODO(mcgrathr): Clean up how we organize tests and do this differently. |
| 252 # See http://code.google.com/p/nativeclient/issues/detail?id=1691 | 251 # See http://code.google.com/p/nativeclient/issues/detail?id=1691 |
| 253 with Step('chrome_browser_tests without IRT', status, halt_on_fail=False): | 252 if not do_dso_tests: |
| 254 SCons(context, browser_test=True, | 253 with Step('chrome_browser_tests without IRT', status, halt_on_fail=False): |
| 255 args=['SILENT=1', 'irt=0', 'chrome_browser_tests']) | 254 SCons(context, browser_test=True, |
| 255 args=['SILENT=1', 'irt=0', 'chrome_browser_tests']) |
| 256 | 256 |
| 257 with Step('pyauto_tests', status, halt_on_fail=False): | 257 with Step('pyauto_tests', status, halt_on_fail=False): |
| 258 SCons(context, browser_test=True, args=['SILENT=1', 'pyauto_tests']) | 258 SCons(context, browser_test=True, args=['SILENT=1', 'pyauto_tests']) |
| 259 | 259 |
| 260 if do_dso_tests: | 260 if do_dso_tests: |
| 261 with Step('dynamic_library_browser_tests', status, halt_on_fail=False): | 261 with Step('dynamic_library_browser_tests', status, halt_on_fail=False): |
| 262 SCons(context, browser_test=True, | 262 SCons(context, browser_test=True, |
| 263 args=['SILENT=1', 'dynamic_library_browser_tests']) | 263 args=['SILENT=1', 'dynamic_library_browser_tests']) |
| 264 | 264 |
| 265 # IRT is incompatible with glibc startup hacks. | 265 # IRT is incompatible with glibc startup hacks. |
| (...skipping 29 matching lines...) Expand all Loading... |
| 295 SetupLinuxEnvironment(context) | 295 SetupLinuxEnvironment(context) |
| 296 elif context.Mac(): | 296 elif context.Mac(): |
| 297 SetupMacEnvironment(context) | 297 SetupMacEnvironment(context) |
| 298 else: | 298 else: |
| 299 raise Exception("Unsupported platform.") | 299 raise Exception("Unsupported platform.") |
| 300 RunBuild(BuildScript, status, context) | 300 RunBuild(BuildScript, status, context) |
| 301 | 301 |
| 302 | 302 |
| 303 if __name__ == '__main__': | 303 if __name__ == '__main__': |
| 304 Main() | 304 Main() |
| OLD | NEW |