b=450088 backing out (new reftest failed)
[wine-gecko.git] / testing / release / minotaur / run-minotaur.py
blob44ee06061bee624275f759898d605d49dd6bd4f8
1 # ***** BEGIN LICENSE BLOCK *****
2 # Version: MPL 1.1/GPL 2.0/LGPL 2.1
4 # The contents of this file are subject to the Mozilla Public License Version
5 # 1.1 (the "License"); you may not use this file except in compliance with
6 # the License. You may obtain a copy of the License at
7 # http://www.mozilla.org/MPL/
9 # Software distributed under the License is distributed on an "AS IS" basis,
10 # WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
11 # for the specific language governing rights and limitations under the
12 # License.
14 # The Original Code is Mozilla Corporation Code.
16 # The Initial Developer of the Original Code is
17 # Clint Talbert.
18 # Portions created by the Initial Developer are Copyright (C) 2008
19 # the Initial Developer. All Rights Reserved.
21 # Contributor(s):
22 # Clint Talbert <ctalbert@mozilla.com>
24 # Alternatively, the contents of this file may be used under the terms of
25 # either the GNU General Public License Version 2 or later (the "GPL"), or
26 # the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
27 # in which case the provisions of the GPL or the LGPL are applicable instead
28 # of those above. If you wish to allow use of your version of this file only
29 # under the terms of either the GPL or the LGPL, and not to allow others to
30 # use your version of this file under the terms of the MPL, indicate your
31 # decision by deleting the provisions above and replace them with the notice
32 # and other provisions required by the GPL or the LGPL. If you do not delete
33 # the provisions above, a recipient may use your version of this file under
34 # the terms of any one of the MPL, the GPL or the LGPL.
36 # ***** END LICENSE BLOCK *****
38 from optparse import OptionParser
39 import partner
40 import urllib
41 import sys
44 def main(branch, version, url, loc, name, vFiles, minDir, creds, aus):
45 # Ensure the URL is properly encoded, but don't encode : or /
46 quotedurl = urllib.quote(urllib.unquote(url), ":/")
47 partner.doDownload(name, loc, quotedurl, minDir, creds)
48 partner.doInstall(branch, name, loc)
49 partner.doMinotaur(name, loc, minDir, vFiles, aus, version)
50 partner.doUninstall(branch, name, loc)
52 if __name__ == "__main__":
53 parser = OptionParser()
54 parser.add_option("-n", "--Name", dest="name", help="Build Name",
55 metavar="PARTNER_NAME")
56 parser.add_option("-b", "--Branch", dest="branch",
57 help="Gecko Branch: 1.8.0|1.8.1|1.9", metavar="BRANCH")
58 parser.add_option("-v", "--Version ", dest="version",
59 help="version of firefox to be tested",
60 metavar="FIREFOX_VERSION")
61 parser.add_option("-u", "--UrlToBuild", dest="url",
62 help="URL to top level build location, above the OS directories",
63 metavar="URL")
64 parser.add_option("-l", "--Locale", dest="loc", help="Locale for this build",
65 metavar="LOCALE")
66 parser.add_option("-f", "--VerificationFileLocation", dest="verificationFiles",
67 help="location of verification files, leave blank to create verification files",
68 metavar="VER_FILES")
69 parser.add_option("-m", "--MinotaurDirectory", dest="minDir",
70 help="Directory of the Minotuar code",
71 metavar="MINOTAUR_DIR")
72 parser.add_option("-c", "--Credentials", dest="creds",
73 help="Credentials to download the build in this form: <user>:<password>",
74 metavar="CREDENTIALS")
75 parser.add_option("-a", "--AusParameter", dest="aus",
76 help="The AUS parameter for the AUS URI (-cck param)",
77 metavar="AUS_PARAM")
78 (options, args) = parser.parse_args()
80 # Print Help if no args passed
81 if not options.branch or not options.version or not options.url or \
82 not options.loc or not options.name or not options.minDir:
83 print "Required Items Not Specified. Must specify build name, minotaur dir,",
84 print "locale, url, and version"
85 parser.print_help()
86 sys.exit(1)
88 # Call Main
89 main(options.branch, options.version, options.url, options.loc, options.name,
90 options.verificationFiles, options.minDir, options.creds, options.aus)