コード例 #1
0
def VM_SSH(name):
    """open a shell to a virtual machine

    Open an SSH session to a running virtual machine.
    """
    vm = VM.find(name)
    if not vm.running():
        raise fail("VM is not running: {}", vm.name)
    vm.forward(22)
    host = "linux-vm"
    if vm.system == 'windows':
        host = "windows-vm"
    with env(debug=True):
        exe("ssh -F %s %s" % (CTL_DIR + "/ssh_config", host))
コード例 #2
0
def CLIENT(engine, name=None):
    """start a native database client

    Run `cogs client <engine> [<name>]` to start a native database
    client on a regression database.

    If the database name is not specified, the client is started
    with administrative rights against the default database.

    To get a list of supported engines and databases, run:
      `cogs help createdb`
    """
    command = make_client(engine, name)
    with env(debug=True):
        exe(command)
コード例 #3
0
def exe_regress(command):
    # Run `pbbt test/regress.yaml <command>`.
    variables = make_variables()
    with env(debug=True):
        exe(env.pbbt_path + " test/regress.yaml -E test/regress.py " +
            variables + command)
コード例 #4
0
def exe_htsql_ctl(command, environ=None):
    # Execute `htsql-ctl <command>`.
    with env(debug=True):
        exe(env.ctl_path + " " + command, environ=environ)
コード例 #5
0
ファイル: cogs.local.py プロジェクト: prometheusresearch/cogs
def LINT():
    """detect errors in the source code with PyFlakes"""
    with env(debug=True):
        exe("pyflakes src/cogs")
コード例 #6
0
ファイル: cogs.local.py プロジェクト: prometheusresearch/cogs
def PURGE_TEST():
    """purge stale output records from regression tests"""
    with env(debug=True):
        exe("pbbt test/input.yaml test/output.yaml -q --train --purge")
コード例 #7
0
ファイル: cogs.local.py プロジェクト: prometheusresearch/cogs
def TRAIN():
    """run regression tests in the train mode"""
    with env(debug=True):
        exe("pbbt test/input.yaml test/output.yaml --train")
コード例 #8
0
ファイル: cogs.local.py プロジェクト: prometheusresearch/cogs
def TEST():
    """run regression tests"""
    with env(debug=True):
        exe("pbbt test/input.yaml test/output.yaml -q")