Salome HOME
execute the check command in the compile command
authorSerge Rehbinder <serge.rehbinder@cea.fr>
Wed, 1 Feb 2017 14:00:36 +0000 (15:00 +0100)
committerSerge Rehbinder <serge.rehbinder@cea.fr>
Wed, 1 Feb 2017 14:00:36 +0000 (15:00 +0100)
commands/compile.py

index 8a73d32b435ee6558fe8329ed90148486e109625..20afeb9ee29cdf6f139e0df92ac3adacf4dcf586 100644 (file)
@@ -407,7 +407,7 @@ def compile_product(sat, p_name_info, config, options, logger, header, len_end):
     :rtype: int
     '''
     
-    __, p_info = p_name_info
+    p_name, p_info = p_name_info
           
     # Get the build procedure from the product configuration.
     # It can be :
@@ -441,12 +441,19 @@ def compile_product(sat, p_name_info, config, options, logger, header, len_end):
                 " no install directory was found !")
         logger.write(src.printcolors.printcError(msg), 4)
         logger.write("\n", 4)
+        return res, len_end_line, error_step
     
     # Add the config file corresponding to the dependencies/versions of the 
     # product that have been successfully compiled
     if res==0:       
         logger.write(_("Add the config file in installation directory\n"), 5)
         add_compile_config_file(p_info, config)
+
+    # Do the unit tests (call the check command)
+    log_step(logger, header, "CHECK")
+    res += sat.check(config.VARS.application + " --products " + p_name,
+                             verbose = 0,
+                             logger_add_link = logger)
     
     return res, len_end_line, error_step