summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChris Johns <chrisj@rtems.org>2015-05-22 12:20:41 +1000
committerChris Johns <chrisj@rtems.org>2015-05-22 12:20:41 +1000
commit4bd058ea7c72810ef32fbb03ab6d629d660e28a4 (patch)
tree1c96af32d89e00f9cfa373b87f67a310acc1d023
parentDon't let a GCC port install override base Clang for FreeBSD 10+ (diff)
downloadrtems-source-builder-4bd058ea7c72810ef32fbb03ab6d629d660e28a4.tar.bz2
sb: Always generate an XML report.
-rw-r--r--source-builder/sb/setbuilder.py43
1 files changed, 22 insertions, 21 deletions
diff --git a/source-builder/sb/setbuilder.py b/source-builder/sb/setbuilder.py
index d46dabd..ae1b670 100644
--- a/source-builder/sb/setbuilder.py
+++ b/source-builder/sb/setbuilder.py
@@ -90,35 +90,31 @@ class buildset:
if not self.opts.dry_run():
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 \
and not _build.macros.get('%{_disable_reporting}') \
and (not _build.opts.get_arg('--no-report') \
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:
format = 'text'
+ if format == 'text':
+ ext = '.txt'
+ elif format == 'asciidoc':
ext = '.txt'
+ elif format == 'html':
+ ext = '.html'
+ elif format == 'xml':
+ ext = '.xml'
+ elif format == 'ini':
+ ext = '.ini'
else:
- if len(format) != 2:
- 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]))
+ raise error.general('invalid report format: %s' % (format))
buildroot = _build.config.abspath('%{buildroot}')
prefix = _build.macros.expand('%{_prefix}')
name = _build.main_package().name() + ext
@@ -353,6 +349,11 @@ class buildset:
self.report(configs[s], b,
copy.copy(self.opts),
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:
self.bset_tar(b)
else: