DXR is a code search and navigation tool aimed at making sense of large projects. It supports full-text and regex searches as well as structural queries.

Mercurial (c68fe15a81fc)

VCS Links

Line Code
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32
import os
import os
from mozharness.base.script import PreScriptAction


class MozbaseMixin(object):
    """Automatically set virtualenv requirements to use mozbase
    """Automatically set virtualenv requirements to use mozbase
       from test package.
    """
    def __init__(self, *args, **kwargs):
        super(MozbaseMixin, self).__init__(*args, **kwargs)


    @PreScriptAction('create-virtualenv')
    def _install_mozbase(self, action):
        dirs = self.query_abs_dirs()

        requirements = os.path.join(
        requirements = os.path.join(
            dirs['abs_test_install_dir'],
            'config',
            'config',
            self.config.get('mozbase_requirements', 'mozbase_requirements.txt')
        )
        if not os.path.isfile(requirements):
            self.fatal(
                "Could not find mozbase requirements file: {}".format(requirements)
                "Could not find mozbase requirements file: {}".format(requirements)
            )

        self.register_virtualenv_module(requirements=[requirements], two_pass=True)