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

Side by Side Diff: native_client_sdk/src/build_tools/buildbot_run.py

Issue 1486003004: Revert of [NaCl SDK] Remove support for bionic toolchain (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years 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
OLDNEW
1 #!/usr/bin/env python 1 #!/usr/bin/env python
2 # Copyright (c) 2012 The Chromium Authors. All rights reserved. 2 # Copyright (c) 2012 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 """Main entry point for the NaCl SDK buildbot. 6 """Main entry point for the NaCl SDK buildbot.
7 7
8 The entry point used to be build_sdk.py itself, but we want 8 The entry point used to be build_sdk.py itself, but we want
9 to be able to simplify build_sdk (for example separating out 9 to be able to simplify build_sdk (for example separating out
10 the test code into test_sdk) and change its default behaviour 10 the test code into test_sdk) and change its default behaviour
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
56 subst_drive = 'S:' 56 subst_drive = 'S:'
57 root_dir = os.path.dirname(SRC_DIR) 57 root_dir = os.path.dirname(SRC_DIR)
58 new_root_dir = subst_drive + '\\' 58 new_root_dir = subst_drive + '\\'
59 subprocess.check_call(['subst', subst_drive, root_dir]) 59 subprocess.check_call(['subst', subst_drive, root_dir])
60 new_script_dir = os.path.join(new_root_dir, 60 new_script_dir = os.path.join(new_root_dir,
61 os.path.relpath(SCRIPT_DIR, root_dir)) 61 os.path.relpath(SCRIPT_DIR, root_dir))
62 else: 62 else:
63 new_script_dir = SCRIPT_DIR 63 new_script_dir = SCRIPT_DIR
64 64
65 args = [sys.executable, 'build_sdk.py'] 65 args = [sys.executable, 'build_sdk.py']
66 if 'bionic' in os.getenv('BUILDBOT_BUILDERNAME', ''):
67 args.append('--bionic')
66 68
67 try: 69 try:
68 Run(args, cwd=new_script_dir) 70 Run(args, cwd=new_script_dir)
69 finally: 71 finally:
70 if is_win: 72 if is_win:
71 subprocess.check_call(['subst', '/D', subst_drive]) 73 subprocess.check_call(['subst', '/D', subst_drive])
72 74
73 75
74 def StepTestSDK(): 76 def StepTestSDK():
75 cmd = [] 77 cmd = []
76 if getos.GetPlatform() == 'linux': 78 if getos.GetPlatform() == 'linux':
77 # Run all of test_sdk.py under xvfb-run; it's startup time leaves something 79 # Run all of test_sdk.py under xvfb-run; it's startup time leaves something
78 # to be desired, so only start it up once. 80 # to be desired, so only start it up once.
79 # We also need to make sure that there are at least 24 bits per pixel. 81 # We also need to make sure that there are at least 24 bits per pixel.
80 # https://code.google.com/p/chromium/issues/detail?id=316687 82 # https://code.google.com/p/chromium/issues/detail?id=316687
81 cmd.extend([ 83 cmd.extend([
82 'xvfb-run', 84 'xvfb-run',
83 '--auto-servernum', 85 '--auto-servernum',
84 '--server-args', '-screen 0 1024x768x24' 86 '--server-args', '-screen 0 1024x768x24'
85 ]) 87 ])
86 88
87 cmd.extend([sys.executable, 'test_sdk.py']) 89 cmd.extend([sys.executable, 'test_sdk.py'])
90
91 # TODO(noelallen): crbug 386332
92 # For Bionic SDK, only build do a build test until we have hardware.
93 if 'bionic' in os.getenv('BUILDBOT_BUILDERNAME', ''):
94 cmd.extend(['build_examples', 'copy_tests', 'build_tests'])
88 Run(cmd, cwd=SCRIPT_DIR) 95 Run(cmd, cwd=SCRIPT_DIR)
89 96
90 97
91 def main(args): 98 def main(args):
92 # Don't write out .pyc files in the source tree. Without this, incremental 99 # Don't write out .pyc files in the source tree. Without this, incremental
93 # builds can fail when .py files are moved/deleted, since python could load 100 # builds can fail when .py files are moved/deleted, since python could load
94 # orphaned .pyc files generated by a previous run. 101 # orphaned .pyc files generated by a previous run.
95 os.environ['PYTHONDONTWRITEBYTECODE'] = '1' 102 os.environ['PYTHONDONTWRITEBYTECODE'] = '1'
96 103
97 parser = argparse.ArgumentParser(description=__doc__) 104 parser = argparse.ArgumentParser(description=__doc__)
(...skipping 20 matching lines...) Expand all
118 StepTestSDK() 125 StepTestSDK()
119 126
120 return 0 127 return 0
121 128
122 129
123 if __name__ == '__main__': 130 if __name__ == '__main__':
124 try: 131 try:
125 sys.exit(main(sys.argv[1:])) 132 sys.exit(main(sys.argv[1:]))
126 except KeyboardInterrupt: 133 except KeyboardInterrupt:
127 buildbot_common.ErrorExit('buildbot_run: interrupted') 134 buildbot_common.ErrorExit('buildbot_run: interrupted')
OLDNEW
« no previous file with comments | « native_client_sdk/src/build_tools/buildbot_common.py ('k') | native_client_sdk/src/build_tools/json/naclsdk_manifest2.json » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698