buildtest.cli.report

Module Contents

Classes

Report

Functions

is_int(val)

report_cmd(args)

class buildtest.cli.report.Report(filter_args, format_args, latest, oldest, report_file=BUILD_REPORT)
display_table
filter_fields = ['buildspec', 'name', 'executor', 'state', 'tags', 'returncode']
format_fields = ['buildspec', 'command', 'compiler', 'endtime', 'errfile', 'executor', 'full_id', 'hostname',...
_check_filter_fields(self)
_check_format_fields(self)

Check all format arguments (–format) are valid, the arguments are specified in format (–format key1=val1,key2=val2). We make sure each key is valid format field.

_filter_test_by_executor(self, test)
_filter_test_by_names(self, name)
_filter_test_by_returncode(self, test)
_filter_test_by_state(self, test)
_filter_test_by_tags(self, test)
filter_buildspecs_from_report(self)
get_report_file(self)
load(self)

This method is responsible for loading report file. If file not found or report is empty dictionary we raise an error. The report file is loaded using json.loads and return value is a dictionary containing entire report of all tests.

print_display_table(self)
print_filter_fields(self)

Implements command buildtest report --helpfilter

print_format_fields(self)

Implements command buildtest report --helpformat

process_report(self)
buildtest.cli.report.is_int(val)
buildtest.cli.report.report_cmd(args)