OLD | NEW |
1 #!/usr/bin/env python | 1 #!/usr/bin/env python |
2 # Copyright 2015 The Chromium Authors. All rights reserved. | 2 # Copyright 2015 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 argparse | 6 import argparse |
7 import logging | 7 import logging |
8 import os | 8 import os |
9 import subprocess | 9 import subprocess |
10 import sys | 10 import sys |
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
98 _logger.debug('_build()') | 98 _logger.debug('_build()') |
99 retcode = _run_build(_linux_out_dir(args)) | 99 retcode = _run_build(_linux_out_dir(args)) |
100 if retcode != 0: | 100 if retcode != 0: |
101 return retcode | 101 return retcode |
102 return _run_build(_android_out_dir(args)) | 102 return _run_build(_android_out_dir(args)) |
103 | 103 |
104 # Unused argument - pylint: disable=W0613 | 104 # Unused argument - pylint: disable=W0613 |
105 def _test(args): | 105 def _test(args): |
106 _logger.debug('_test()') | 106 _logger.debug('_test()') |
107 # TODO(jamesr): Run tests on android too | 107 # TODO(jamesr): Run tests on android too |
108 out_dir = 'out/Release' | 108 out_dir = _linux_out_dir(args) |
109 return subprocess.call([os.path.join(out_dir, 'mojo_shell'), | 109 return subprocess.call([os.path.join(out_dir, 'mojo_shell'), |
110 'mojo:network_service_apptests']) | 110 'mojo:network_service_apptests']) |
111 | 111 |
112 def _upload(args): | 112 def _upload(args): |
113 if args.debug: | 113 if args.debug: |
114 print "Only upload release binaries (for now)" | 114 print "Only upload release binaries (for now)" |
115 return 1 | 115 return 1 |
116 base_command = ['tools/upload_service.py', | 116 base_command = ['tools/upload_service.py', |
117 '--linux-x64-binary-dir', _linux_out_dir(args), | 117 '--linux-x64-binary-dir', _linux_out_dir(args), |
118 '--android-arm-binary-dir', _android_out_dir(args)] | 118 '--android-arm-binary-dir', _android_out_dir(args)] |
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
172 help='Dry run (prints what it would upload but does not actually upload)', | 172 help='Dry run (prints what it would upload but does not actually upload)', |
173 action='store_true') | 173 action='store_true') |
174 upload_parser.set_defaults(func=_upload) | 174 upload_parser.set_defaults(func=_upload) |
175 | 175 |
176 args = parser.parse_args() | 176 args = parser.parse_args() |
177 _init_logging(args.verbose_count) | 177 _init_logging(args.verbose_count) |
178 return args.func(args) | 178 return args.func(args) |
179 | 179 |
180 if __name__ == '__main__': | 180 if __name__ == '__main__': |
181 sys.exit(main()) | 181 sys.exit(main()) |
OLD | NEW |