Exemplo n.º 1
0
 def _reload_libs(self):
     """ Internal function. Reload libraries. """
     from common import iniparser
     ce_path = '{}/.twister_cache/{}/ce_libs/ce_libs.py'.format(TWISTER_PATH, self.epName)
     cfg = iniparser.ConfigObj(ce_path)
     for n, v in cfg.iteritems():
         setattr(self, '_' + n, v)
     del cfg
Exemplo n.º 2
0
 def _reload_libs(self):
     """ reload libraries """
     ce_path = '{}/.twister_cache/{}/ce_libs/ce_libs.py'.format(
         TWISTER_PATH, self.epName)
     cfg = iniparser.ConfigObj(ce_path)
     for n, v in cfg.iteritems():
         setattr(self, '_' + n, v)
     del cfg
Exemplo n.º 3
0
    def __init__(self):

        logDebug('SM: Starting Service Manager...')

        self.twister_services = []
        cfg_path = '{0}/config/services.ini'.format(TWISTER_PATH)
        cfg = iniparser.ConfigObj(cfg_path)

        for service in cfg:
            if service == 'DEFAULT':
                continue
            cfg[service]['name'] = service
            self.twister_services.append(cfg[service])

        logDebug('SM: Found `{0}` services: `{1}`.'.format(len(self.twister_services), ', '.join(cfg.keys())))
        del cfg, cfg_path
Exemplo n.º 4
0
    if not SERVER_PORT:
        logCritical('Twister Server: Must start with parameter PORT number!')
        exit(1)
    else:
        try:
            SERVER_PORT = int(SERVER_PORT[0])
        except Exception:
            logCritical('Twister Server: Must start with parameter PORT number!')
            exit(1)

    # Read verbosity from configuration
    CFG_PATH = '{}/config/server_init.ini'.format(TWISTER_PATH)
    VERBOSITY = 20
    if os.path.isfile(CFG_PATH):
        CFG = iniparser.ConfigObj(CFG_PATH)
        VERBOSITY = CFG.get('verbosity', 20)
        del CFG

    RET = setLogLevel(VERBOSITY)
    if not RET:
        logError('Log: The Log level will default to INFO.')

    # RPyc config
    CONFIG = {
        'allow_pickle': True,
        'allow_getattr': True,
        'allow_setattr': True,
        'allow_delattr': True,
        'allow_all_attrs': True,
        }