Changeset b762312 in rtems-tools


Ignore:
Timestamp:
Jun 4, 2018, 8:44:43 PM (12 months ago)
Author:
Vijay Kumar Banerjee <vijaykumar9597@…>
Branches:
master
Children:
1cd75c4
Parents:
99c4974
git-author:
Vijay Kumar Banerjee <vijaykumar9597@…> (06/04/18 20:44:43)
git-committer:
Joel Sherrill <joel@…> (06/05/18 23:09:19)
Message:

tester: Add script to generate html coverage report from covoar output

Add support in tester to run covoar and generate an html report to display
the summary of the coverage reports generated from covoar.

Co-authored-by : Cillian O'Donnell <cpodonnell8@…>

Files:
2 added
4 edited

Legend:

Unmodified
Added
Removed
  • .gitignore

    r99c4974 rb762312  
    1010build
    1111VERSION*
     12*symbols.ini
  • tester/rt/test.py

    r99c4974 rb762312  
    4949from rtemstoolkit import stacktraces
    5050from rtemstoolkit import version
     51from rtemstoolkit import check
    5152
    5253from . import bsps
     
    5556from . import options
    5657from . import report
     58from . import coverage
    5759
    5860class log_capture(object):
     
    148150    def run(self):
    149151        self.thread = threading.Thread(target = self.runner,
    150                                        name = 'test[%s]' % path.basename(self.executable))
     152                            name = 'test[%s]' % path.basename(self.executable))
    151153        self.thread.start()
    152154
     
    222224    default_exefilter = '*.exe'
    223225    try:
    224         optargs = { '--rtems-tools': 'The path to the RTEMS tools',
    225                     '--rtems-bsp':   'The RTEMS BSP to run the test on',
    226                     '--user-config': 'Path to your local user configuration INI file',
    227                     '--report-mode': 'Reporting modes, failures (default),all,none',
    228                     '--list-bsps':   'List the supported BSPs',
    229                     '--debug-trace': 'Debug trace based on specific flags',
    230                     '--filter':      'Glob that executables must match to run (default: ' +
     226        optargs = { '--rtems-tools':    'The path to the RTEMS tools',
     227                    '--rtems-bsp':      'The RTEMS BSP to run the test on',
     228                    '--user-config':    'Path to your local user configuration INI file',
     229                    '--report-mode':    'Reporting modes, failures (default),all,none',
     230                    '--list-bsps':      'List the supported BSPs',
     231                    '--debug-trace':    'Debug trace based on specific flags',
     232                    '--filter':         'Glob that executables must match to run (default: ' +
    231233                              default_exefilter + ')',
    232                     '--stacktrace':  'Dump a stack trace on a user termination (^C)' }
     234                    '--stacktrace':     'Dump a stack trace on a user termination (^C)',
     235                    '--coverage':       'Perform coverage analysis of test executables.'}
    233236        mailer.append_options(optargs)
    234237        opts = options.load(sys.argv,
     
    258261        opts.log_info()
    259262        log.output('Host: ' + host.label(mode = 'all'))
     263        executables = find_executables(opts.params(), exe_filter)
    260264        debug_trace = opts.find_arg('--debug-trace')
    261265        if debug_trace:
     
    280284        bsp = config.load(bsp[1], opts)
    281285        bsp_config = opts.defaults.expand(opts.defaults['tester'])
     286        coverage_enabled = opts.find_arg('--coverage')
     287        if coverage_enabled:
     288            if len(coverage_enabled) == 2:
     289                coverage_runner = coverage.coverage_run(opts.defaults,
     290                                                coverage_enabled[1],
     291                                                executables)
     292            else:
     293                coverage_runner = coverage.coverage_run(opts.defaults, 0,
     294                                                        executables)
    282295        report_mode = opts.find_arg('--report-mode')
    283296        if report_mode:
     
    289302        else:
    290303            report_mode = 'failures'
    291         executables = find_executables(opts.params(), exe_filter)
    292304        if len(executables) == 0:
    293305            raise error.general('no executables supplied')
     
    366378                    'Log', '===', ''] + output.get()
    367379            mail.send(to_addr, subject, os.linesep.join(body))
     380        if coverage_enabled:
     381            coverage_runner.run()
    368382
    369383    except error.general as gerr:
  • tester/rtems/testing/bsps/leon3-qemu-cov.ini

    r99c4974 rb762312  
    3232# The Leon 3 QEMU BSP
    3333#
    34 [leon3-qemu]
     34[leon3-qemu-cov]
    3535bsp               = leon3-qemu
    3636arch              = sparc
     37target            = sparc-rtems5
    3738tester            = %{_rtscripts}/qemu.cfg
    3839bsp_qemu_opts     = %{qemu_opts_base} -M leon3_generic
  • tester/rtems/testing/qemu.cfg

    r99c4974 rb762312  
    5252# Qemu common option patterns.
    5353#
    54 #%define qemu_opts_base   -no-reboot -monitor none -serial stdio -nographic
    55 %define qemu_opts_base   -no-reboot -serial null -serial mon:stdio -nographic
     54%define qemu_opts_base   -no-reboot -monitor none -serial stdio -nographic
     55#%define qemu_opts_base   -no-reboot -serial null -serial mon:stdio -nographic
    5656%define qemu_opts_no_net -net none
    5757
Note: See TracChangeset for help on using the changeset viewer.