示例#1
0
def runtime():
    '''Get the runtime context of the framework.

    .. versionadded:: 2.13

    :returns: A :class:`reframe.core.runtime.RuntimeContext` object.
    '''
    if _runtime_context is None:
        raise ReframeFatalError('no runtime context is configured')

    return _runtime_context
示例#2
0
def runtime():
    """Retrieve the framework's runtime context.

    :type: :class:`reframe.core.runtime.RuntimeContext`

    .. note::
       .. versionadded:: 2.13
    """
    if _runtime_context is None:
        raise ReframeFatalError('no runtime context is configured')

    return _runtime_context
示例#3
0
    def __init__(self, site_config, filename):
        self._site_config = copy.deepcopy(site_config)
        self._filename = filename
        self._local_config = {}
        self._local_system = None
        self._sticky_options = {}

        # Open and store the JSON schema for later validation
        schema_filename = os.path.join(reframe.INSTALL_PREFIX, 'reframe',
                                       'schemas', 'config.json')
        with open(schema_filename) as fp:
            try:
                self._schema = json.loads(fp.read())
            except json.JSONDecodeError as e:
                raise ReframeFatalError(
                    f"invalid configuration schema: '{schema_filename}'"
                ) from e
示例#4
0
文件: config.py 项目: vkarak/reframe
    def __init__(self, site_config, filename):
        self._site_config = copy.deepcopy(site_config)
        self._filename = filename
        self._subconfigs = {}
        self._local_system = None
        self._sticky_options = {}
        self._autodetect_meth = 'hostname'
        self._autodetect_opts = {
            'hostname': {
                'use_fqdn': False,
                'use_xthostname': False,
            }
        }

        # Open and store the JSON schema for later validation
        schema_filename = os.path.join(reframe.INSTALL_PREFIX, 'reframe',
                                       'schemas', 'config.json')
        with open(schema_filename) as fp:
            try:
                self._schema = json.loads(fp.read())
            except json.JSONDecodeError as e:
                raise ReframeFatalError(
                    f'invalid configuration schema: {schema_filename!r}'
                ) from e
示例#5
0
def settings():
    if _settings is None:
        raise ReframeFatalError('No configuration loaded')

    return _settings
示例#6
0
def settings():
    if _settings is None:
        raise ReframeFatalError('ReFrame is not configured')

    return _settings