info_status
Library for checking if classes has info and status commands.
report_info_status_errors
SYNOPSIS
report_info_status_errors(missing_info, missing_status, unexpected_info, unexpected_status)
DESCRIPTION
Prints its input lists and quits Simics with an error.
First each provided list is printed in a human readable manner and then the function quits Simics with the result 1, which will be detected by the test system as a test failure.
Arguments:
- missing_info
a list of classes which do not have
infocommands - missing_status
a list of classes which do not have
statuscommands - unexpected_info
a list of classes which have
infocommands, but which were on the info command passlist - unexpected_status
a list of classes which have
statuscommands, but which were on the status command passlist
check_for_info_status
SYNOPSIS
check_for_info_status(modules, info_passlist = [], status_passlist = [], report_errors = \<function report_info_status_errors\>)
DESCRIPTION
Check that the classes in a list of modules have info and status commands.
Classes are Simics configuration classes, not python classes. The function
checks all the classes in the named modules to see if they have info and
status commands. If any such command is missing it will be detected as an
error, but you can provide passlists. If a class is passlisted and still has
the command it will be detected as an error. If any errors are detected the
function calls a function to report this. By default the
report_info_status_error is called, but you can override this with the
report_errors argument.
The modules named in modules will be loaded into Simics as a side effect of running this test.
Arguments:
- modules the modules whose classes to test
- info_passlist the list of classes which should not have info commands
- status_passlist the list of classes which should not have status commands
- report_errors the function to call to report errors