OLD | NEW |
1 #!/usr/bin/python | 1 #!/usr/bin/python |
2 | 2 |
3 # Copyright 2016 Google Inc. | 3 # Copyright 2016 Google Inc. |
4 # | 4 # |
5 # Use of this source code is governed by a BSD-style license that can be | 5 # Use of this source code is governed by a BSD-style license that can be |
6 # found in the LICENSE file. | 6 # found in the LICENSE file. |
7 | 7 |
8 | 8 |
9 """ | 9 """ |
10 Script to build the command buffer shared library and copy it to Skia tree | 10 Script to build the command buffer shared library and copy it to Skia tree |
(...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
107 shared_lib_subdir = '' | 107 shared_lib_subdir = '' |
108 gclient = 'gclient.bat' | 108 gclient = 'gclient.bat' |
109 | 109 |
110 if not args.no_sync: | 110 if not args.no_sync: |
111 try: | 111 try: |
112 subprocess.check_call(['git', 'fetch'], cwd=chrome_src_dir) | 112 subprocess.check_call(['git', 'fetch'], cwd=chrome_src_dir) |
113 except subprocess.CalledProcessError as error: | 113 except subprocess.CalledProcessError as error: |
114 sys.exit('Error (ret code: %s) calling "%s" in %s' % (error.returncode, | 114 sys.exit('Error (ret code: %s) calling "%s" in %s' % (error.returncode, |
115 error.cmd, chrome_src_dir)) | 115 error.cmd, chrome_src_dir)) |
116 | 116 |
117 try: | 117 try: |
118 subprocess.check_call(['git', 'checkout', args.chrome_revision], | 118 subprocess.check_call(['git', 'checkout', args.chrome_revision], |
119 cwd=chrome_src_dir) | 119 cwd=chrome_src_dir) |
120 except subprocess.CalledProcessError as error: | 120 except subprocess.CalledProcessError as error: |
121 sys.exit('Error (ret code: %s) calling "%s" in %s' % (error.returncode, | 121 sys.exit('Error (ret code: %s) calling "%s" in %s' % (error.returncode, |
122 error.cmd, chrome_src_dir)) | 122 error.cmd, chrome_src_dir)) |
123 | 123 |
124 if not args.no_sync: | |
125 try: | 124 try: |
126 os.environ['GYP_GENERATORS'] = 'ninja' | 125 os.environ['GYP_GENERATORS'] = 'ninja' |
127 subprocess.check_call([gclient, 'sync', '--reset', '--force'], | 126 subprocess.check_call([gclient, 'sync', '--reset', '--force'], |
128 cwd=chrome_src_dir) | 127 cwd=chrome_src_dir) |
129 except subprocess.CalledProcessError as error: | 128 except subprocess.CalledProcessError as error: |
130 sys.exit('Error (ret code: %s) calling "%s" in %s' % (error.returncode, | 129 sys.exit('Error (ret code: %s) calling "%s" in %s' % (error.returncode, |
131 error.cmd, chrome_src_dir)) | 130 error.cmd, chrome_src_dir)) |
132 | 131 |
133 try: | 132 try: |
134 subprocess.check_call(['ninja'] + shlex.split(args.extra_ninja_args) + | 133 subprocess.check_call(['ninja'] + shlex.split(args.extra_ninja_args) + |
(...skipping 21 matching lines...) Expand all Loading... |
156 | 155 |
157 if not os.path.isfile(shared_lib_dst): | 156 if not os.path.isfile(shared_lib_dst): |
158 sys.exit('Command buffer library not copied to ' + shared_lib_dst) | 157 sys.exit('Command buffer library not copied to ' + shared_lib_dst) |
159 | 158 |
160 print('Command buffer library copied to ' + shared_lib_dst) | 159 print('Command buffer library copied to ' + shared_lib_dst) |
161 | 160 |
162 | 161 |
163 if __name__ == '__main__': | 162 if __name__ == '__main__': |
164 main() | 163 main() |
165 | 164 |
OLD | NEW |