def debug(options):
    '''Run the buildslave without forking in background.'''

    # Set buildslave name to be used in buildbot.tac.
    sys.buildslave_name = pave.getOption(
        options, 'debug', 'name', default_value=pave.getHostname())

    argv = [
        'twistd',
        '--no_save',
        '--nodaemon',
        '--logfile=-',
        '--python=buildbot.tac',
        ]
    sys.argv = argv

    try:
        from setproctitle import setproctitle
        setproctitle  # Shut up the linter.
    except ImportError:
        setproctitle = lambda t: None

    setproctitle('buildbot-slave')

    from twisted.scripts import twistd
    with pushd(pave.fs.join([pave.path.build, 'slave'])):
        twistd.run()
Exemple #2
0
def doc_html(options):
    """
    Generates the documentation.
    """
    # Avoid recursive import.
    from brink.pavement_commons import pave

    arguments = []
    if pave.getOption(options, 'doc_html', 'all'):
        arguments.extend(['-a', '-E', '-n'])
    if pave.getOption(options, 'doc_html', 'production'):
        experimental = False
    else:
        experimental = True

    theme = pave.getOption(options, 'doc_html', 'theme', 'standalone')

    return pave.sphinx.generateProjectDocumentation(
        arguments, experimental=experimental, theme=theme)
def start(options):
    '''Start the slave buildbot.'''
    from buildslave.scripts import runner

    # Set buildslave name to be used in buildbot.tac.
    sys.buildslave_name = pave.getOption(
        options, 'start', 'name', default_value=pave.getHostname())

    new_args = [
        'buildslave', 'start', pave.fs.join([pave.path.build, 'slave'])]
    sys.argv = new_args
    runner.run()