| OLD | NEW |
| 1 #!/usr/bin/env python | 1 #!/usr/bin/env python |
| 2 # Copyright (c) 2013 The Chromium Authors. All rights reserved. | 2 # Copyright (c) 2013 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 import json | 6 import json |
| 7 import optparse | 7 import optparse |
| 8 import os | 8 import os |
| 9 import re | 9 import re |
| 10 import sys | 10 import sys |
| (...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 111 # Add some dummy directories so build_projects doesn't complain... | 111 # Add some dummy directories so build_projects doesn't complain... |
| 112 buildbot_common.MakeDir(os.path.join(app_dir, 'tools')) | 112 buildbot_common.MakeDir(os.path.join(app_dir, 'tools')) |
| 113 buildbot_common.MakeDir(os.path.join(app_dir, 'toolchain')) | 113 buildbot_common.MakeDir(os.path.join(app_dir, 'toolchain')) |
| 114 | 114 |
| 115 config = 'Release' | 115 config = 'Release' |
| 116 | 116 |
| 117 filters = {} | 117 filters = {} |
| 118 filters['DISABLE_PACKAGE'] = False | 118 filters['DISABLE_PACKAGE'] = False |
| 119 filters['EXPERIMENTAL'] = False | 119 filters['EXPERIMENTAL'] = False |
| 120 filters['TOOLS'] = toolchains | 120 filters['TOOLS'] = toolchains |
| 121 filters['DEST'] = ['examples/api', 'examples/getting_started', | 121 filters['DEST'] = ['examples/api', 'examples/benchmarks', |
| 122 'examples/demo', 'examples/tutorial'] | 122 'examples/getting_started', 'examples/demo', |
| 123 'examples/tutorial'] |
| 123 tree = parse_dsc.LoadProjectTree(SDK_SRC_DIR, include=filters) | 124 tree = parse_dsc.LoadProjectTree(SDK_SRC_DIR, include=filters) |
| 124 build_projects.UpdateHelpers(app_dir, clobber=True) | 125 build_projects.UpdateHelpers(app_dir, clobber=True) |
| 125 build_projects.UpdateProjects(app_dir, tree, clobber=False, | 126 build_projects.UpdateProjects(app_dir, tree, clobber=False, |
| 126 toolchains=toolchains, configs=[config], | 127 toolchains=toolchains, configs=[config], |
| 127 first_toolchain=True) | 128 first_toolchain=True) |
| 128 | 129 |
| 129 # Collect permissions from each example, and aggregate them. | 130 # Collect permissions from each example, and aggregate them. |
| 130 def MergeLists(list1, list2): | 131 def MergeLists(list1, list2): |
| 131 return list1 + [x for x in list2 if x not in list1] | 132 return list1 + [x for x in list2 if x not in list1] |
| 132 all_permissions = [] | 133 all_permissions = [] |
| (...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 174 | 175 |
| 175 app_zip = os.path.join(app_dir, 'examples.zip') | 176 app_zip = os.path.join(app_dir, 'examples.zip') |
| 176 os.chdir(app_examples_dir) | 177 os.chdir(app_examples_dir) |
| 177 oshelpers.Zip([app_zip, '-r', '*']) | 178 oshelpers.Zip([app_zip, '-r', '*']) |
| 178 | 179 |
| 179 return 0 | 180 return 0 |
| 180 | 181 |
| 181 | 182 |
| 182 if __name__ == '__main__': | 183 if __name__ == '__main__': |
| 183 sys.exit(main(sys.argv)) | 184 sys.exit(main(sys.argv)) |
| OLD | NEW |