From: Serge Rehbinder Date: Thu, 29 Sep 2016 08:17:53 +0000 (+0200) Subject: A product without build_dir do not make check and clean commands crash X-Git-Tag: 5.0.0a1~94 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=9898fb9b81879fff3cad50f4fd64a4fa0fa900d5;p=tools%2Fsat.git A product without build_dir do not make check and clean commands crash --- diff --git a/commands/check.py b/commands/check.py index ecc83a0..b9e1528 100644 --- a/commands/check.py +++ b/commands/check.py @@ -89,6 +89,10 @@ def check_all_products(config, products_infos, logger): ''' res = 0 for p_name_info in products_infos: + __, p_info = p_name_info + if ("build_dir" not in "build_dir" or + not src.product.product_compiles(p_info)): + continue res_prod = check_product(p_name_info, config, logger) if res_prod != 0: res += 1 diff --git a/commands/clean.py b/commands/clean.py index 29934b6..23ee598 100644 --- a/commands/clean.py +++ b/commands/clean.py @@ -72,7 +72,8 @@ def get_build_directories(products_infos): l_dir_build = [] for __, product_info in products_infos: if product_has_dir(product_info): - l_dir_build.append(src.Path(product_info.build_dir)) + if "build_dir" in product_info: + l_dir_build.append(src.Path(product_info.build_dir)) return l_dir_build def get_install_directories(products_infos): @@ -166,7 +167,6 @@ def run(args, runner, logger): if len(l_dir_to_suppress) == 0: logger.write(src.printcolors.printcWarning(_("Nothing to suppress\n"))) - logger.write(src.printcolors.printcWarning("\n")) sat_command = (runner.cfg.VARS.salometoolsway + runner.cfg.VARS.sep + "sat -h clean") diff --git a/src/compilation.py b/src/compilation.py index c046002..59970c1 100644 --- a/src/compilation.py +++ b/src/compilation.py @@ -207,7 +207,7 @@ CC=\\"hack_libtool\\"%g" libtool''' ## # Runs make to build the module. - def make(self, nb_proc, make_opt): + def make(self, nb_proc, make_opt=""): # make command = 'make'