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 alpha numeric sorting of files.

print_terse(table[, no_header, consoleColor])

This method prints the buildtest history list in terse mode which is run via command buildtest history list --terse

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

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

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

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

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 alpha numeric 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.print_terse(table, no_header=None, consoleColor=None)[source]

This method prints the buildtest history list in terse mode which is run via command buildtest history list --terse

Parameters:
  • table (dict) – Table with columns required for the buildtest history list command.

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

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

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.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