parser.add_option('', 'check', 'boolean', 'check', _(
"Optional: execute the unit tests after compilation"), False)
+parser.add_option('', 'clean_build_after', 'boolean', 'clean_build_after',
+ _('Optional: remove the build directory after successful compilation'), False)
+
def get_products_list(options, cfg, logger):
'''method that gives the product list with their informations from
configuration regarding the passed options.
batch=True,
verbose=0,
logger_add_link = logger)
-
+ else:
+ # Clean the build directory if the compilation and tests succeed
+ if options.clean_build_after:
+ log_step(logger, header, "CLEAN BUILD")
+ sat.clean(config.VARS.application +
+ " --products " + p_name +
+ " --build",
+ batch=True,
+ verbose=0,
+ logger_add_link = logger)
+
# Log the result
if res_prod > 0:
logger.write("\r%s%s" % (header, " " * len_end_line), 3)
code = res
if code != 0:
code = 1
- return code
\ No newline at end of file
+ return code
if product_file_path:
products_dir = os.path.dirname(product_file_path)
try:
- prod_cfg = src.pyconf.Config(open(
- os.path.join(products_dir,
- product_file_name)),
+ prod_cfg = src.pyconf.Config(open(product_file_path),
PWD=("", products_dir))
+ prod_cfg.from_file = product_file_path
products_cfg.PRODUCTS[product_name] = prod_cfg
except Exception as e:
msg = _(
logger.write(_("%s is a product\n") % src.printcolors.printcLabel(name), 2)
pinfo = src.product.get_product_config(config, name)
- # Type of the product
- ptype = src.get_cfg_param(pinfo, "type", "")
- src.printcolors.print_value(logger, "type", ptype, 2)
if "depend" in pinfo:
src.printcolors.print_value(logger,
"depends on",
"optional",
', '.join(pinfo.opt_depend), 2)
+ # information on pyconf
+ logger.write("\n", 2)
+ logger.write(src.printcolors.printcLabel("configuration:") + "\n", 2)
+ if "from_file" in pinfo:
+ src.printcolors.print_value(logger,
+ "pyconf file path",
+ pinfo.from_file,
+ 2)
+ if "section" in pinfo:
+ src.printcolors.print_value(logger,
+ "section",
+ pinfo.section,
+ 2)
+
# information on prepare
logger.write("\n", 2)
logger.write(src.printcolors.printcLabel("prepare:") + "\n", 2)
try:
self.get_log_files()
except Exception as e:
- self.err += _("Unable to get remote log files: %s" % e)
+ # The 2 following lines must be suppressed after the bug is fixed
+ print("The error type: ")
+ print(type(e))
+ print("The error: ")
+ print(e)
+ print("Local scope:")
+ print(dir())
+ print("The str type: ")
+ print(type(str))
+ print("str: ")
+ print(str)
+ self.err += _("Unable to get remote log files!")
def total_duration(self):
"""Give the total duration of the job
return 0
;;
compile)
- opts="--products --with_fathers --with_children --clean_all --make_flags --show --stop_first_fail --check"
+ opts="--products --with_fathers --with_children --clean_all --make_flags --show --stop_first_fail --check --clean_build_after"
COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) )
return 0
;;
"CO":
{
"7.1.1503": "7.1"
- "7.2.1511": "7.2"
- "7.3.1611": "7.3"
+ "7.2.1511": "7"
+ "7.3.1611": "7"
+ "6.1" : "6"
+ "6.2" : "6"
+ "6.3" : "6"
+ "6.4" : "6"
+ "6.5" : "6"
+ "6.6" : "6"
+ "6.7" : "6"
}
}
# returns specific information for the given version
prod_info = config.PRODUCTS[product_name][section]
prod_info.section = section
+ prod_info.from_file = config.PRODUCTS[product_name].from_file
return prod_info
# If it exists, get the information of the product_version
# returns specific information for the given version
prod_info = config.PRODUCTS[product_name]["version_" + version]
prod_info.section = "version_" + version
+ prod_info.from_file = config.PRODUCTS[product_name].from_file
return prod_info
# Else, check if there is a description for multiple versions
# returns specific information for the versions
prod_info = config.PRODUCTS[product_name][section_range]
prod_info.section = section_range
+ prod_info.from_file = config.PRODUCTS[product_name].from_file
return prod_info
# Else, get the standard informations
# returns the generic information (given version not found)
prod_info = config.PRODUCTS[product_name].default
prod_info.section = "default"
+ prod_info.from_file = config.PRODUCTS[product_name].from_file
return prod_info
# if noting was found, return None
if isinstance(compo_list, str):
compo_list = [ compo_list ]
- return compo_list
\ No newline at end of file
+ return compo_list