# Path: skema/omxil12.py
# def get_string_from_il_enum(enum, hint):
#     from skema import omxil12
#     for name, val in omxil12.__dict__.iteritems():
#         if enum == val:
#             if name.startswith(hint):
#                 return name
#     raise AttributeError
# 
# Path: skema/utils.py
# def log_line(line="", tabs=0):
#     if (line == ""):
#         lansi = "[skema] "
#         l = ""
#     else:
#         l = ('\t' * tabs) + "[" + line + "]"
#         lansi = "[skema] " + bcolors.WARNING + l + bcolors.ENDC
#     logging.info(l)
#     printit (lansi)
# 
# Path: skema/utils.py
# def log_result(tag, err):
#     log_line ()
#     if (err == "OMX_ErrorNone"):
#         l = "[" + tag + " -> '" + err + "']"
#         lansi = "[skema] " + bcolors.OKGREEN + l + bcolors.ENDC
#         logging.info(l)
#     else:
#         l = "[" + tag + " -> '" + err + "']"
#         lansi = "[skema] " + bcolors.FAIL + l + bcolors.ENDC
#         logging.error(l)
# 
#     printit (lansi)
# 
# Path: skema/tagutils.py
# def get_tag(tag_name):
#     tags = get_all_tags()
#     return tags.get(tag_name)
# 
# Path: skema/config.py
# def get_config():
#     global _config
#     if _config is not None:
#         return _config
#     _config = SkemaConfig()
#     return _config


import os
import sys
import skema.command
from ctypes import *
from xml.etree.ElementTree import ElementTree as et
from optparse import make_option
from skema.omxil12 import get_string_from_il_enum
from skema.utils import log_line
from skema.utils import log_result
from skema.tagutils import get_tag
from skema.config import get_config
    for elem in titer:

        if elem.tag == "Suite":
            continue

        if elem.tag == "Case":
            case  = elem.get('name')
            log_line ("Use Case : '%s'"  % case)
            cases.append(case)
            errors[case] = 0
            result = 0
            continue

        if result == 0:
            tag_func = get_tag(elem.tag)
            if not tag_func:
                log_line ("Tag '%s' not found. Exiting."  % elem.tag)
                sys.exit(1)

            result = tag_func.run(elem, config)
            if result != 0:
                log_result (elem.tag, get_string_from_il_enum(result, "OMX_Error"))
                errors[case] = result
            last_tag[case] = elem.tag

    if result != 0:
        config.base_profile_mgr.stop()

    log_line()
    log_line()

# Path: skema/omxil12.py
# def get_string_from_il_enum(enum, hint):
#     from skema import omxil12
#     for name, val in omxil12.__dict__.iteritems():
#         if enum == val:
#             if name.startswith(hint):
#                 return name
#     raise AttributeError
# 
# Path: skema/utils.py
# def log_line(line="", tabs=0):
#     if (line == ""):
#         lansi = "[skema] "
#         l = ""
#     else:
#         l = ('\t' * tabs) + "[" + line + "]"
#         lansi = "[skema] " + bcolors.WARNING + l + bcolors.ENDC
#     logging.info(l)
#     printit (lansi)
# 
# Path: skema/utils.py
# def log_result(tag, err):
#     log_line ()
#     if (err == "OMX_ErrorNone"):
#         l = "[" + tag + " -> '" + err + "']"
#         lansi = "[skema] " + bcolors.OKGREEN + l + bcolors.ENDC
#         logging.info(l)
#     else:
#         l = "[" + tag + " -> '" + err + "']"
#         lansi = "[skema] " + bcolors.FAIL + l + bcolors.ENDC
#         logging.error(l)
# 
#     printit (lansi)
# 
# Path: skema/tagutils.py
# def get_tag(tag_name):
#     tags = get_all_tags()
#     return tags.get(tag_name)
# 
# Path: skema/config.py
# def get_config():
#     global _config
#     if _config is not None:
#         return _config
#     _config = SkemaConfig()
#     return _config


# Path: skema/suiteutils.py
import os
import sys
import skema.command
from ctypes import *
from xml.etree.ElementTree import ElementTree as et
from optparse import make_option
from skema.omxil12 import get_string_from_il_enum
from skema.utils import log_line
from skema.utils import log_result
from skema.tagutils import get_tag
from skema.config import get_config

    for elem in titer:

        if elem.tag == "Suite":
            continue

        if elem.tag == "Case":
            case  = elem.get('name')
            log_line ("Use Case : '%s'"  % case)
            cases.append(case)
            errors[case] = 0
            result = 0
            continue

        if result == 0:
            tag_func = get_tag(elem.tag)
            if not tag_func:
                log_line ("Tag '%s' not found. Exiting."  % elem.tag)
                sys.exit(1)

            result = tag_func.run(elem, config)
            if result != 0:
                log_result (elem.tag, get_string_from_il_enum(result, "OMX_Error"))
                errors[case] = result
            last_tag[case] = elem.tag

    if result != 0:
        config.base_profile_mgr.stop()

    log_line()
    log_line()

    log_line("-------------------------------------------------------------------")