예제 #1
0
def cli(ctx, paths, **kwds):
    """Run the tests in the specified tool tests in a Galaxy instance.

    All referenced tools (by default all the tools in the current working
    directory) will be tested and the results quickly summarized.

    To run these tests planemo needs a Galaxy instance to utilize, planemo
    will search parent directories to see if any is a Galaxy instance
    - but one can pick the Galaxy instance to use with the --galaxy_root
    option or force planemo to download a disposable instance with the
    ``--install_galaxy`` flag.

    In additon to to quick summary printed to the console - various detailed
    output summaries can be configured. ``tool_test_output.html`` (settable
    via ``--test_output``) will contain a human consumable HTML report
    describing the test run. A JSON file (settable via ``--test_output_json``
    and defaulting to ``tool_test_output.json``) will also be created. These
    files can can be disabled by passing in empty arguments or globally by
    setting the values ``default_test_output`` and/or
    ``default_test_output_json`` in ``~/.planemo.yml`` to ``null``. For
    continuous integration testing a xUnit-style report can be confiured using
    the ``--test_output_xunit``.

    planemo uses temporarily generated config files and environment variables
    to attempt to shield this execution of Galaxy from manually launched runs
    against that same Galaxy root - but this may not be bullet proof yet so
    please careful and do not try this against production Galaxy instances.
    """
    process_defaults(ctx, kwds)

    kwds["for_tests"] = True
    with galaxy_config.galaxy_config(ctx, paths, **kwds) as config:
        return_value = run_in_config(ctx, config, **kwds)
        if return_value:
            sys.exit(return_value)
예제 #2
0
파일: cmd_test.py 프로젝트: davebx/planemo
def cli(ctx, paths, **kwds):
    """Run the tests in the specified tool tests in a Galaxy instance.

    All referenced tools (by default all the tools in the current working
    directory) will be tested and the results quickly summarized.

    To run these tests planemo needs a Galaxy instance to utilize, planemo
    will search parent directories to see if any is a Galaxy instance
    - but one can pick the Galaxy instance to use with the --galaxy_root
    option or force planemo to download a disposable instance with the
    ``--install_galaxy`` flag.

    In additon to to quick summary printed to the console - various detailed
    output summaries can be configured. ``tool_test_output.html`` (settable
    via ``--test_output``) will contain a human consumable HTML report
    describing the test run. A JSON file (settable via ``--test_output_json``
    and defaulting to ``tool_test_output.json``) will also be created. These
    files can can be disabled by passing in empty arguments or globally by
    setting the values ``default_test_output`` and/or
    ``default_test_output_json`` in ``~/.planemo.yml`` to ``null``. For
    continuous integration testing a xUnit-style report can be confiured using
    the ``--test_output_xunit``.

    planemo uses temporarily generated config files and environment variables
    to attempt to shield this execution of Galaxy from manually launched runs
    against that same Galaxy root - but this may not be bullet proof yet so
    please careful and do not try this against production Galaxy instances.
    """
    kwds["for_tests"] = True
    with galaxy_config.galaxy_config(ctx, paths, **kwds) as config:
        return_value = run_in_config(ctx, config, **kwds)
        if return_value:
            sys.exit(return_value)
예제 #3
0
def cli(ctx, paths, **kwds):
    """ Run tests of published shed artifacts.

    This command will start a Galaxy instance configured to target the
    specified shed, find published artifacts (tools and dependencies)
    corresponding to command-line arguments and ``.shed.yml`` file(s),
    install these artifacts, and run the tool tests for these commands.

    This command requires the target to be version 15.07 or newer.
    """
    galaxy_test.process_defaults(ctx, kwds)
    install_args_list = shed.install_arg_lists(ctx, paths, **kwds)
    port = get_free_port()
    kwds["port"] = port
    return_code = 1
    with galaxy_serve.shed_serve(ctx, install_args_list, **kwds) as config:
        config.kill()
        return_code = galaxy_test.run_in_config(
            ctx,
            config,
            installed=True,
            **kwds
        )
    if return_code:
        sys.exit(return_code)
예제 #4
0
def cli(ctx, paths, **kwds):
    """ Run tests of published shed artifacts.

    This command will start a Galaxy instance configured to target the
    specified shed, find published artifacts (tools and dependencies)
    corresponding to command-line arguments and ``.shed.yml`` file(s),
    install these artifacts, and run the tool tests for these commands.

    This command requires the target to be version 15.07 or newer.
    """
    install_args_list = shed.install_arg_lists(ctx, paths, **kwds)
    port = get_free_port()
    kwds["port"] = port
    return_code = 1
    with galaxy_serve.shed_serve(ctx, install_args_list, **kwds) as config:
        config.kill()
        return_code = galaxy_test.run_in_config(ctx,
                                                config,
                                                installed=True,
                                                **kwds)
    if return_code:
        sys.exit(return_code)