Allowing builds to report under different package name

pull/1423/head
Brian Daniels 2015-11-06 13:38:30 -06:00
parent bdb23b3cfb
commit 7f28e18afe
3 changed files with 7 additions and 6 deletions

View File

@ -180,12 +180,12 @@ if __name__ == '__main__':
# Write summary of the builds
if options.report_build_file_name:
file_report_exporter = ReportExporter(ResultExporterType.JUNIT)
file_report_exporter = ReportExporter(ResultExporterType.JUNIT, package="build")
file_report_exporter.report_to_file(report, options.report_build_file_name, test_suite_properties=properties)
print "\n\nCompleted in: (%.2f)s" % (time() - start)
print_report_exporter = ReportExporter(ResultExporterType.PRINT)
print_report_exporter = ReportExporter(ResultExporterType.PRINT, package="build")
status = print_report_exporter.report(report)
if not status:

View File

@ -1473,7 +1473,7 @@ def singletest_in_cli_mode(single_test):
print
# Write summary of the builds
print_report_exporter = ReportExporter(ResultExporterType.PRINT)
print_report_exporter = ReportExporter(ResultExporterType.PRINT, package="build")
status = print_report_exporter.report(build_report)
# Store extra reports in files
@ -1487,7 +1487,7 @@ def singletest_in_cli_mode(single_test):
report_exporter.report_to_file(test_summary_ext, single_test.opts_report_junit_file_name, test_suite_properties=test_suite_properties_ext)
if single_test.opts_report_build_file_name:
# Export build results as html report to sparate file
report_exporter = ReportExporter(ResultExporterType.JUNIT)
report_exporter = ReportExporter(ResultExporterType.JUNIT, package="build")
report_exporter.report_to_file(build_report, single_test.opts_report_build_file_name, test_suite_properties=build_properties)
# Returns True if no build failures of the test projects or their dependencies

View File

@ -68,8 +68,9 @@ class ReportExporter():
</script>
"""
def __init__(self, result_exporter_type):
def __init__(self, result_exporter_type, package="test"):
self.result_exporter_type = result_exporter_type
self.package = package
def report(self, test_summary_ext, test_suite_properties=None):
""" Invokes report depending on exporter_type set in constructor
@ -265,7 +266,7 @@ class ReportExporter():
for test_no in test_ids:
test_result = test_res[test_no]
name = test_result['description']
classname = 'test.%s.%s.%s'% (target, toolchain, test_result['id'])
classname = '%s.%s.%s.%s'% (self.package, target, toolchain, test_result['id'])
elapsed_sec = test_result['elapsed_time']
_stdout = test_result['output']