Exemple #1
0
                          shed_tool_path=galaxy_shed_tool_path,
                          tool_data_path=tool_data_path,
                          tool_sheds_config_file=galaxy_tool_sheds_conf_file)
            kwargs.update(
                driver_util.setup_galaxy_config(
                    galaxy_db_path,
                    use_test_file_dir=False,
                    default_install_db_merged=False,
                    default_tool_data_table_config_path=default_tool_data_table_config_path,
                    default_shed_tool_data_table_config=shed_tool_data_table_conf_file,
                    enable_tool_shed_check=True,
                    shed_tool_conf=galaxy_shed_tool_conf_file,
                    update_integrated_tool_panel=True,
                )
            )
            print("Galaxy database connection:", kwargs["database_connection"])

            # ---- Run galaxy webserver ------------------------------------------------------
            galaxyapp = driver_util.build_galaxy_app(kwargs)
            galaxy_server_wrapper = driver_util.launch_server(
                galaxyapp,
                galaxybuildapp.app_factory,
                kwargs,
            )
            log.info(f"Galaxy tests will be run against {galaxy_server_wrapper.host}:{galaxy_server_wrapper.port}")
            self.server_wrappers.append(galaxy_server_wrapper)


if __name__ == "__main__":
    driver_util.drive_test(ToolShedTestDriver)
Exemple #2
0
    '-installed': InstalledToolsGalaxyTestDriver,
    '-framework': FrameworkToolsGalaxyTestDriver,
    '-data_managers': DataManagersGalaxyTestDriver,
    '-selenium': SeleniumGalaxyTestDriver,
}


def find_test_driver():
    """Look at command-line args and find the correct Galaxy test driver."""
    test_driver = DefaultGalaxyTestDriver

    for key in TEST_DRIVERS.keys():
        if _check_arg(key):
            test_driver = TEST_DRIVERS[key]

    return test_driver


def _check_arg(name):
    try:
        index = sys.argv.index(name)
        del sys.argv[index]
        ret_val = True
    except ValueError:
        ret_val = False
    return ret_val


if __name__ == "__main__":
    driver_util.drive_test(find_test_driver())