buildtest.cli.compilers
¶
Module Contents¶
Classes¶
|
Functions¶
|
|
|
This method implements |
|
This method implements |
- buildtest.cli.compilers.compiler_test(configuration, compiler_names=None)[source]¶
This method implements
buildtest config compilers test
which tests the compilers with the corresponding modules if set. This command iterates over all compilers and perform the module load test and show an output of each compiler.- Parameters
configuration (buildtest.config.SiteConfiguration) – An instance of SiteConfiguration class
compiler_names (list, optional) – A list of compiler names to test
- buildtest.cli.compilers.compiler_find(configuration, modulepath=None, detailed=None, update=None, filepath=None)[source]¶
This method implements
buildtest config compilers find
which detects new compilers based on module names defined in configuration. If system has Lmod we use Lmodule API to detect the compilers. For environment-modules we search for all modules in current$MODULEPATH
.- Parameters
configuration (buildtest.config.SiteConfiguration) – An instance of SiteConfiguration class
modulepath (List, optional) – A list of directories to search for modules via MODULEPATH to detect compilers
detailed (bool, optional) – Flag for printing a detailed report.
update (bool, optional) – Flag for updating configuration file with new compilers
filepath (str, optional) – An option to specify an alternative filepath where configuration file will be written
- class buildtest.cli.compilers.BuildtestCompilers(configuration, settings_file=None, detailed=False, modulepath=None)[source]¶
- Parameters
settings_file – Specify an alternate settings file to use when finding compilers
settings_file – str, optional
compilers (dict) – compiler section from buildtest configuration.
- compiler_table¶
- find_compilers()[source]¶
This method returns compiler modules discovered depending on your module system. If you have Lmod system we use spider utility to detect modules, this is leveraging Lmodule API. If you have environment-modules we parse output of
module av -t
.- Returns
return a list of compiler modules detected based on module key name.
- Return type
- _validate_modules(module_dict)[source]¶
This method will validate modules by running
module load
test for all discovered modules specified in parameterdiscovered_modules
. This method returns a list of modules that were valid, if all tests pass we return the same list. A module test pass if we get a returncode 0.
- _update_compiler_section()[source]¶
This method will update the compiler section by adding new compilers if found
- Returns
Updated compiler section for buildtest configuration
- Return type
- print_json()[source]¶
Prints compiler section in JSON, this implements
buildtest config compilers --json