Changeset 92a340c in rtems-tools


Ignore:
Timestamp:
Oct 25, 2018, 8:19:15 PM (6 months ago)
Author:
Vijay Kumar Banerjee <vijaykumar9597@…>
Branches:
master
Children:
087be8c
Parents:
36fde51
git-author:
Vijay Kumar Banerjee <vijaykumar9597@…> (10/25/18 20:19:15)
git-committer:
Joel Sherrill <joel@…> (10/25/18 20:47:26)
Message:

Coverage : Generate reports using the object files in cpukit

Location:
tester
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • tester/rt/coverage.py

    r36fde51 r92a340c  
    245245                 symbol_select_path,
    246246                 symbol_set,
    247                  build_dir):
     247                 build_dir,
     248                 bsp_name,
     249                 target):
    248250        self.symbol_select_file = symbol_select_path
    249251        self.symbol_file = symbol_config_path
     
    252254        self.symbol_set = symbol_set
    253255        self.ssets = []
     256        self.bsp_name = bsp_name
     257        self.target = target
    254258
    255259    def parse(self):
     
    265269                lib = path.join(self.build_dir, config.get('libraries', sset))
    266270                self.symbol_sets[sset] = lib.encode('utf-8')
     271                ss = self.symbol_sets[sset]
     272                ss = ss.replace('@BSP@', self.bsp_name)
     273                ss = ss.replace('@BUILD-TARGET@', self.target)
     274                self.symbol_sets[sset] = ss
    267275            return self.ssets
    268276        except:
    269             raise error.general('Symbol set parsing failed')
     277            raise error.general('Symbol set parsing failed for %s' % (sset))
    270278
    271279    def write_ini(self, symbol_set):
     
    276284            config.set('symbol-sets', 'sets', sset)
    277285            config.add_section(sset)
    278             config.set(sset, 'libraries', self.symbol_sets[sset])
     286            object_files = [o for o in os.listdir(self.symbol_sets[sset]) if o[-1] == 'o']
     287            object_paths = []
     288            for o in object_files:
     289                object_paths.append(path.join(self.symbol_sets[sset], o))
     290            config.set(sset, 'libraries', ','.join(object_paths))
    279291            with open(self.symbol_select_file, 'w') as conf:
    280                 config.write(conf)
     292                    config.write(conf)
    281293        except:
    282             raise error.general('symbol parser write failed')
     294            raise error.general('symbol parser write failed for %s' % (sset))
    283295
    284296class covoar(object):
     
    358370        self.symbol_set = symbol_set
    359371        self.target = self.macros['target']
     372        self.bsp_name = self.macros['bsp'].split('-')[0]
    360373
    361374    def run(self):
     
    367380                                   self.symbol_select_path,
    368381                                   self.symbol_set,
    369                                    build_dir)
     382                                   build_dir,
     383                                   self.bsp_name,
     384                                   self.target)
    370385            symbol_sets = parser.parse()
    371386            for sset in symbol_sets:
  • tester/rtems/testing/coverage/symbol-sets.ini

    r36fde51 r92a340c  
    3030
    3131[symbol-sets]
    32 sets = score,rtems,sapi,libdl,posix,libirfs,libdosfs,libdevfs,libimfs,libcsupport,libbspcmdline,libcpuuse,libstackchk,libfsmount,libstringto,libdevnull,libdumpbuf,libblock
     32sets = score,rtems,sapi,libdl,posix,librfs,libdosfs,libdevfs,libimfs,libbspcmdline,libcpuuse,libstackchk,libfsmount,libstringto,libdevnull,libdumpbuf,libblock
    3333
    3434[libraries]
    35 score         = @BUILD-TARGET@/c/@BSP@/cpukit/score/libscore.a
    36 rtems         = @BUILD-TARGET@/c/@BSP@/cpukit/rtems/librtems.a
    37 sapi          = @BUILD-TARGET@/c/@BSP@/cpukit/sapi/libsapi.a
    38 libdl         = @BUILD-TARGET@/c/@BSP@/cpukit/libdl/libdl.a
    39 posix         = @BUILD-TARGET@/c/@BSP@/cpukit/posix/libposix.a
    40 libirfs       = @BUILD-TARGET@/c/@BSP@/cpukit/libfs/librfs.a
    41 libdosfs      = @BUILD-TARGET@/c/@BSP@/cpukit/libfs/libdosfs.a
    42 libdevfs      = @BUILD-TARGET@/c/@BSP@/cpukit/libfs/libdevfs.a
    43 libimfs       = @BUILD-TARGET@/c/@BSP@/cpukit/libfs/libimfs.a
    44 #libdefaultsfs = @BUiLD-TARGET@/c/@BSP@/cpukit/libfs/libdefaultfs.a
    45 #libjffs2      = @BUILD-TARGET@/c/@BSP@/cpukit/libfs/libjffs2.a
    46 #dtc           = @BUILD-TARGET@/c/@BSP@/cpukit/libfdt/libfdt.a
    47 #libdrvmgr     = @BUILD-TARGET@/c/@BSP@/cpukit/libdrvmgr/libdrvmgr.a
    48 #libi2c        = @BUILD-TARGET@/c/@BSP@/cpukit/libi2c/libi2c.a
    49 libcsupport   = @BUILD-TARGET@/c/@BSP@/cpukit/libcsupport/libcsupport.a
    50 libbspcmdline = @BUILD-TARGET@/c/@BSP@/cpukit/libmisc/libbspcmdline.a
    51 libcpuuse     = @BUILD-TARGET@/c/@BSP@/cpukit/libmisc/libcpuuse.a
    52 libstackchk   = @BUILD-TARGET@/c/@BSP@/cpukit/libmisc/libstackchk.a
    53 libfsmount    = @BUILD-TARGET@/c/@BSP@/cpukit/libmisc/libfsmount.a
    54 libstringto   = @BUILD-TARGET@/c/@BSP@/cpukit/libmisc/libstringto.a
    55 libdevnull    = @BUILD-TARGET@/c/@BSP@/cpukit/libmisc/libdevnull.a
    56 libdumpbuf    = @BUILD-TARGET@/c/@BSP@/cpukit/libmisc/libdumpbuf.a
    57 #libcapture    = @BUILD-TARGET@/c/@BSP@/cpukit/libmisc/libcapture.a
    58 #libdummy      = @BUILD-TARGET@/c/@BSP@/cpukit/libmisc/libdummy.a
    59 #libmonitor    = @BUILD-TARGET@/c/@BSP@/cpukit/libmisc/libmonitor.a
    60 #libmouse      = @BUILD-TARGET@/c/@BSP@/cpukit/libmisc/libmouse.a
    61 #libmw-fb      = @BUILD-TARGET@/c/@BSP@/cpukit/libmisc/libmw-fb.a
    62 #libredirector = @BUILD-TARGET@/c/@BSP@/cpukit/libmisc/libredirector.a
    63 #librtemsfdt   = @BUILD-TARGET@/c/@BSP@/cpukit/libmisc/librtemsfdt.a
    64 #libserdbg     = @BUILD-TARGET@/c/@BSP@/cpukit/libmisc/libserdbg.a
    65 #libshell      = @BUILD-TARGET@/c/@BSP@/cpukit/libmisc/libshell.a
    66 #libtestsupport= @BUILD-TARGET@/c/@BSP@/cpukit/libmisc/libtestsupport.a
    67 #libuntar      = @BUILD-TARGET@/c/@BSP@/cpukit/libmisc/libuntar.a
    68 #libutf8proc   = @BUILD-TARGET@/c/@BSP@/cpukit/libmisc/libutf8proc.a
    69 #libuuid       = @BUILD-TARGET@/c/@BSP@/cpukit/libmisc/libuuid.a
    70 #libxz         = @BUILD-TARGET@/c/@BSP@/cpukit/libmisc/libxz.a
    71 libblock      = @BUILD-TARGET@/c/@BSP@/cpukit/libblock/libblock.a
    72 #libpci        = @BUILD-TARGET@/c/@BSP@/cpukit/libpci/libpci.a
    73 #librpc        = @BUILD-TARGET@/c/@BSP@/cpukit/librpc/librpc.a
    74 #libxdr        = @BUILD-TARGET@/c/@BSP@/cpukit/librpc/libxdr.a
    75 #libcrypt      = @BUILD-TARGET@/c/@BSP@/cpukit/libcrypt/libcrypt.a
    76 #libmd         = @BUILD-TARGET@/c/@BSP@/cpukit/libmd/libmd.a
    77 #libstdthreads = @BUILD-TARGET@/c/@BSP@/cpukit/libstdthreads/libstdthreads.a
    78 #zlib          = @BUILD-TARGET@/c/@BSP@/cpukit/zlib/libz.a
     35score         = @BUILD-TARGET@/c/@BSP@/cpukit/score/src
     36rtems         = @BUILD-TARGET@/c/@BSP@/cpukit/rtems/src
     37sapi          = @BUILD-TARGET@/c/@BSP@/cpukit/sapi/src
     38libdl         = @BUILD-TARGET@/c/@BSP@/cpukit/libdl
     39posix         = @BUILD-TARGET@/c/@BSP@/cpukit/posix/src
     40librfs       = @BUILD-TARGET@/c/@BSP@/cpukit/libfs/src/rfs
     41libdosfs      = @BUILD-TARGET@/c/@BSP@/cpukit/libfs/src/dosfs
     42libdevfs      = @BUILD-TARGET@/c/@BSP@/cpukit/libfs/src/devfs
     43libimfs       = @BUILD-TARGET@/c/@BSP@/cpukit/libfs/src/imfs
     44#libdefaultsfs = @BUiLD-TARGET@/c/@BSP@/cpukit/libfs
     45#libjffs2      = @BUILD-TARGET@/c/@BSP@/cpukit/libfs
     46#dtc           = @BUILD-TARGET@/c/@BSP@/cpukit/libfdt
     47#libdrvmgr     = @BUILD-TARGET@/c/@BSP@/cpukit/libdrvmgr
     48#libi2c        = @BUILD-TARGET@/c/@BSP@/cpukit/libi2c
     49#libcsupport   = @BUILD-TARGET@/c/@BSP@/cpukit/libcsupport/src
     50libbspcmdline = @BUILD-TARGET@/c/@BSP@/cpukit/libmisc/bspcmdline
     51libcpuuse     = @BUILD-TARGET@/c/@BSP@/cpukit/libmisc/cpuuse
     52libstackchk   = @BUILD-TARGET@/c/@BSP@/cpukit/libmisc/stackchk
     53libfsmount    = @BUILD-TARGET@/c/@BSP@/cpukit/libmisc/fsmount
     54libstringto   = @BUILD-TARGET@/c/@BSP@/cpukit/libmisc/stringto
     55libdevnull    = @BUILD-TARGET@/c/@BSP@/cpukit/libmisc/devnull
     56libdumpbuf    = @BUILD-TARGET@/c/@BSP@/cpukit/libmisc/dumpbuf
     57#libcapture    = @BUILD-TARGET@/c/@BSP@/cpukit/libmisc
     58#libdummy      = @BUILD-TARGET@/c/@BSP@/cpukit/libmisc
     59#libmonitor    = @BUILD-TARGET@/c/@BSP@/cpukit/libmisc
     60#libmouse      = @BUILD-TARGET@/c/@BSP@/cpukit/libmisc
     61#libmw-fb      = @BUILD-TARGET@/c/@BSP@/cpukit/libmisc
     62#libredirector = @BUILD-TARGET@/c/@BSP@/cpukit/libmisc
     63#librtemsfdt   = @BUILD-TARGET@/c/@BSP@/cpukit/libmisc
     64#libserdbg     = @BUILD-TARGET@/c/@BSP@/cpukit/libmisc
     65#libshell      = @BUILD-TARGET@/c/@BSP@/cpukit/libmisc
     66#libtestsupport= @BUILD-TARGET@/c/@BSP@/cpukit/libmisc
     67#libuntar      = @BUILD-TARGET@/c/@BSP@/cpukit/libmisc
     68#libutf8proc   = @BUILD-TARGET@/c/@BSP@/cpukit/libmisc
     69#libuuid       = @BUILD-TARGET@/c/@BSP@/cpukit/libmisc
     70#libxz         = @BUILD-TARGET@/c/@BSP@/cpukit/libmisc
     71libblock      = @BUILD-TARGET@/c/@BSP@/cpukit/libblock/src
     72#libpci        = @BUILD-TARGET@/c/@BSP@/cpukit/libpci
     73#librpc        = @BUILD-TARGET@/c/@BSP@/cpukit/librpc
     74#libxdr        = @BUILD-TARGET@/c/@BSP@/cpukit/librpc
     75#libcrypt      = @BUILD-TARGET@/c/@BSP@/cpukit/libcrypt
     76#libmd         = @BUILD-TARGET@/c/@BSP@/cpukit/libmd
     77#libstdthreads = @BUILD-TARGET@/c/@BSP@/cpukit/libstdthreads
     78#zlib          = @BUILD-TARGET@/c/@BSP@/cpukit/zlib
Note: See TracChangeset for help on using the changeset viewer.