buildtest.cli.history

Module Contents

Functions

build_history(args)

This is the entry point for command buildtest history command which reports

sorted_alphanumeric(data)

This method is used for alphanumeric sorting of files.

query_builds(build_id[, log_option, output, pager])

This method is called when user runs buildtest history query which will

list_build_history([no_header, terse, pager, color, ...])

This method is entry point for buildtest history list which prints all previous builds

process_history_data(history_files)

This method processes history files and extracts data from each build.json file

Attributes

logger

buildtest.cli.history.logger
buildtest.cli.history.build_history(args)[source]

This is the entry point for command buildtest history command which reports

Parameters:

args (dict) – Parsed arguments from ArgumentParser.parse_args

buildtest.cli.history.sorted_alphanumeric(data)[source]

This method is used for alphanumeric sorting of files.

Parameters:

data – A list of history files to sort alpha numerically

Returns:

sorted list of history files alphanumerically

Return type:

list

buildtest.cli.history.query_builds(build_id, log_option=None, output=None, pager=None)[source]

This method is called when user runs buildtest history query which will report the build.json and logfile.

Parameters:
  • build_id (int) – Build Identifier which is used for querying history file. The indentifier is an integer starting from 0

  • log_option (bool, optional) – Option to control whether log file is opened in editor. This is specified via buildtest history query -l <id>

  • output (bool, optional) – Display output.txt file which contains output of buildtest build command. This is passed via buildtest history query -o

  • pager (bool, optional) – Print output in paging format

buildtest.cli.history.list_build_history(no_header=None, terse=None, pager=None, color=None, row_count=None)[source]

This method is entry point for buildtest history list which prints all previous builds stored in BUILD_HISTORY_DIR. Each directory has a build.json file that stores content of each build that was run by buildtest build.

Parameters:
  • no_header (bool, optional) – Control whether header columns are displayed with terse format

  • terse (bool, optional) – Print output in terse format

  • pager (bool, optional) – Print output in paging format

  • color (bool, optional) – Select desired color when displaying results

  • row_count (bool, optional) – Print row count of all previous builds

buildtest.cli.history.process_history_data(history_files)[source]

This method processes history files and extracts data from each build.json file and returns a list of data for each build.

Parameters:

history_files (list) – A list of history files to process

Returns:

A list containing build history data

Return type:

list