本文整理匯總了Python中release.updates.verify.UpdateVerifyConfig.addRelease方法的典型用法代碼示例。如果您正苦於以下問題:Python UpdateVerifyConfig.addRelease方法的具體用法?Python UpdateVerifyConfig.addRelease怎麽用?Python UpdateVerifyConfig.addRelease使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類release.updates.verify.UpdateVerifyConfig
的用法示例。
在下文中一共展示了UpdateVerifyConfig.addRelease方法的10個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。
示例1: testGetFullReleaseTests
# 需要導入模塊: from release.updates.verify import UpdateVerifyConfig [as 別名]
# 或者: from release.updates.verify.UpdateVerifyConfig import addRelease [as 別名]
def testGetFullReleaseTests(self):
ftp_server_from = "stage.mozilla.org/firefox"
ftp_server_to = "stage.mozilla.org/firefox"
self.uvc.read(self.config)
uvc2 = UpdateVerifyConfig()
uvc2.product = "Firefox"
uvc2.channel = "betatest"
uvc2.aus_server = "https://aus4.mozilla.org"
uvc2.to = "/firefox/4.0rc2.tar.bz2"
uvc2.addRelease(
"4.0",
build_id="888",
platform="Linux_x86-gcc3",
locales=["af", "de", "en-US", "ja", "zh-TW"],
patch_types=["partial", "complete"],
from_path="/firefox/4.0rc1.tar.bz2",
ftp_server_from=ftp_server_from,
ftp_server_to=ftp_server_to,
mar_channel_IDs="firefox-mozilla-beta",
)
uvc2.addRelease(
"4.0b12",
build_id="777",
platform="Linux_x86-gcc3",
locales=["af", "en-US"],
patch_types=["complete"],
from_path="/firefox/4.0b12.tar.bz2",
ftp_server_from=ftp_server_from,
ftp_server_to=ftp_server_to,
)
self.assertEquals(self.uvc.getFullReleaseTests(), uvc2.releases)
示例2: testGetQuickReleaseTests
# 需要導入模塊: from release.updates.verify import UpdateVerifyConfig [as 別名]
# 或者: from release.updates.verify.UpdateVerifyConfig import addRelease [as 別名]
def testGetQuickReleaseTests(self):
ftp_server_from = "stage.mozilla.org/firefox"
ftp_server_to = "stage.mozilla.org/firefox"
self.uvc.read(self.config)
uvc2 = UpdateVerifyConfig()
uvc2.product = "Firefox"
uvc2.channel = "betatest"
uvc2.aus_server = "https://aus4.mozilla.org"
uvc2.to = "/firefox/4.0rc2.tar.bz2"
uvc2.addRelease(
"4.0b12",
build_id="777",
platform="Linux_x86-gcc3",
locales=["de", "ja", "zh-TW"],
patch_types=["complete"],
from_path=None,
ftp_server_from=ftp_server_from,
ftp_server_to=ftp_server_to,
)
uvc2.addRelease(
"3.7a1",
build_id="666",
platform="Linux_x86-gcc3",
locales=["en-US"],
patch_types=["complete"],
from_path=None,
ftp_server_from=ftp_server_from,
ftp_server_to=ftp_server_to,
)
self.assertEquals(self.uvc.getQuickReleaseTests(), uvc2.releases)
示例3: testGetChunk
# 需要導入模塊: from release.updates.verify import UpdateVerifyConfig [as 別名]
# 或者: from release.updates.verify.UpdateVerifyConfig import addRelease [as 別名]
def testGetChunk(self):
ftp_server_from = "stage.mozilla.org/firefox"
ftp_server_to = "stage.mozilla.org/firefox"
self.uvc.read(self.config)
uvc2 = UpdateVerifyConfig()
uvc2.product = "Firefox"
uvc2.platform = "Linux_x86-gcc3"
uvc2.channel = "betatest"
uvc2.aus_server = "https://aus2.mozilla.org"
uvc2.to = "/firefox/4.0rc2.tar.bz2"
uvc2.addRelease(
"4.0",
build_id="888",
locales=["af", "de", "en-US"],
patch_types=["partial", "complete"],
from_path="/firefox/4.0rc1.tar.bz2",
ftp_server_from=ftp_server_from,
ftp_server_to=ftp_server_to,
)
uvc2.addRelease(
"4.0b12",
build_id="777",
locales=["de", "ja"],
patch_types=["complete"],
ftp_server_from=ftp_server_from,
ftp_server_to=ftp_server_to,
from_path=None,
)
chunkedConfig = self.uvc.getChunk(chunks=3, thisChunk=1)
self.assertEquals(chunkedConfig, uvc2)
示例4: testGetChunkWithPathWithSpaces
# 需要導入模塊: from release.updates.verify import UpdateVerifyConfig [as 別名]
# 或者: from release.updates.verify.UpdateVerifyConfig import addRelease [as 別名]
def testGetChunkWithPathWithSpaces(self):
self.uvc.product = "Firefox"
self.uvc.channel = "betatest"
self.uvc.aus_server = "https://aus4.mozilla.org"
self.uvc.ftp_server_from = "stage.mozilla.org/firefox"
self.uvc.ftp_server_to = "stage.mozilla.org/firefox"
self.uvc.to = "/firefox/Firefox 4.0 Beta 2.exe"
self.uvc.addRelease(
"4.0b1",
build_id="222",
platform="Linux_x86-gcc3",
locales=["en-US", "ja", "zh-TW"],
patch_types=["complete"],
from_path="/firefox/Firefox 4.0 Beta 1.exe",
)
uvc2 = UpdateVerifyConfig()
uvc2.product = "Firefox"
uvc2.channel = "betatest"
uvc2.aus_server = "https://aus4.mozilla.org"
uvc2.ftp_server_from = "stage.mozilla.org/firefox"
uvc2.ftp_server_to = "stage.mozilla.org/firefox"
uvc2.to = "/firefox/Firefox 4.0 Beta 2.exe"
uvc2.addRelease(
"4.0b1",
build_id="222",
platform="Linux_x86-gcc3",
locales=["en-US", "ja"],
patch_types=["complete"],
from_path="/firefox/Firefox 4.0 Beta 1.exe",
)
chunkedConfig = self.uvc.getChunk(chunks=2, thisChunk=1)
self.assertEquals(chunkedConfig, uvc2)
示例5: testRead
# 需要導入模塊: from release.updates.verify import UpdateVerifyConfig [as 別名]
# 或者: from release.updates.verify.UpdateVerifyConfig import addRelease [as 別名]
def testRead(self):
ftp_server_from = "stage.mozilla.org/firefox"
ftp_server_to = "stage.mozilla.org/firefox"
uvc2 = UpdateVerifyConfig()
uvc2.product = "Firefox"
uvc2.channel = "betatest"
uvc2.aus_server = "https://aus4.mozilla.org"
uvc2.to = "/firefox/4.0rc2.tar.bz2"
uvc2.to_build_id = "999"
uvc2.to_display_version = "99.0 Zeta 9"
uvc2.to_app_version = "99.0"
uvc2.addRelease("4.0", build_id="888", platform="Linux_x86-gcc3",
locales=["af", "de", "en-US", "ja", "zh-TW"],
patch_types=["partial", "complete"],
from_path="/firefox/4.0rc1.tar.bz2",
ftp_server_from=ftp_server_from,
ftp_server_to=ftp_server_to,
mar_channel_IDs="firefox-mozilla-beta")
uvc2.addRelease("4.0b12", build_id="777", platform="Linux_x86-gcc3",
locales=["af", "en-US"],
from_path="/firefox/4.0b12.tar.bz2",
ftp_server_from=ftp_server_from,
ftp_server_to=ftp_server_to)
uvc2.addRelease("4.0b12", build_id="777", platform="Linux_x86-gcc3",
locales=["de", "ja", "zh-TW"],
ftp_server_from=ftp_server_from,
ftp_server_to=ftp_server_to)
uvc2.addRelease("3.7a1", build_id="666", locales=["en-US"],
ftp_server_from=ftp_server_from,
ftp_server_to=ftp_server_to, platform="Linux_x86-gcc3")
self.uvc.read(self.config)
self.assertEquals(self.uvc, uvc2)
示例6: testRead
# 需要導入模塊: from release.updates.verify import UpdateVerifyConfig [as 別名]
# 或者: from release.updates.verify.UpdateVerifyConfig import addRelease [as 別名]
def testRead(self):
uvc2 = UpdateVerifyConfig()
uvc2.product = "Firefox"
uvc2.platform = "Linux_x86-gcc3"
uvc2.channel = "betatest"
uvc2.aus_server = "https://aus2.mozilla.org"
uvc2.ftp_server = "stage.mozilla.org/firefox"
uvc2.to = "/firefox/4.0rc2.tar.bz2"
uvc2.addRelease("4.0", build_id="888",
locales=["af", "de", "en-US", "ja", "zh-TW"],
patch_types=["partial", "complete"],
from_path="/firefox/4.0rc1.tar.bz2")
uvc2.addRelease("4.0b12", build_id="777",
locales=["af", "en-US"],
from_path="/firefox/4.0b12.tar.bz2")
uvc2.addRelease("4.0b12", build_id="777",
locales=["de", "ja", "zh-TW"])
uvc2.addRelease("3.7a1", build_id="666", locales=["en-US"])
self.uvc.read(self.config)
self.assertEquals(self.uvc, uvc2)
示例7: TestUpdateVerifyConfig
# 需要導入模塊: from release.updates.verify import UpdateVerifyConfig [as 別名]
# 或者: from release.updates.verify.UpdateVerifyConfig import addRelease [as 別名]
class TestUpdateVerifyConfig(unittest.TestCase):
config = path.join(path.dirname(__file__), "sample-update-verify.cfg")
def setUp(self):
self.uvc = UpdateVerifyConfig()
fd, self.tmpfilename = mkstemp()
self.tmpfile = os.fdopen(fd, "w")
def tearDown(self):
self.tmpfile.close()
os.unlink(self.tmpfilename)
def testEq(self):
self.uvc.product = "foo"
self.uvc.channel = "betatest"
self.uvc.aus_server = "aus"
self.uvc.ftp_server_from = "ftp"
self.uvc.ftp_server_to = "ftp"
self.uvc.to = "/firefox/4.0rc2.tar.bz2"
self.uvc.mar_channel_IDs = "baz"
uvc2 = UpdateVerifyConfig()
uvc2.product = "foo"
uvc2.channel = "betatest"
uvc2.aus_server = "aus"
uvc2.ftp_server_form = "ftp"
uvc2.ftp_server_to = "ftp"
uvc2.to = "/firefox/4.0rc2.tar.bz2"
uvc2.mar_channel_IDs = "baz"
self.assertEquals(self.uvc, uvc2)
def testNe(self):
self.uvc.product = "foo"
uvc2 = UpdateVerifyConfig()
# assertNotEqual doesn't test the __ne__ function, so we do this
self.assertTrue(self.uvc != uvc2)
def testAddRelease(self):
releases = [
{
"release": "4.0",
"platform": "bar",
"build_id": 555,
"locales": ["af", "de"],
"patch_types": ["partial", "complete"],
"from": "/pub/firefox/foo.bz2",
"ftp_server_from": "from",
"ftp_server_to": "to",
"mar_channel_IDs": "firefox-mozilla-booyah",
}
]
self.uvc.addRelease(
"4.0",
build_id=555,
locales=["af", "de"],
patch_types=["partial", "complete"],
from_path="/pub/firefox/foo.bz2",
ftp_server_from="from",
ftp_server_to="to",
mar_channel_IDs="firefox-mozilla-booyah",
platform="bar",
)
self.assertEquals(self.uvc.releases, releases)
def testAddReleasesWithDifferentPlatforms(self):
releases = [
{
"release": "4.0",
"platform": "WINNT_x86-msvc",
"build_id": 555,
"locales": ["af", "de"],
"patch_types": ["partial", "complete"],
"from": "/pub/firefox/foo.bz2",
"ftp_server_from": "from",
"ftp_server_to": "to",
"mar_channel_IDs": "firefox-mozilla-booyah",
},
{
"release": "5.0",
"platform": "WINNT_x86-msvc-x86",
"build_id": 666,
"locales": ["af", "de"],
"patch_types": ["partial", "complete"],
"from": "/pub/firefox/foo2.bz2",
"ftp_server_from": "from",
"ftp_server_to": "to",
"mar_channel_IDs": "firefox-mozilla-booyah",
},
]
self.uvc.addRelease(
"4.0",
build_id=555,
locales=["af", "de"],
patch_types=["partial", "complete"],
from_path="/pub/firefox/foo.bz2",
ftp_server_from="from",
ftp_server_to="to",
mar_channel_IDs="firefox-mozilla-booyah",
platform="WINNT_x86-msvc",
)
self.uvc.addRelease(
#.........這裏部分代碼省略.........
示例8: makeReleaseRepackUrls
# 需要導入模塊: from release.updates.verify import UpdateVerifyConfig [as 別名]
# 或者: from release.updates.verify.UpdateVerifyConfig import addRelease [as 別名]
from_ = makeReleaseRepackUrls(
product_name, app_name, v, options.platform,
locale='%locale%', signed=True, exclude_secondary=True
).values()[0]
release_dir = makeReleasesDir(product_name, v, ftp_root='/')
from_path = "%s%s" % (release_dir, from_)
if v in partials:
# Full test for all locales
# "from" and "to" to be downloaded from the same staging
# server in dev environment
if len(locales) > 0:
log.info("Generating configs for partial update checks for %s" % v)
uvc.addRelease(release=appVersion, build_id=build_id,
locales=locales,
patch_types=['complete', 'partial'],
from_path=from_path, ftp_server_from=staging_server,
ftp_server_to=staging_server,
mar_channel_IDs=mar_channel_IDs)
else:
# Full test for limited locales
# "from" and "to" to be downloaded from different staging
# server in dev environment
if len(this_full_check_locales) > 0:
log.info("Generating full check configs for %s" % v)
uvc.addRelease(release=appVersion, build_id=build_id,
locales=this_full_check_locales, from_path=from_path,
ftp_server_from=previous_releases_staging_server,
ftp_server_to=staging_server,
mar_channel_IDs=mar_channel_IDs)
# Quick test for other locales, no download
if len(quick_check_locales) > 0:
示例9: is_triangualar
# 需要導入模塊: from release.updates.verify import UpdateVerifyConfig [as 別名]
# 或者: from release.updates.verify.UpdateVerifyConfig import addRelease [as 別名]
from_path = "%s%s" % (release_dir, path_)
# Exclude locales being full checked
quick_check_locales = [l for l in locales
if l not in full_check_locales]
# Get the intersection of from and to full_check_locales
this_full_check_locales = [l for l in full_check_locales
if l in locales]
if fromVersion in partials:
log.info("Generating configs for partial update checks for %s" %
fromVersion)
uvc.addRelease(release=appVersion, build_id=build_id,
locales=locales,
patch_types=["complete", "partial"],
from_path=from_path,
ftp_server_from=prev_archive_prefix,
ftp_server_to=args.archive_prefix,
mar_channel_IDs=mar_channel_IDs,
platform=update_platform)
else:
if this_full_check_locales and is_triangualar(completes_only_index):
log.info("Generating full check configs for %s" % fromVersion)
uvc.addRelease(release=appVersion, build_id=build_id,
locales=this_full_check_locales,
from_path=from_path,
ftp_server_from=prev_archive_prefix,
ftp_server_to=args.archive_prefix,
mar_channel_IDs=mar_channel_IDs,
platform=update_platform)
# Quick test for other locales, no download
if len(quick_check_locales) > 0:
示例10: makeReleasesDir
# 需要導入模塊: from release.updates.verify import UpdateVerifyConfig [as 別名]
# 或者: from release.updates.verify.UpdateVerifyConfig import addRelease [as 別名]
release_dir = makeReleasesDir(product_name, fromVersion, ftp_root='/')
from_path = "%s%s" % (release_dir, path_)
# Exclude locales being full checked
quick_check_locales = [l for l in locales
if l not in full_check_locales]
# Get the intersection of from and to full_check_locales
this_full_check_locales = [l for l in full_check_locales
if l in locales]
if fromVersion in partials:
log.info("Generating configs for partial update checks for %s" % fromVersion)
uvc.addRelease(release=appVersion, build_id=build_id,
locales=locales,
patch_types=["complete", "partial"],
from_path=from_path, ftp_server_from=previous_releases_ftp_server,
ftp_server_to=ftp_server,
mar_channel_IDs=mar_channel_IDs,
platform=update_platform)
else:
if len(this_full_check_locales) > 0:
log.info("Generating full check configs for %s" % fromVersion)
uvc.addRelease(release=appVersion, build_id=build_id,
locales=this_full_check_locales, from_path=from_path,
ftp_server_from=previous_releases_ftp_server,
ftp_server_to=ftp_server,
mar_channel_IDs=mar_channel_IDs,
platform=update_platform)
# Quick test for other locales, no download
if len(quick_check_locales) > 0:
log.info("Generating quick check configs for %s" % fromVersion)