# Define all possible option for the check command : sat check <options>
parser = src.options.Options()
parser.add_option('p', 'products', 'list2', 'products',
- _('Optional: products to check. This option can be'
- ' passed several time to check several products.'))
+ _('Optional: products to check. This option accepts a comma separated list.'))
CHECK_PROPERTY = "has_unit_tests"
# Verify if the command has to be launched or not
ignored = False
- if not src.get_property_in_product_cfg(p_info, CHECK_PROPERTY):
- msg = _("The product %s is defined as not having tests. "
+ if src.product.product_is_native(p_info):
+ msg = _("The product %s is defined as being native. "
"product ignored." % p_name)
logger.write("%s\n" % msg, 4)
ignored = True
- if "build_dir" not in p_info:
- msg = _("No build_dir key defined in "
- "the config file of %s: product ignored." % p_name)
+ elif not src.get_property_in_product_cfg(p_info, CHECK_PROPERTY):
+ msg = _("The product %s is defined as not having tests. "
+ "product ignored." % p_name)
logger.write("%s\n" % msg, 4)
ignored = True
- if not src.product.product_compiles(p_info):
+ elif not src.product.product_compiles(p_info):
msg = _("The product %s is defined as not compiling. "
"product ignored." % p_name)
logger.write("%s\n" % msg, 4)
ignored = True
+ elif "build_dir" not in p_info:
+ msg = _("No build_dir key defined in "
+ "the config file of %s: product ignored." % p_name)
+ logger.write("%s\n" % msg, 4)
+ ignored = True
+
# Get the command to execute for script products
cmd_found = True
# Instantiate the class that manages all the construction commands
# like cmake, check, make install, make test, environment management, etc...
- builder = src.compilation.Builder(config, logger, p_info)
+ builder = src.compilation.Builder(config, logger, p_name, p_info)
# Prepare the environment
log_step(logger, header, "PREPARE ENV")