mirror of
https://git.rtems.org/rtems-source-builder
synced 2024-10-09 07:15:10 +08:00
sb: Always generate an XML report.
This commit is contained in:
parent
d15a7f8861
commit
4bd058ea7c
@ -90,35 +90,31 @@ class buildset:
|
|||||||
if not self.opts.dry_run():
|
if not self.opts.dry_run():
|
||||||
path.copy_tree(src, dst)
|
path.copy_tree(src, dst)
|
||||||
|
|
||||||
def report(self, _config, _build, opts, macros):
|
def report(self, _config, _build, opts, macros, format = None):
|
||||||
if len(_build.main_package().name()) > 0 \
|
if len(_build.main_package().name()) > 0 \
|
||||||
and not _build.macros.get('%{_disable_reporting}') \
|
and not _build.macros.get('%{_disable_reporting}') \
|
||||||
and (not _build.opts.get_arg('--no-report') \
|
and (not _build.opts.get_arg('--no-report') \
|
||||||
or _build.opts.get_arg('--mail')):
|
or _build.opts.get_arg('--mail')):
|
||||||
format = _build.opts.get_arg('--report-format')
|
if format is None:
|
||||||
|
format = _build.opts.get_arg('--report-format')
|
||||||
|
if format is not None:
|
||||||
|
if len(format) != 2:
|
||||||
|
raise error.general('invalid report format option: %s' % ('='.join(format)))
|
||||||
|
format = format[1]
|
||||||
if format is None:
|
if format is None:
|
||||||
format = 'text'
|
format = 'text'
|
||||||
|
if format == 'text':
|
||||||
ext = '.txt'
|
ext = '.txt'
|
||||||
|
elif format == 'asciidoc':
|
||||||
|
ext = '.txt'
|
||||||
|
elif format == 'html':
|
||||||
|
ext = '.html'
|
||||||
|
elif format == 'xml':
|
||||||
|
ext = '.xml'
|
||||||
|
elif format == 'ini':
|
||||||
|
ext = '.ini'
|
||||||
else:
|
else:
|
||||||
if len(format) != 2:
|
raise error.general('invalid report format: %s' % (format))
|
||||||
raise error.general('invalid report format option: %s' % ('='.join(format)))
|
|
||||||
if format[1] == 'text':
|
|
||||||
format = 'text'
|
|
||||||
ext = '.txt'
|
|
||||||
elif format[1] == 'asciidoc':
|
|
||||||
format = 'asciidoc'
|
|
||||||
ext = '.txt'
|
|
||||||
elif format[1] == 'html':
|
|
||||||
format = 'html'
|
|
||||||
ext = '.html'
|
|
||||||
elif format[1] == 'xml':
|
|
||||||
format = 'xml'
|
|
||||||
ext = '.xml'
|
|
||||||
elif format[1] == 'ini':
|
|
||||||
format = 'ini'
|
|
||||||
ext = '.ini'
|
|
||||||
else:
|
|
||||||
raise error.general('invalid report format: %s' % (format[1]))
|
|
||||||
buildroot = _build.config.abspath('%{buildroot}')
|
buildroot = _build.config.abspath('%{buildroot}')
|
||||||
prefix = _build.macros.expand('%{_prefix}')
|
prefix = _build.macros.expand('%{_prefix}')
|
||||||
name = _build.main_package().name() + ext
|
name = _build.main_package().name() + ext
|
||||||
@ -353,6 +349,11 @@ class buildset:
|
|||||||
self.report(configs[s], b,
|
self.report(configs[s], b,
|
||||||
copy.copy(self.opts),
|
copy.copy(self.opts),
|
||||||
copy.copy(self.macros))
|
copy.copy(self.macros))
|
||||||
|
# Always product an XML report.
|
||||||
|
self.report(configs[s], b,
|
||||||
|
copy.copy(self.opts),
|
||||||
|
copy.copy(self.macros),
|
||||||
|
format = 'xml')
|
||||||
if s == len(configs) - 1 and not have_errors:
|
if s == len(configs) - 1 and not have_errors:
|
||||||
self.bset_tar(b)
|
self.bset_tar(b)
|
||||||
else:
|
else:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user