Example #1
0
 def setUp(self):
     self.remove_cats = []
     for cat in ("build", "post-build", "misc", "testing"):
         if cat in Registrar.categories:
             continue
         Registrar.register_category(cat, cat, cat)
         self.remove_cats.append(cat)
Example #2
0
def SyncStorageCommand(func):
    """Decorator that adds shared command arguments to services commands."""

    port = CommandArgument('--port', metavar='PORT', type=int,
                           default=DEFAULT_PORT, help='Port to run server on.')
    func = port(func)

    address = CommandArgument('--address', metavar='ADDRESS',
                              default=DEFAULT_HOSTNAME,
                              help='Hostname to bind server to.')
    func = address(func)

    return func

Registrar.register_category(name='services',
                            title='Services utilities',
                            description='Commands for services development.')

@CommandProvider
class SyncTestCommands(MachCommandBase):
    def __init__(self, context):
        MachCommandBase.__init__(self, context)

    def run_server(self, js_file, hostname, port):
        topsrcdir = self.topsrcdir
        topobjdir = self.topobjdir

        unit_test_dir = mozpath.join(SRCDIR, 'unit')

        head_paths = [
            'head_global.js',
Example #3
0
                           type=int,
                           default=DEFAULT_PORT,
                           help='Port to run server on.')
    func = port(func)

    address = CommandArgument('--address',
                              metavar='ADDRESS',
                              default=DEFAULT_HOSTNAME,
                              help='Hostname to bind server to.')
    func = address(func)

    return func


Registrar.register_category(name='services',
                            title='Services utilities',
                            description='Commands for services development.')


@CommandProvider
class SyncTestCommands(MachCommandBase):
    def __init__(self, context):
        MachCommandBase.__init__(self, context)

    def run_server(self, js_file, hostname, port):
        topsrcdir = self.topsrcdir
        topobjdir = self.topobjdir

        unit_test_dir = mozpath.join(SRCDIR, 'unit')

        head_paths = [