Example #1
0
def handle_debug(args):
    """
    Runs a debug command on the buildactions where the analysis
    failed for some reason.
    """
    context = generic_package_context.get_context()

    try:
        workspace = args.workspace
    except AttributeError:
        # If no workspace value was set for some reason
        # in args set the default value.
        workspace = util.get_default_workspace()

    context.codechecker_workspace = workspace
    context.db_username = args.dbusername

    check_env = analyzer_env.get_check_env(context.path_env_extra,
                                           context.ld_lib_path_extra)

    sql_server = SQLServer.from_cmdline_args(args,
                                             context.codechecker_workspace,
                                             context.migration_root,
                                             check_env)
    sql_server.start(context.db_version_info, wait_for_start=True, init=False)

    debug_reporter.debug(context, sql_server.get_connection_string(),
                         args.force)
Example #2
0
def handle_debug(args):
    """
    Runs a debug command on the buildactions where the analysis
    failed for some reason
    """
    context = generic_package_context.get_context()

    try:
        workspace = args.workspace
    except AttributeError:
        # if no workspace value was set for some reason
        # in args set the default value
        workspace = util.get_default_workspace()

    context.codechecker_workspace = workspace
    context.db_username = args.dbusername

    check_env = analyzer_env.get_check_env(context.path_env_extra,
                                           context.ld_lib_path_extra)

    sql_server = SQLServer.from_cmdline_args(args,
                                             context.codechecker_workspace,
                                             context.migration_root, check_env)
    sql_server.start(context.db_version_info, wait_for_start=True, init=False)

    debug_reporter.debug(context, sql_server.get_connection_string(),
                         args.force)
Example #3
0
def handle_debug(args):
    context = generic_package_context.get_context()
    context.codechecker_workspace = args.workspace
    context.db_username = args.dbusername

    check_env = analyzer_env.get_check_env(context.path_env_extra,
                                           context.ld_lib_path_extra)

    sql_server = SQLServer.from_cmdline_args(args,
                                             context.codechecker_workspace,
                                             context.migration_root,
                                             check_env)
    sql_server.start(wait_for_start=True, init=False)

    debug_reporter.debug(context, sql_server.get_connection_string(), args.force)
Example #4
0
def handle_debug(args):
    setup_connection_manager_db(args)

    context = generic_package_context.get_context()
    context.codechecker_workspace = args.workspace
    context.db_username = args.dbusername

    check_env = analyzer_env.get_check_env(context.path_env_extra,
                                             context.ld_lib_path_extra)

    client.ConnectionManager.run_env = check_env

    client.ConnectionManager.start_postgres(context)

    client.ConnectionManager.block_until_db_start_proc_free(context)

    debug_reporter.debug(context, args.dbusername, args.dbaddress,
                         args.dbport, args.dbname, args.force)