buildtest.cli.inspect
¶
This module implements methods for buildtest inspect command that can be used to retrieve test record from report file in JSON format.
Module Contents¶
Functions¶
|
Entry point for |
|
Return a list of builders given input test names by search the report file for valid records. If test is found it will be returned as a builder name. If names |
|
This method list an output of test id, name, and buildspec file from the report cache. The default |
|
Entry point for |
|
This method implements command |
|
Implements command |
- buildtest.cli.inspect.inspect_cmd(args, report_file=None)[source]¶
Entry point for
buildtest inspect
command- Parameters
args (dict) – Parsed arguments from ArgumentParser.parse_args
- buildtest.cli.inspect.fetch_test_names(report, names)[source]¶
Return a list of builders given input test names by search the report file for valid records. If test is found it will be returned as a builder name. If names are specified without test ID then we retrieve latest record for test name. If names are specified with ID we find the first matching test record.
- buildtest.cli.inspect.inspect_list(report, terse=None, header=None, builder=None)[source]¶
This method list an output of test id, name, and buildspec file from the report cache. The default behavior is to display output in table format though this can be changed with terse format which will display in parseable format. This method implements command
buildtest inspect list
- buildtest.cli.inspect.inspect_query(report, args)[source]¶
Entry point for
buildtest inspect query
command.- Parameters
args (dict) –
Parsed arguments from ArgumentParser.parse_args
report (str) – Path to report file
- buildtest.cli.inspect.inspect_buildspec(report, input_buildspecs, all_records)[source]¶
This method implements command
buildtest inspect buildspec
- Parameters
report (str) – Path to report file
input_buildspecs (list) – List of buildspecs to search in report file. This is specified as positional arguments to
buildtest inspect buildspec
all_records (bool) – Determine whether to display all records for every test that matches the buildspec. By default we retrieve the latest record.
- buildtest.cli.inspect.inspect_by_name(report, names)[source]¶
Implements command
buildtest inspect name
which will print all test records by given name in JSON format.# get last run for test exit1_fail buildtest inspect name exit1_fail
# get record exit1_fail that starts with id 123 buildtest inspect name exit1_fail/123