Exemplo n.º 1
0
def verify_partial(platforms, product, version, build_number,
                   HACK_first_released_versions=None, protocol='http',
                   server='ftp.mozilla.org'):

    from distutils.version import LooseVersion
    partial = Partial(product, version, build_number, protocol, server)
    log.info("Checking for existence of %s complete mar file..." % partial)
    complete_mar_name = partial.complete_mar_name()
    for platform in platforms:
        if HACK_first_released_versions and platform in HACK_first_released_versions:
            if LooseVersion(version) < LooseVersion(HACK_first_released_versions[platform]):
                # No partial for this!
                continue
        log.info("Platform: %s" % platform)
        complete_mar_url = partial.complete_mar_url(platform=platform)
        if partial.exists(platform=platform):
            log.info("complete mar: %s exists, url: %s" % (complete_mar_name,
                                                           complete_mar_url))
        else:
            log.error("Requested file, %s, does not exist on %s"
                      " Check again, or use -b to bypass" % (complete_mar_name,
                                                             complete_mar_url))
            error_tally.add('verify_partial')
            return False

    return True
Exemplo n.º 2
0
def verify_partial(platforms,
                   product,
                   version,
                   build_number,
                   HACK_first_released_versions=None,
                   protocol='http',
                   server='ftp.mozilla.org'):

    from distutils.version import LooseVersion
    partial = Partial(product, version, build_number, protocol, server)
    log.info("Checking for existence of %s complete mar file..." % partial)
    complete_mar_name = partial.complete_mar_name()
    for platform in platforms:
        if HACK_first_released_versions and platform in HACK_first_released_versions:
            if LooseVersion(version) < LooseVersion(
                    HACK_first_released_versions[platform]):
                # No partial for this!
                continue
        log.info("Platform: %s" % platform)
        complete_mar_url = partial.complete_mar_url(platform=platform)
        if partial.exists(platform=platform):
            log.info("complete mar: %s exists, url: %s" %
                     (complete_mar_name, complete_mar_url))
        else:
            log.error("Requested file, %s, does not exist on %s"
                      " Check again, or use -b to bypass" %
                      (complete_mar_name, complete_mar_url))
            error_tally.add('verify_partial')
            return False

    return True
Exemplo n.º 3
0
    def testPartialCompleteMarUrl(self):
        for product in PRODUCTS:
            for platform in PLATFORMS:
                buildNumber = 1
                p = Partial(product, VERSION, buildNumber, PROTOCOL, SERVER)
                complete_mar_name = p.complete_mar_name()
                url = '%s://%s/pub/mozilla.org/%s/candidates/%s-candidates/build%s/update/%s/en-US/%s' % (
                    PROTOCOL, SERVER, product, VERSION, buildNumber,
                    buildbot2ftp(platform), complete_mar_name)

                self.assertEqual(p.complete_mar_url(platform), url)
                buildNumber = None
                p = Partial(product, VERSION, buildNumber, PROTOCOL, SERVER)
                url = '%s://%s/pub/mozilla.org/%s/releases/%s/update/%s/en-US/%s' % (
                    PROTOCOL, SERVER, product, VERSION, buildbot2ftp(platform),
                    complete_mar_name)
                self.assertEqual(p.complete_mar_url(platform), url)
Exemplo n.º 4
0
    def testPartialCompleteMarUrl(self):
        for product in PRODUCTS:
            for platform in PLATFORMS:
                buildNumber = 1
                p = Partial(product, VERSION, buildNumber, PROTOCOL, SERVER)
                complete_mar_name = p.complete_mar_name()
                url = '%s://%s/pub/mozilla.org/%s/candidates/%s-candidates/build%s/update/%s/en-US/%s' % (
                    PROTOCOL, SERVER, product, VERSION, buildNumber,
                    buildbot2ftp(platform), complete_mar_name)

                self.assertEqual(p.complete_mar_url(platform), url)
                buildNumber = None
                p = Partial(product, VERSION, buildNumber, PROTOCOL, SERVER)
                url = '%s://%s/pub/mozilla.org/%s/releases/%s/update/%s/en-US/%s' % (
                    PROTOCOL, SERVER, product, VERSION,
                    buildbot2ftp(platform), complete_mar_name)
                self.assertEqual(p.complete_mar_url(platform), url)
Exemplo n.º 5
0
def verify_partial(platforms, product, version, build_number,
                   protocol='http', server='archive.mozilla.org'):

    partial = Partial(product, version, build_number, protocol, server)
    log.info("Checking for existence of %s complete mar file..." % partial)
    complete_mar_name = partial.complete_mar_name()
    for platform in platforms:
        log.info("Platform: %s" % platform)
        complete_mar_url = partial.complete_mar_url(platform=platform)
        if partial.exists(platform=platform):
            log.info("complete mar: %s exists, url: %s" % (complete_mar_name,
                                                           complete_mar_url))
        else:
            log.error("Requested file, %s, does not exist on %s"
                      " Check again, or use -b to bypass" % (complete_mar_name,
                                                             complete_mar_url))
            error_tally.add('verify_partial')
            return False

    return True