Caroline Tice | f6ef439 | 2017-04-06 17:16:05 -0700 | [diff] [blame] | 1 | #!/usr/bin/env python2 |
raymes | 5154d7f | 2013-02-15 04:35:37 +0000 | [diff] [blame] | 2 | # |
| 3 | # Copyright 2010 Google Inc. All Rights Reserved. |
raymes | 5154d7f | 2013-02-15 04:35:37 +0000 | [diff] [blame] | 4 | """Script to checkout the ChromeOS source. |
| 5 | |
| 6 | This script sets up the ChromeOS source in the given directory, matching a |
| 7 | particular release of ChromeOS. |
| 8 | """ |
| 9 | |
Caroline Tice | 88272d4 | 2016-01-13 09:48:29 -0800 | [diff] [blame] | 10 | from __future__ import print_function |
| 11 | |
Luis Lozano | f2a3ef4 | 2015-12-15 13:49:30 -0800 | [diff] [blame] | 12 | __author__ = ('asharif@google.com (Ahmad Sharif) ' |
| 13 | 'llozano@google.com (Luis Lozano) ' |
| 14 | 'raymes@google.com (Raymes Khoury) ' |
| 15 | 'shenhan@google.com (Han Shen)') |
raymes | 5154d7f | 2013-02-15 04:35:37 +0000 | [diff] [blame] | 16 | |
Caroline Tice | 88272d4 | 2016-01-13 09:48:29 -0800 | [diff] [blame] | 17 | import argparse |
raymes | 5154d7f | 2013-02-15 04:35:37 +0000 | [diff] [blame] | 18 | import os |
| 19 | import sys |
kbaclawski | 20082a0 | 2013-02-16 02:12:57 +0000 | [diff] [blame] | 20 | |
Caroline Tice | 88272d4 | 2016-01-13 09:48:29 -0800 | [diff] [blame] | 21 | from cros_utils import command_executer |
| 22 | from cros_utils import logger |
| 23 | from cros_utils import misc |
raymes | 5154d7f | 2013-02-15 04:35:37 +0000 | [diff] [blame] | 24 | |
asharif | e3668f1 | 2013-02-15 04:46:29 +0000 | [diff] [blame] | 25 | |
raymes | 5154d7f | 2013-02-15 04:35:37 +0000 | [diff] [blame] | 26 | def Usage(parser, message): |
Caroline Tice | 88272d4 | 2016-01-13 09:48:29 -0800 | [diff] [blame] | 27 | print('ERROR: %s' % message) |
raymes | 5154d7f | 2013-02-15 04:35:37 +0000 | [diff] [blame] | 28 | parser.print_help() |
| 29 | sys.exit(0) |
| 30 | |
asharif | e3668f1 | 2013-02-15 04:46:29 +0000 | [diff] [blame] | 31 | |
bjanakiraman | 6496e5f | 2013-02-15 04:50:58 +0000 | [diff] [blame] | 32 | def Main(argv): |
raymes | 5154d7f | 2013-02-15 04:35:37 +0000 | [diff] [blame] | 33 | """Build ChromeOS.""" |
| 34 | # Common initializations |
asharif | 5a9bb46 | 2013-02-15 04:50:57 +0000 | [diff] [blame] | 35 | cmd_executer = command_executer.GetCommandExecuter() |
raymes | 5154d7f | 2013-02-15 04:35:37 +0000 | [diff] [blame] | 36 | |
Caroline Tice | 88272d4 | 2016-01-13 09:48:29 -0800 | [diff] [blame] | 37 | parser = argparse.ArgumentParser() |
Caroline Tice | f6ef439 | 2017-04-06 17:16:05 -0700 | [diff] [blame] | 38 | parser.add_argument( |
| 39 | '--chromeos_root', |
| 40 | dest='chromeos_root', |
| 41 | help='Target directory for ChromeOS installation.') |
| 42 | parser.add_argument( |
| 43 | '--clobber_chroot', |
| 44 | dest='clobber_chroot', |
| 45 | action='store_true', |
| 46 | help='Delete the chroot and start fresh', |
| 47 | default=False) |
| 48 | parser.add_argument( |
| 49 | '--clobber_board', |
| 50 | dest='clobber_board', |
| 51 | action='store_true', |
| 52 | help='Delete the board and start fresh', |
| 53 | default=False) |
| 54 | parser.add_argument( |
| 55 | '--rebuild', |
| 56 | dest='rebuild', |
| 57 | action='store_true', |
| 58 | help='Rebuild all board packages except the toolchain.', |
| 59 | default=False) |
| 60 | parser.add_argument( |
| 61 | '--cflags', |
| 62 | dest='cflags', |
| 63 | default='', |
| 64 | help='CFLAGS for the ChromeOS packages') |
| 65 | parser.add_argument( |
| 66 | '--cxxflags', |
| 67 | dest='cxxflags', |
| 68 | default='', |
| 69 | help='CXXFLAGS for the ChromeOS packages') |
| 70 | parser.add_argument( |
| 71 | '--ldflags', |
| 72 | dest='ldflags', |
| 73 | default='', |
| 74 | help='LDFLAGS for the ChromeOS packages') |
| 75 | parser.add_argument( |
| 76 | '--board', dest='board', help='ChromeOS target board, e.g. x86-generic') |
| 77 | parser.add_argument( |
| 78 | '--package', dest='package', help='The package needs to be built') |
| 79 | parser.add_argument( |
| 80 | '--label', |
| 81 | dest='label', |
| 82 | help='Optional label symlink to point to build dir.') |
| 83 | parser.add_argument( |
| 84 | '--dev', |
| 85 | dest='dev', |
| 86 | default=False, |
| 87 | action='store_true', |
| 88 | help=('Make the final image in dev mode (eg writable, ' |
| 89 | 'more space on image). Defaults to False.')) |
| 90 | parser.add_argument( |
| 91 | '--debug', |
| 92 | dest='debug', |
| 93 | default=False, |
| 94 | action='store_true', |
| 95 | help=("Optional. Build chrome browser with \"-g -O0\". " |
| 96 | "Notice, this also turns on \'--dev\'. " |
| 97 | 'Defaults to False.')) |
| 98 | parser.add_argument( |
| 99 | '--env', dest='env', default='', help='Env to pass to build_packages.') |
| 100 | parser.add_argument( |
| 101 | '--vanilla', |
| 102 | dest='vanilla', |
| 103 | default=False, |
| 104 | action='store_true', |
| 105 | help='Use default ChromeOS toolchain.') |
| 106 | parser.add_argument( |
| 107 | '--vanilla_image', |
| 108 | dest='vanilla_image', |
| 109 | default=False, |
| 110 | action='store_true', |
| 111 | help=('Use prebuild packages for building the image. ' |
| 112 | 'It also implies the --vanilla option is set.')) |
raymes | 5154d7f | 2013-02-15 04:35:37 +0000 | [diff] [blame] | 113 | |
Caroline Tice | 88272d4 | 2016-01-13 09:48:29 -0800 | [diff] [blame] | 114 | options = parser.parse_args(argv[1:]) |
raymes | 5154d7f | 2013-02-15 04:35:37 +0000 | [diff] [blame] | 115 | |
| 116 | if options.chromeos_root is None: |
Luis Lozano | f2a3ef4 | 2015-12-15 13:49:30 -0800 | [diff] [blame] | 117 | Usage(parser, '--chromeos_root must be set') |
Luis Lozano | 09b027f | 2015-03-30 13:29:49 -0700 | [diff] [blame] | 118 | options.chromeos_root = os.path.expanduser(options.chromeos_root) |
| 119 | scripts_dir = os.path.join(options.chromeos_root, 'src', 'scripts') |
| 120 | if not os.path.isdir(scripts_dir): |
Luis Lozano | f2a3ef4 | 2015-12-15 13:49:30 -0800 | [diff] [blame] | 121 | Usage(parser, '--chromeos_root must be set up first. Use setup_chromeos.py') |
raymes | 5154d7f | 2013-02-15 04:35:37 +0000 | [diff] [blame] | 122 | |
raymes | 5154d7f | 2013-02-15 04:35:37 +0000 | [diff] [blame] | 123 | if options.board is None: |
Luis Lozano | f2a3ef4 | 2015-12-15 13:49:30 -0800 | [diff] [blame] | 124 | Usage(parser, '--board must be set') |
raymes | 5154d7f | 2013-02-15 04:35:37 +0000 | [diff] [blame] | 125 | |
shenhan | 4873858 | 2013-02-19 22:45:41 +0000 | [diff] [blame] | 126 | if options.debug: |
| 127 | options.dev = True |
| 128 | |
asharif | 4447378 | 2013-02-19 19:58:15 +0000 | [diff] [blame] | 129 | build_packages_env = options.env |
shenhan | 4873858 | 2013-02-19 22:45:41 +0000 | [diff] [blame] | 130 | if build_packages_env.find('EXTRA_BOARD_FLAGS=') != -1: |
| 131 | logger.GetLogger().LogFatal( |
Luis Lozano | f2a3ef4 | 2015-12-15 13:49:30 -0800 | [diff] [blame] | 132 | ('Passing "EXTRA_BOARD_FLAGS" in "--env" is not supported. ' |
| 133 | 'This flags is used internally by this script. ' |
| 134 | 'Contact the author for more detail.')) |
shenhan | 4873858 | 2013-02-19 22:45:41 +0000 | [diff] [blame] | 135 | |
asharif | 80b47dc | 2013-02-15 06:31:19 +0000 | [diff] [blame] | 136 | if options.rebuild == True: |
Luis Lozano | f2a3ef4 | 2015-12-15 13:49:30 -0800 | [diff] [blame] | 137 | build_packages_env += ' EXTRA_BOARD_FLAGS=-e' |
llozano | 3a42892 | 2013-02-19 21:36:47 +0000 | [diff] [blame] | 138 | # EXTRA_BOARD_FLAGS=-e should clean up the object files for the chrome |
| 139 | # browser but it doesn't. So do it here. |
| 140 | misc.RemoveChromeBrowserObjectFiles(options.chromeos_root, options.board) |
asharif | 80b47dc | 2013-02-15 06:31:19 +0000 | [diff] [blame] | 141 | |
Luis Lozano | 09b027f | 2015-03-30 13:29:49 -0700 | [diff] [blame] | 142 | # Build with afdo_use by default. |
| 143 | # To change the default use --env="USE=-afdo_use". |
| 144 | build_packages_env = misc.MergeEnvStringWithDict( |
Luis A. Lozano | 09ce67b | 2017-06-15 17:57:49 -0700 | [diff] [blame^] | 145 | build_packages_env, {'USE': 'chrome_internal afdo_use -cros-debug'}) |
asharif | 01e29a5 | 2013-02-15 04:56:41 +0000 | [diff] [blame] | 146 | |
shenhan | 4873858 | 2013-02-19 22:45:41 +0000 | [diff] [blame] | 147 | build_packages_command = misc.GetBuildPackagesCommand( |
Caroline Tice | f6ef439 | 2017-04-06 17:16:05 -0700 | [diff] [blame] | 148 | board=options.board, usepkg=options.vanilla_image, debug=options.debug) |
yunlian | 5acba6e | 2013-02-19 22:34:37 +0000 | [diff] [blame] | 149 | |
| 150 | if options.package: |
Luis Lozano | f2a3ef4 | 2015-12-15 13:49:30 -0800 | [diff] [blame] | 151 | build_packages_command += ' {0}'.format(options.package) |
yunlian | 5acba6e | 2013-02-19 22:34:37 +0000 | [diff] [blame] | 152 | |
shenhan | 4873858 | 2013-02-19 22:45:41 +0000 | [diff] [blame] | 153 | build_image_command = misc.GetBuildImageCommand(options.board, options.dev) |
asharif | ca8c5ef | 2013-02-15 04:57:02 +0000 | [diff] [blame] | 154 | |
Yunlian Jiang | d145a58 | 2013-08-19 13:59:34 -0700 | [diff] [blame] | 155 | if options.vanilla or options.vanilla_image: |
Caroline Tice | f6ef439 | 2017-04-06 17:16:05 -0700 | [diff] [blame] | 156 | command = misc.GetSetupBoardCommand( |
| 157 | options.board, |
| 158 | usepkg=options.vanilla_image, |
| 159 | force=options.clobber_board) |
Luis Lozano | f2a3ef4 | 2015-12-15 13:49:30 -0800 | [diff] [blame] | 160 | command += '; ' + build_packages_env + ' ' + build_packages_command |
| 161 | command += '&& ' + build_packages_env + ' ' + build_image_command |
asharif | ca3c6c1 | 2013-02-15 23:17:54 +0000 | [diff] [blame] | 162 | ret = cmd_executer.ChrootRunCommand(options.chromeos_root, command) |
asharif | b1752c8 | 2013-02-15 04:56:37 +0000 | [diff] [blame] | 163 | return ret |
| 164 | |
raymes | 5154d7f | 2013-02-15 04:35:37 +0000 | [diff] [blame] | 165 | # Setup board |
Luis Lozano | f2a3ef4 | 2015-12-15 13:49:30 -0800 | [diff] [blame] | 166 | if not os.path.isdir(options.chromeos_root + '/chroot/build/' + |
| 167 | options.board) or options.clobber_board: |
raymes | 04164a1 | 2013-02-15 04:36:03 +0000 | [diff] [blame] | 168 | # Run build_tc.py from binary package |
Luis Lozano | f2a3ef4 | 2015-12-15 13:49:30 -0800 | [diff] [blame] | 169 | ret = cmd_executer.ChrootRunCommand(options.chromeos_root, |
| 170 | misc.GetSetupBoardCommand( |
| 171 | options.board, |
| 172 | force=options.clobber_board)) |
| 173 | logger.GetLogger().LogFatalIf(ret, 'setup_board failed') |
raymes | 5f35b92 | 2013-02-15 04:35:57 +0000 | [diff] [blame] | 174 | else: |
Luis Lozano | f2a3ef4 | 2015-12-15 13:49:30 -0800 | [diff] [blame] | 175 | logger.GetLogger().LogOutput('Did not setup_board ' |
| 176 | 'because it already exists') |
raymes | bfb5799 | 2013-02-15 04:35:45 +0000 | [diff] [blame] | 177 | |
shenhan | 4873858 | 2013-02-19 22:45:41 +0000 | [diff] [blame] | 178 | if options.debug: |
| 179 | # Perform 2-step build_packages to build a debug chrome browser. |
| 180 | |
| 181 | # Firstly, build everything that chromeos-chrome depends on normally. |
| 182 | if options.rebuild == True: |
| 183 | # Give warning about "--rebuild" and "--debug". Under this combination, |
| 184 | # only dependencies of "chromeos-chrome" get rebuilt. |
| 185 | logger.GetLogger().LogWarning( |
Luis Lozano | f2a3ef4 | 2015-12-15 13:49:30 -0800 | [diff] [blame] | 186 | "\"--rebuild\" does not correctly re-build every package when " |
| 187 | "\"--debug\" is enabled. ") |
shenhan | 4873858 | 2013-02-19 22:45:41 +0000 | [diff] [blame] | 188 | |
| 189 | # Replace EXTRA_BOARD_FLAGS=-e with "-e --onlydeps" |
| 190 | build_packages_env = build_packages_env.replace( |
Luis Lozano | f2a3ef4 | 2015-12-15 13:49:30 -0800 | [diff] [blame] | 191 | 'EXTRA_BOARD_FLAGS=-e', 'EXTRA_BOARD_FLAGS=\"-e --onlydeps\"') |
shenhan | 4873858 | 2013-02-19 22:45:41 +0000 | [diff] [blame] | 192 | else: |
| 193 | build_packages_env += ' EXTRA_BOARD_FLAGS=--onlydeps' |
| 194 | |
| 195 | ret = cmd_executer.ChrootRunCommand( |
Luis Lozano | f2a3ef4 | 2015-12-15 13:49:30 -0800 | [diff] [blame] | 196 | options.chromeos_root, "CFLAGS=\"$(portageq-%s envvar CFLAGS) %s\" " |
| 197 | "CXXFLAGS=\"$(portageq-%s envvar CXXFLAGS) %s\" " |
| 198 | "LDFLAGS=\"$(portageq-%s envvar LDFLAGS) %s\" " |
| 199 | 'CHROME_ORIGIN=SERVER_SOURCE ' |
| 200 | '%s ' |
| 201 | '%s --skip_chroot_upgrade' |
| 202 | 'chromeos-chrome' % (options.board, options.cflags, options.board, |
| 203 | options.cxxflags, options.board, options.ldflags, |
| 204 | build_packages_env, build_packages_command)) |
shenhan | 4873858 | 2013-02-19 22:45:41 +0000 | [diff] [blame] | 205 | |
| 206 | logger.GetLogger().LogFatalIf(\ |
Luis Lozano | f2a3ef4 | 2015-12-15 13:49:30 -0800 | [diff] [blame] | 207 | ret, 'build_packages failed while trying to build chromeos-chrome deps.') |
shenhan | 4873858 | 2013-02-19 22:45:41 +0000 | [diff] [blame] | 208 | |
| 209 | # Secondly, build chromeos-chrome using debug mode. |
| 210 | # Replace '--onlydeps' with '--nodeps'. |
| 211 | if options.rebuild == True: |
| 212 | build_packages_env = build_packages_env.replace( |
Luis Lozano | f2a3ef4 | 2015-12-15 13:49:30 -0800 | [diff] [blame] | 213 | 'EXTRA_BOARD_FLAGS=\"-e --onlydeps\"', 'EXTRA_BOARD_FLAGS=--nodeps') |
shenhan | 4873858 | 2013-02-19 22:45:41 +0000 | [diff] [blame] | 214 | else: |
| 215 | build_packages_env = build_packages_env.replace( |
Luis Lozano | f2a3ef4 | 2015-12-15 13:49:30 -0800 | [diff] [blame] | 216 | 'EXTRA_BOARD_FLAGS=--onlydeps', 'EXTRA_BOARD_FLAGS=--nodeps') |
shenhan | 4873858 | 2013-02-19 22:45:41 +0000 | [diff] [blame] | 217 | ret = cmd_executer.ChrootRunCommand( |
Luis Lozano | f2a3ef4 | 2015-12-15 13:49:30 -0800 | [diff] [blame] | 218 | options.chromeos_root, "CFLAGS=\"$(portageq-%s envvar CFLAGS) %s\" " |
| 219 | "CXXFLAGS=\"$(portageq-%s envvar CXXFLAGS) %s\" " |
| 220 | "LDFLAGS=\"$(portageq-%s envvar LDFLAGS) %s\" " |
| 221 | 'CHROME_ORIGIN=SERVER_SOURCE BUILDTYPE=Debug ' |
| 222 | '%s ' |
| 223 | '%s --skip_chroot_upgrade' |
| 224 | 'chromeos-chrome' % (options.board, options.cflags, options.board, |
| 225 | options.cxxflags, options.board, options.ldflags, |
| 226 | build_packages_env, build_packages_command)) |
shenhan | 4873858 | 2013-02-19 22:45:41 +0000 | [diff] [blame] | 227 | logger.GetLogger().LogFatalIf( |
Luis Lozano | f2a3ef4 | 2015-12-15 13:49:30 -0800 | [diff] [blame] | 228 | ret, |
| 229 | 'build_packages failed while trying to build debug chromeos-chrome.') |
shenhan | 4873858 | 2013-02-19 22:45:41 +0000 | [diff] [blame] | 230 | |
| 231 | # Now, we have built chromeos-chrome and all dependencies. |
| 232 | # Finally, remove '-e' from EXTRA_BOARD_FLAGS, |
| 233 | # otherwise, chromeos-chrome gets rebuilt. |
| 234 | build_packages_env = build_packages_env.replace(\ |
| 235 | 'EXTRA_BOARD_FLAGS=--nodeps', '') |
| 236 | |
| 237 | # Up to now, we have a debug built chromos-chrome browser. |
| 238 | # Fall through to build the rest of the world. |
| 239 | |
Luis Lozano | f2a3ef4 | 2015-12-15 13:49:30 -0800 | [diff] [blame] | 240 | # Build packages |
asharif | ca3c6c1 | 2013-02-15 23:17:54 +0000 | [diff] [blame] | 241 | ret = cmd_executer.ChrootRunCommand( |
Luis Lozano | f2a3ef4 | 2015-12-15 13:49:30 -0800 | [diff] [blame] | 242 | options.chromeos_root, "CFLAGS=\"$(portageq-%s envvar CFLAGS) %s\" " |
asharif | ca3c6c1 | 2013-02-15 23:17:54 +0000 | [diff] [blame] | 243 | "CXXFLAGS=\"$(portageq-%s envvar CXXFLAGS) %s\" " |
llozano | 109ac9f | 2013-02-19 19:58:27 +0000 | [diff] [blame] | 244 | "LDFLAGS=\"$(portageq-%s envvar LDFLAGS) %s\" " |
Luis Lozano | f2a3ef4 | 2015-12-15 13:49:30 -0800 | [diff] [blame] | 245 | 'CHROME_ORIGIN=SERVER_SOURCE ' |
| 246 | '%s ' |
Caroline Tice | f6ef439 | 2017-04-06 17:16:05 -0700 | [diff] [blame] | 247 | '%s --skip_chroot_upgrade' % |
| 248 | (options.board, options.cflags, options.board, options.cxxflags, |
| 249 | options.board, options.ldflags, build_packages_env, |
| 250 | build_packages_command)) |
raymes | bfb5799 | 2013-02-15 04:35:45 +0000 | [diff] [blame] | 251 | |
Luis Lozano | f2a3ef4 | 2015-12-15 13:49:30 -0800 | [diff] [blame] | 252 | logger.GetLogger().LogFatalIf(ret, 'build_packages failed') |
yunlian | 5acba6e | 2013-02-19 22:34:37 +0000 | [diff] [blame] | 253 | if options.package: |
| 254 | return 0 |
raymes | 5154d7f | 2013-02-15 04:35:37 +0000 | [diff] [blame] | 255 | # Build image |
Luis Lozano | f2a3ef4 | 2015-12-15 13:49:30 -0800 | [diff] [blame] | 256 | ret = cmd_executer.ChrootRunCommand( |
| 257 | options.chromeos_root, build_packages_env + ' ' + build_image_command) |
raymes | bfb5799 | 2013-02-15 04:35:45 +0000 | [diff] [blame] | 258 | |
Luis Lozano | f2a3ef4 | 2015-12-15 13:49:30 -0800 | [diff] [blame] | 259 | logger.GetLogger().LogFatalIf(ret, 'build_image failed') |
raymes | 5154d7f | 2013-02-15 04:35:37 +0000 | [diff] [blame] | 260 | |
Luis Lozano | f2a3ef4 | 2015-12-15 13:49:30 -0800 | [diff] [blame] | 261 | flags_file_name = 'flags.txt' |
| 262 | flags_file_path = ('%s/src/build/images/%s/latest/%s' % |
| 263 | (options.chromeos_root, options.board, flags_file_name)) |
| 264 | flags_file = open(flags_file_path, 'wb') |
| 265 | flags_file.write('CFLAGS=%s\n' % options.cflags) |
| 266 | flags_file.write('CXXFLAGS=%s\n' % options.cxxflags) |
| 267 | flags_file.write('LDFLAGS=%s\n' % options.ldflags) |
asharif | 8697d4e | 2013-02-15 09:18:09 +0000 | [diff] [blame] | 268 | flags_file.close() |
| 269 | |
| 270 | if options.label: |
Luis Lozano | f2a3ef4 | 2015-12-15 13:49:30 -0800 | [diff] [blame] | 271 | image_dir_path = ('%s/src/build/images/%s/latest' % (options.chromeos_root, |
| 272 | options.board)) |
asharif | 8697d4e | 2013-02-15 09:18:09 +0000 | [diff] [blame] | 273 | real_image_dir_path = os.path.realpath(image_dir_path) |
Luis Lozano | f2a3ef4 | 2015-12-15 13:49:30 -0800 | [diff] [blame] | 274 | command = ('ln -sf -T %s %s/%s' % |
asharif | 8697d4e | 2013-02-15 09:18:09 +0000 | [diff] [blame] | 275 | (os.path.basename(real_image_dir_path), |
Luis Lozano | f2a3ef4 | 2015-12-15 13:49:30 -0800 | [diff] [blame] | 276 | os.path.dirname(real_image_dir_path), options.label)) |
asharif | 8697d4e | 2013-02-15 09:18:09 +0000 | [diff] [blame] | 277 | |
| 278 | ret = cmd_executer.RunCommand(command) |
Caroline Tice | f6ef439 | 2017-04-06 17:16:05 -0700 | [diff] [blame] | 279 | logger.GetLogger().LogFatalIf( |
| 280 | ret, 'Failed to apply symlink label %s' % options.label) |
asharif | 8697d4e | 2013-02-15 09:18:09 +0000 | [diff] [blame] | 281 | |
| 282 | return ret |
raymes | 5154d7f | 2013-02-15 04:35:37 +0000 | [diff] [blame] | 283 | |
Luis Lozano | f2a3ef4 | 2015-12-15 13:49:30 -0800 | [diff] [blame] | 284 | |
| 285 | if __name__ == '__main__': |
asharif | 2198c51 | 2013-02-15 09:21:35 +0000 | [diff] [blame] | 286 | retval = Main(sys.argv) |
| 287 | sys.exit(retval) |