Ejemplo n.º 1
0
def is_config_file_match():

    (err_dic, scenario_for_board) = common.get_xml_attrib(SCENARIO_INFO_FILE, "board")
    (err_dic, board_name) = common.get_xml_attrib(BOARD_INFO_FILE, "board")

    if scenario_for_board == board_name:
        return (err_dic, True)
    else:
        return (err_dic, False)
Ejemplo n.º 2
0
def get_scenario_name():
    """
    Get scenario name from scenario.xml at fist line
    :param scenario_info: it is a file what contains board information for script to read from
    """
    (err_dic, board) = common.get_xml_attrib(SCENARIO_INFO_FILE, "scenario")
    return (err_dic, board)
Ejemplo n.º 3
0
def get_board_name():
    """
    Get board name from board.xml at fist line
    :param board_info: it is a file what contains board information for script to read from
    """
    (err_dic, board) = common.get_xml_attrib(BOARD_INFO_FILE, "board")
    return (err_dic, board)
Ejemplo n.º 4
0
def is_config_file_match():

    match = True
    # check if the board config match scenario config
    (err_dic, scenario_for_board) = common.get_xml_attrib(common.SCENARIO_INFO_FILE, "board")
    (err_dic, board_name) = common.get_xml_attrib(common.BOARD_INFO_FILE, "board")
    if scenario_for_board != board_name:
        err_dic['scenario config'] = "The board xml file does not match scenario xml file!"
        match = False

    # check if the board config match launch config
    (err_dic, launch_for_board) = common.get_xml_attrib(common.LAUNCH_INFO_FILE, "board")
    if launch_for_board != board_name:
        err_dic['launch config'] = "The board xml file does not match scenario xml file!"
        match = False

    return (err_dic, match)
Ejemplo n.º 5
0
def is_config_file_match():

    match = True
    # check if the board config match scenario config
    (err_dic, scenario_for_board) = common.get_xml_attrib(SCENARIO_INFO_FILE, "board")
    (err_dic, board_name) = common.get_xml_attrib(BOARD_INFO_FILE, "board")
    if scenario_for_board != board_name:
        err_dic['scenario config: Not match'] = "The board xml and scenario xml should be matched!"
        match = False

    # check if the board config match launch config
    (err_dic, launch_for_board) = common.get_xml_attrib(LAUNCH_INFO_FILE, "board")
    if launch_for_board != board_name:
        err_dic['launch config: Not match'] = "The board xml and launch xml should be matched!"
        match = False

    return (err_dic, match)