buildtest.config

Module Contents

Functions

check_settings(settings_path=None, executor_check=True, retrieve_settings=False)

Checks all keys in configuration file (settings/config.yml) are valid

load_settings(settings_path=None)

Load the default settings file if no argument is specified.

resolve_settings_file()

Returns path to buildtest settings file that should be used. If there

validate_lsf_executors(lsf_executors)

This method validates all LSF executors. We check if queue is available

validate_slurm_executors(slurm_executor)

This method will validate slurm executors, we check if partition, qos,

buildtest.config.check_settings(settings_path=None, executor_check=True, retrieve_settings=False)

Checks all keys in configuration file (settings/config.yml) are valid keys and ensure value of each key matches expected type. For some keys special logic is taken to ensure values are correct and directory path exists. If any error is found buildtest will terminate immediately.

Parameters
  • settings_path (str, optional) – Path to buildtest settings file

  • executor_check (bool) – boolean to control if executor checks are performed

  • retrieve_settings (bool) – return loaded buildtest settings that is validated by schema. By default, this method doesn’t return anything other than validating buildtest settings

Returns

returns gracefully if all checks passes otherwise terminate immediately

Return type

exit code 1 if checks failed

buildtest.config.load_settings(settings_path=None)

Load the default settings file if no argument is specified.

Parameters

settings_path (str, optional) – Path to buildtest settings file

buildtest.config.logger
buildtest.config.resolve_settings_file()

Returns path to buildtest settings file that should be used. If there is a user defined buildtest settings ($HOME/.buildtest/config.yml) it will be honored, otherwise default settings from buildtest will be used.

buildtest.config.validate_lsf_executors(lsf_executors)

This method validates all LSF executors. We check if queue is available and in Open:Active state. :param lsf_executors: A list of LSF executors to validate :type lsf_executors: dict

buildtest.config.validate_slurm_executors(slurm_executor)

This method will validate slurm executors, we check if partition, qos, and cluster fields are valid values by retrieving details from slurm configuration. These checks are performed on fields partition, qos or cluster if specified in executor section.

Parameters

slurm_executor (dict) – list of slurm executors defined in loaded buildtest configuration