Beispiel #1
0
 def __init__(self, macros_, executables, prefix, symbol_set = None, trace = False):
     '''
     Constructor
     '''
     self.trace = trace
     self.macros = macros_
     self.build_dir = self.macros['_cwd']
     self.test_dir = path.join(self.build_dir, self.macros['bsp'] + '-coverage')
     if not path.exists(self.test_dir):
         path.mkdir(self.test_dir)
     self.rtdir = path.abspath(self.macros['_rtdir'])
     self.rtscripts = self.macros.expand(self.macros['_rtscripts'])
     self.coverage_config_path = path.join(self.rtscripts, 'coverage')
     self.symbol_config_path = path.join(self.coverage_config_path,
                                         'symbol-sets.ini')
     self.symbol_select_path = self.macros.expand(self.macros['bsp_symbol_path'])
     self.executables = executables
     self.symbol_sets = []
     self.no_clean = int(self.macros['_no_clean'])
     self.report_format = self.macros['cov_report_format']
     self.symbol_set = symbol_set
     self.target = self.macros['arch']
     self.bsp_name = self.macros['bsp'].split('-')[0]
     self.prefix = prefix
     self.macros.define('coverage')
     self.covoar_cmd = self.macros.expand(self.macros['bsp_covoar_cmd'])
     self.covoar_cmd += ' -T ' + self.macros['arch'] + '-rtems' + str(version.version())
Beispiel #2
0
 def __init__(self, base_result_dir, config_dir, executables, trace, prefix,
              covoar_cmd):
     self.base_result_dir = base_result_dir
     self.config_dir = config_dir
     self.executables = ' '.join(executables)
     self.project_name = 'RTEMS-' + str(version.version())
     self.trace = trace
     self.prefix = prefix
     self.covoar_cmd = covoar_cmd
Beispiel #3
0
 def load_config(self, bootloader, config):
     self.config.load(config)
     #
     # Check the config file has the basic data and structure.
     #
     bootloaders = self.config.comma_list('default', 'bootloaders')
     for bl in bootloaders:
         if not self.config.has_section(bl):
             raise error.general(
                 'boot config: missing bootloader section: %s' % (bl))
         for b in self.config.comma_list(bl, 'boards'):
             if not self.config.has_section(b):
                 raise error.general(
                     'boot config: missing board section: %s' % (b))
     #
     # Is the bootloader valid?
     #
     if bootloader is not None and bootloader not in bootloaders:
         raise error.general('boot config: unknown bootloader: %s' %
                             (bootloader))
     self.macros['bootloader'] = str(bootloader)
     self.macros['version_str'] = version.string()
     self.macros['version'] = str(version.version())
     self.macros['revision'] = str(version.revision())
     if version.released():
         self.macros['released'] = '1'
     #
     # Map the config to macros. The [default] section is global. The
     # remaining sections are added as macro maps so the specalised
     # bootloaders can enable reading from a macro map to provide specific
     # values for a specific config such as a board.
     #
     for s in self.config.get_sections():
         if s != 'default':
             self.macros.set_write_map(s, add=True)
         for i in self.config.get_items(s):
             self.macros[i[0]] = i[1]
         self.macros.unset_write_map()
     self.macros.set_read_map('global')
     if bootloader is not None:
         self.macros.set_read_map(bootloader)
Beispiel #4
0
def rtems_version():
    return version.version()
Beispiel #5
0
def default_prefix():
    from rtemstoolkit import version
    return path.join(_prefix_path, version.version())
Beispiel #6
0
def rtems_version():
    return version.version()