예제 #1
0
    def tk_routes(self, push):
        for build_type in self.build_types:
            yield "comm.v2.{}.revision.{}.thunderbird.{}-{}".format(
                self.integration_branch,
                push.changeset,
                _common_tk_part(self),
                build_type,
            )
            self._inc_used_build()
        return


# ------------ full config implementations ------------

REGISTRY = ClassRegistry("app_name")


def create_config(name, os, bits, processor):
    """
    Create and returns a configuration for the given name.

    :param name: application name, such as 'firefox'
    :param os: os name, e.g 'linux', 'win' or 'mac'
    :param bits: the bit of the os as an int, e.g 32 or 64. Can be None
                 if the bits do not make sense (e.g. fennec)
    :param processor: processor family, e.g 'x86', 'x86_86', 'ppc', 'ppc64' or
                      'aarch64'
    """
    return REGISTRY.get(name)(os, bits, processor)
예제 #2
0
        # release the runner since it holds a profile reference
        del self.runner

    def cleanup(self):
        try:
            Launcher.cleanup(self)
        finally:
            # always remove tempdir
            if self.tempdir is not None:
                rmtree(self.tempdir)

    def get_app_info(self):
        return safe_get_version(binary=self.binary)


REGISTRY = ClassRegistry('app_name')


def create_launcher(buildinfo):
    """
    Create and returns an instance launcher for the given buildinfo.
    """
    return REGISTRY.get(buildinfo.app_name)(buildinfo.build_file,
                                            task_id=buildinfo.task_id)


class FirefoxRegressionProfile(Profile):
    """
    Specialized Profile subclass for Firefox / Fennec

    Some preferences may only apply to one or the other
예제 #3
0
from mozregression.class_registry import ClassRegistry

TEST_REGISTRY = ClassRegistry()


@TEST_REGISTRY.register('c1')
class C1(object):
    pass


@TEST_REGISTRY.register('c2')
class C2(object):
    pass


@TEST_REGISTRY.register('c3', some_other_attr=True)
class C3(object):
    pass


def test_get_names():
    TEST_REGISTRY.names() == ['c1', 'c2', 'c3']

    TEST_REGISTRY.names(
        lambda klass: getattr(klass, 'some_other_attr', None)) == ['c3']