def get_stm_test_result():
    """
    Return StmTestResult object if exist else return None.
    """
    logger.debug('get_stm_test_result started.')
    result_parent = meth_man_utils.get_meth_manager()
    active_test = meth_man_utils.get_active_test_case()
    if active_test is not None:
        result_parent = active_test
    test_result = result_parent.GetObject('StmTestResult')
    logger.debug('get_stm_test_result completed.')
    return test_result
def reset():
    """Create StmTestResult object if does not exist.
    reset object if exist.
    StmTestResult object should be created under active test.
    If active test does not exist then under methodology manager.
    """
    logger.debug('Reset result objects.')
    result_parent = meth_man_utils.get_meth_manager()
    active_test = meth_man_utils.get_active_test_case()
    if active_test is not None:
        logger.debug('Active test is result parent.')
        result_parent = active_test
    test_result = result_parent.GetObject('StmTestResult')
    if test_result is None:
        ctor = CScriptableCreator()
        test_result = ctor.Create("StmTestResult", result_parent)
    else:
        reset_stm_test_result(test_result)
    logger.debug('Reset result objects done.')
    return test_result
def find_config_path(file_name):
    stc_sys = CStcSystem.Instance()
    if os.path.isabs(file_name):
        if os.path.isfile(file_name):
            return file_name
        else:
            return None
    path_list = []
    methodology = None
    test_case = meth_man_utils.get_active_test_case()
    if test_case:
        methodology = test_case.GetParent()
        path_list.append(test_case.Get('Path'))
    if methodology:
        path_list.append(methodology.Get('Path'))
    path_list.append(stc_sys.GetApplicationCommonDataPath())
    for path in path_list:
        path = os.path.normpath(path)
        abs_path = os.path.join(path, file_name)
        if os.path.isfile(abs_path):
            return abs_path
    return None