Mercurial > mozilla > hg > MozillaTry
comparison mozillatry.py @ 32:daf7c333e01c
add bug to options
| author | Jeff Hammel <jhammel@mozilla.com> |
|---|---|
| date | Tue, 11 Dec 2012 21:04:26 -0800 |
| parents | 864172062af7 |
| children | 915e064f2910 |
comparison
equal
deleted
inserted
replaced
| 31:864172062af7 | 32:daf7c333e01c |
|---|---|
| 100 class ConfigurationError(Exception): | 100 class ConfigurationError(Exception): |
| 101 """error when checking configuration""" | 101 """error when checking configuration""" |
| 102 | 102 |
| 103 class MozillaTryConfiguration(configuration.Configuration): | 103 class MozillaTryConfiguration(configuration.Configuration): |
| 104 | 104 |
| 105 # default configuration file | |
| 106 # TODO: upstream the pattern to configuration but with default_config_file = None | |
| 105 default_config_file = os.path.join('~', '.mozutils') | 107 default_config_file = os.path.join('~', '.mozutils') |
| 106 usage = '%prog [options] patch <patch2> <...>' | 108 usage = '%prog [options] patch <patch2> <...>' |
| 107 load_help = 'load from config file' | 109 load_help = 'load from config file' |
| 108 if os.path.exists(os.path.expanduser(default_config_file)): | 110 if os.path.exists(os.path.expanduser(default_config_file)): |
| 109 load_help += ' [DEFAULT: %s]' % default_config_file | 111 load_help += ' [DEFAULT: %s]' % default_config_file |
| 112 | |
| 113 # configuration options | |
| 110 options = {'opt': {'default': True, | 114 options = {'opt': {'default': True, |
| 111 'help': "whether to try on opt builds"}, | 115 'help': "whether to try on opt builds"}, |
| 112 'debug': {'default': True, | 116 'debug': {'default': True, |
| 113 'help': "whether to try on debug builds"}, | 117 'help': "whether to try on debug builds"}, |
| 114 'platforms': {'default': [], | 118 'platforms': {'default': [], |
| 120 'talostests': {'default': [], | 124 'talostests': {'default': [], |
| 121 'help': "talos tests to run", | 125 'help': "talos tests to run", |
| 122 'flags': ['-t', '--talostests']}, | 126 'flags': ['-t', '--talostests']}, |
| 123 'mozilla_central': {'help': "path to mozilla-central clone", | 127 'mozilla_central': {'help': "path to mozilla-central clone", |
| 124 'required': True, | 128 'required': True, |
| 125 'flags': ["--m-c", "--mozilla-central"]} | 129 'flags': ["--m-c", "--mozilla-central"]}, |
| 130 'bug': {'help': "bug number to post try results to", | |
| 131 'type': int, | |
| 132 'flags': ['-b', '--bug']} | |
| 126 } | 133 } |
| 127 | 134 |
| 128 # configuration items to interpolate as paths | 135 # configuration items to interpolate as paths |
| 129 paths = ['mozilla_central'] | 136 paths = ['mozilla_central'] |
| 130 | 137 |
| 178 | 185 |
| 179 # build try syntax | 186 # build try syntax |
| 180 commit = try_syntax(opt=options.opt, | 187 commit = try_syntax(opt=options.opt, |
| 181 debug=options.debug, | 188 debug=options.debug, |
| 182 unittests=options.unittests, | 189 unittests=options.unittests, |
| 183 talos=options.talostests | 190 talos=options.talostests, |
| 191 bug=options.bug | |
| 184 ) | 192 ) |
| 185 print commit | 193 print commit |
| 186 | 194 |
| 187 # push to try | 195 # push to try |
| 188 push_to_try(patches=args, repo=options.mozilla_central, commit=commit) | 196 push_to_try(patches=args, repo=options.mozilla_central, commit=commit) |
