def _postprocess_list_avail(self): """Create all the additional info that can be requested (exit at the end)""" msg = '' # dump supported configuration file constants if self.options.avail_cfgfile_constants: msg += self.avail_cfgfile_constants() # dump possible easyconfig params if self.options.avail_easyconfig_params: msg += avail_easyconfig_params( self.options.easyblock, self.options.avail_easyconfig_params) # dump easyconfig template options if self.options.avail_easyconfig_templates: msg += template_documentation() # dump easyconfig constant options if self.options.avail_easyconfig_constants: msg += constant_documentation() # dump easyconfig license options if self.options.avail_easyconfig_licenses: msg += license_documentation() # dump available easyblocks if self.options.list_easyblocks: msg += self.avail_easyblocks() # dump known toolchains if self.options.list_toolchains: msg += self.avail_toolchains() # dump known repository types if self.options.avail_repositories: msg += self.avail_repositories() # dump supported modules tools if self.options.avail_modules_tools: msg += self.avail_list('modules tools', avail_modules_tools()) # dump supported module naming schemes if self.options.avail_module_naming_schemes: msg += self.avail_list('module naming schemes', avail_module_naming_schemes()) # dump default list of config files that are considered if self.options.show_default_configfiles: msg += self.show_default_configfiles() # dump default moduleclasses with description if self.options.show_default_moduleclasses: msg += self.show_default_moduleclasses() if self.options.unittest_file: self.log.info(msg) else: print msg sys.exit(0)
def _postprocess_list_avail(self): """Create all the additional info that can be requested (exit at the end)""" msg = "" # dump supported configuration file constants if self.options.avail_cfgfile_constants: msg += self.avail_cfgfile_constants() # dump possible easyconfig params if self.options.avail_easyconfig_params: msg += avail_easyconfig_params(self.options.easyblock, self.options.avail_easyconfig_params) # dump easyconfig template options if self.options.avail_easyconfig_templates: msg += template_documentation() # dump easyconfig constant options if self.options.avail_easyconfig_constants: msg += constant_documentation() # dump easyconfig license options if self.options.avail_easyconfig_licenses: msg += license_documentation() # dump available easyblocks if self.options.list_easyblocks: msg += self.avail_easyblocks() # dump known toolchains if self.options.list_toolchains: msg += self.avail_toolchains() # dump known repository types if self.options.avail_repositories: msg += self.avail_repositories() # dump supported modules tools if self.options.avail_modules_tools: msg += self.avail_list("modules tools", avail_modules_tools()) # dump supported module naming schemes if self.options.avail_module_naming_schemes: msg += self.avail_list("module naming schemes", avail_module_naming_schemes()) # dump default list of config files that are considered if self.options.show_default_configfiles: msg += self.show_default_configfiles() # dump default moduleclasses with description if self.options.show_default_moduleclasses: msg += self.show_default_moduleclasses() if self.options.unittest_file: self.log.info(msg) else: print msg sys.exit(0)
def _postprocess_list_avail(self): """Create all the additional info that can be requested (exit at the end)""" msg = '' # dump possible easyconfig params if self.options.avail_easyconfig_params: msg += self.avail_easyconfig_params() # dump easyconfig template options if self.options.avail_easyconfig_templates: msg += template_documentation() # dump easyconfig constant options if self.options.avail_easyconfig_constants: msg += constant_documentation() # dump easyconfig license options if self.options.avail_easyconfig_licenses: msg += license_documentation() # dump available easyblocks if self.options.list_easyblocks: msg += self.avail_easyblocks() # dump known toolchains if self.options.list_toolchains: msg += self.avail_toolchains() # dump known repository types if self.options.avail_repositories: msg += self.avail_repositories() # dump default moduleclasses with description if self.options.show_default_moduleclasses: msg += self.show_default_moduleclasses() if self.options.unittest_file: self.log.info(msg) else: print msg sys.exit(0)
def test_license_docs(self): """Test license_documentation function.""" lic_docs = license_documentation() gplv3 = "GPLv3: The GNU General Public License" self.assertTrue(gplv3 in lic_docs, "%s found in: %s" % (gplv3, lic_docs))
def _postprocess_list_avail(self): """Create all the additional info that can be requested (exit at the end)""" msg = '' # dump supported configuration file constants if self.options.avail_cfgfile_constants: msg += self.avail_cfgfile_constants() # dump possible easyconfig params if self.options.avail_easyconfig_params: msg += avail_easyconfig_params(self.options.easyblock, self.options.avail_easyconfig_params) # dump easyconfig template options if self.options.avail_easyconfig_templates: msg += template_documentation() # dump easyconfig constant options if self.options.avail_easyconfig_constants: msg += constant_documentation() # dump easyconfig license options if self.options.avail_easyconfig_licenses: msg += license_documentation() # dump available easyblocks if self.options.list_easyblocks: msg += self.avail_easyblocks() # dump known toolchains if self.options.list_toolchains: msg += self.avail_toolchains() # dump known repository types if self.options.avail_repositories: msg += self.avail_repositories() # dump supported modules tools if self.options.avail_modules_tools: msg += self.avail_list('modules tools', avail_modules_tools()) # dump supported module naming schemes if self.options.avail_module_naming_schemes: msg += self.avail_list('module naming schemes', avail_module_naming_schemes()) # dump default list of config files that are considered if self.options.show_default_configfiles: msg += self.show_default_configfiles() # dump default moduleclasses with description if self.options.show_default_moduleclasses: msg += self.show_default_moduleclasses() if self.options.unittest_file: self.log.info(msg) else: print msg # cleanup tmpdir try: shutil.rmtree(self.tmpdir) except OSError as err: raise EasyBuildError("Failed to clean up temporary directory %s: %s", self.tmpdir, err) sys.exit(0)
def test_license_docs(self): """Test license_documentation function.""" lic_docs = license_documentation() gplv3 = "GPLv3: The GNU General Public License" self.assertTrue(gplv3 in lic_docs, "%s found in: %s" % (gplv3, lic_docs))