parser = src.options.Options()
parser.add_option('n', 'name', 'string', 'name',
- _('The name of the application (default is APPLI.name or runAppli)'))
+ _('Optional: The name of the application (default is APPLI.name or '
+ 'runAppli)'))
parser.add_option('c', 'catalog', 'string', 'catalog',
- _('The resources catalog to use'))
+ _('Optional: The resources catalog to use'))
parser.add_option('t', 'target', 'string', 'target',
- _('The directory where to create the application (default is PRODUCT.out_dir)'))
+ _('Optional: The directory where to create the application (default is '
+ 'APPLICATION.workdir)'))
parser.add_option('', 'gencat', 'string', 'gencat',
- _("""Create a resources catalog for the specified machines (separated with ',')
-\tNOTICE: this command will ssh to retrieve information to each machine in the list"""))
+ _("Optional: Create a resources catalog for the specified machines "
+ "(separated with ',')\n\tNOTICE: this command will ssh to retrieve "
+ "information to each machine in the list"))
parser.add_option('m', 'module', 'list2', 'modules',
- _("module(s) to include in the application"))
+ _("Optional: the restricted list of module(s) to include in the "
+ "application"))
##
# Creates an alias for runAppli.
:return: The text to display for the application command description.
:rtype: str
'''
- return _("""The application command creates a SALOME application.\n"""
- """WARNING: it works only for SALOME 6. Use the "launcher" """
- """command for newer versions of SALOME""")
+ return _("The application command creates a SALOME application.\n"
+ "WARNING: it works only for SALOME 6. Use the \"launcher\" "
+ "command for newer versions of SALOME\n\nexample:\nsat application"
+ " SALOME-6.6.0")
##
# Runs the command.
# Define all possible option for the shell command : sat base <options>
parser = src.options.Options()
parser.add_option('s', 'set', 'string', 'base_path',
- _('The path directory to use as base.'), None)
+ _('Optional: The path directory to use as base.'), None)
def set_base(config, path, site_file_path, logger):
""" Edit the site.pyconf file and change the base path
:rtype: str
'''
return _("Display or set the base where to put installations of base "
- "products")
+ "products\n\nexample\nsat base --set /tmp/BASE")
def run(args, runner, logger):
'''method that is called when salomeTools is called with base parameter.
# Define all possible option for the check command : sat check <options>
parser = src.options.Options()
parser.add_option('p', 'products', 'list2', 'products',
- _('products to configure. This option can be'
+ _('Optional: products to configure. This option can be'
' passed several time to configure several products.'))
def get_products_list(options, cfg, logger):
:rtype: str
'''
return _("The check command executes the \"check\" command in"
- " the build directory")
+ " the build directory of all the products of the application."
+ "\nIt is possible to reduce the list of products to check by using"
+ " the --products option\n\nexample\nsat check SALOME-master "
+ "--products KERNEL,GUI,GEOM")
def run(args, runner, logger):
'''method that is called when salomeTools is called with check parameter.
# Define all possible option for the clean command : sat clean <options>
parser = src.options.Options()
parser.add_option('p', 'products', 'list2', 'products',
- _('Products to clean. This option can be'
+ _('Optional: Products to clean. This option can be'
' passed several time to clean several products.'))
parser.add_option('', 'properties', 'string', 'properties',
- _('Filter the products by their properties.\n\tSyntax: '
+ _('Optional: Filter the products by their properties.\n\tSyntax: '
'--properties <property>:<value>'))
parser.add_option('s', 'sources', 'boolean', 'sources',
- _("Clean the product source directories."))
+ _("Optional: Clean the product source directories."))
parser.add_option('b', 'build', 'boolean', 'build',
- _("Clean the product build directories."))
+ _("Optional: Clean the product build directories."))
parser.add_option('i', 'install', 'boolean', 'install',
- _("Clean the product install directories."))
+ _("Optional: Clean the product install directories."))
parser.add_option('a', 'all', 'boolean', 'all',
- _("Clean the product source, build and install directories."))
+ _("Optional: Clean the product source, build and install directories."))
parser.add_option('', 'sources_without_dev', 'boolean', 'sources_without_dev',
- _("do not clean the products in development mode."))
+ _("Optional: do not clean the products in development mode."))
def get_products_list(options, cfg, logger):
'''method that gives the product list with their informations from
:rtype: str
'''
return _("The clean command suppress the source, build, or install "
- "directories of the application products.")
+ "directories of the application products.\nUse the options to"
+ " define what directories you want to suppress and to reduce "
+ "the list of products\n\nexample:\nsat clean SALOME-master "
+ "--build --install --properties is_salome_module:yes")
def run(args, runner, logger):
'''method that is called when salomeTools is called with clean parameter.
# Define all possible option for the compile command : sat compile <options>
parser = src.options.Options()
parser.add_option('p', 'products', 'list2', 'products',
- _('products to configure. This option can be'
+ _('Optional: products to configure. This option can be'
' passed several time to configure several products.'))
parser.add_option('', 'with_fathers', 'boolean', 'fathers',
- _("build all necessary products to the given product (KERNEL is build before"
- " building GUI)."), False)
+ _("Optional: build all necessary products to the given product (KERNEL is "
+ "build before building GUI)."), False)
parser.add_option('', 'with_children', 'boolean', 'children',
- _("build all products using the given product (all SMESH plugins are build "
- "after SMESH)."), False)
+ _("Optional: build all products using the given product (all SMESH plugins"
+ " are build after SMESH)."), False)
parser.add_option('', 'clean_all', 'boolean', 'clean_all',
- _("clean BUILD dir and INSTALL dir before building product."), False)
+ _("Optional: clean BUILD dir and INSTALL dir before building product."),
+ False)
parser.add_option('', 'clean_install', 'boolean', 'clean_install',
- _("clean INSTALL dir before building product."), False)
+ _("Optional: clean INSTALL dir before building product."), False)
parser.add_option('', 'make_flags', 'string', 'makeflags',
- _("add extra options to the 'make' command."))
+ _("Optional: add extra options to the 'make' command."))
parser.add_option('', 'show', 'boolean', 'no_compile',
- _("DO NOT COMPILE just show if products are installed or not."), False)
-parser.add_option('', 'stop_first_fail', 'boolean', 'stop_first_fail', _("Stop"
- "s the command at first product compilation fail."), False)
+ _("Optional: DO NOT COMPILE just show if products are installed or not."),
+ False)
+parser.add_option('', 'stop_first_fail', 'boolean', 'stop_first_fail', _(
+ "Optional: Stops the command at first product compilation"
+ " fail."), False)
def get_products_list(options, cfg, logger):
'''method that gives the product list with their informations from
:return: The text to display for the compile command description.
:rtype: str
'''
- return _("The compile command constructs the products of the application")
+ return _("The compile command constructs the products of the application"
+ "\n\nexample:\nsat compile SALOME-master --products KERNEL,GUI,"
+ "MEDCOUPLING --clean_all")
def run(args, runner, logger):
'''method that is called when salomeTools is called with compile parameter.
# Define all possible option for config command : sat config <options>
parser = src.options.Options()
parser.add_option('v', 'value', 'string', 'value',
- _("print the value of CONFIG_VARIABLE."))
+ _("Optional: print the value of CONFIG_VARIABLE."))
parser.add_option('e', 'edit', 'boolean', 'edit',
- _("edit the product configuration file."))
+ _("Optional: edit the product configuration file."))
parser.add_option('i', 'info', 'string', 'info',
- _("get information on a product."))
+ _("Optional: get information on a product."))
parser.add_option('l', 'list', 'boolean', 'list',
- _("list all available applications."))
+ _("Optional: list all available applications."))
parser.add_option('c', 'copy', 'boolean', 'copy',
- _("""copy a config file to the personal config files directory.
+ _("""Optional: copy a config file to the personal config files directory.
\tWARNING the included files are not copied.
\tIf a name is given the new config file takes the given name."""))
parser.add_option('n', 'no_label', 'boolean', 'no_label',
- _("do not print labels, Works only with --value and --list."))
+ _("Internal use: do not print labels, Works only with --value and --list."))
parser.add_option('s', 'schema', 'boolean', 'schema',
_("Internal use."))
:rtype: str
'''
return _("The config command allows manipulation "
- "and operation on config files.")
+ "and operation on config files.\n\nexample:\nsat config "
+ "SALOME-master --info ParaView")
def run(args, runner, logger):
# Define all possible option for configure command : sat configure <options>
parser = src.options.Options()
parser.add_option('p', 'products', 'list2', 'products',
- _('products to configure. This option can be'
+ _('Optional: products to configure. This option can be'
' passed several time to configure several products.'))
parser.add_option('o', 'option', 'string', 'option',
- _('Option to add to the configure or cmake command.'), "")
+ _('Optional: Option to add to the configure or cmake command.'), "")
def get_products_list(options, cfg, logger):
'''method that gives the product list with their informations from
:rtype: str
'''
return _("The configure command executes in the build directory"
- " the configure commands corresponding to the compilation mode"
+ " the configure commands corresponding\nto the compilation mode"
" of the application products.\nThe possible compilation modes"
" are \"cmake\", \"autotools\", or a script.\n\nHere are the "
"commands to be run :\nautotools: build_configure and configure\n"
- "cmake: cmake\nscript: N\A")
+ "cmake: cmake\nscript: do nothing\n\nexample:\nsat configure "
+ "SALOME-master --products KERNEL,GUI,PARAVIS")
def run(args, runner, logger):
'''method that is called when salomeTools is called with make parameter.
parser = src.options.Options()
parser.add_option('', 'shell', 'list2', 'shell',
- _("Generates the environment files for the given format: "
+ _("Optional: Generates the environment files for the given format: "
"bash (default), bat (for windows) or all."), [])
parser.add_option('p', 'products', 'list2', 'products',
- _("Includes only the specified products."))
+ _("Optional: Includes only the specified products."))
parser.add_option('', 'prefix', 'string', 'prefix',
- _("Specifies the prefix for the environment files."), "env")
+ _("Optional: Specifies the prefix for the environment files."), "env")
parser.add_option('t', 'target', 'string', 'out_dir',
- _("Specifies the directory path where to put the environment files."),
+ _("Optional: Specifies the directory path where to put the environment "
+ "files."),
None)
# list of available shells with extensions
##
# Describes the command
def description():
- return _("The environ command generates the "
- "environment files of your application.")
+ return _("The environ command generates the environment files of your "
+ "application.\n\nexample:\nsat environ SALOME-master")
##
# Runs the command.
"path",
"string",
"path",
- _("Search the duplicate files in the given directory path."))
+ _("Optional: Search the duplicate files in the given "
+ "directory path."))
parser.add_option("",
"exclude-file",
"list2",
"exclude_file",
- _("Override the default list of filtered files."))
+ _("Optional: Override the default list of filtered files."))
parser.add_option("",
"exclude-extension",
"list2",
"exclude_extension",
- _("Override the default list of filtered extensions."))
+ _("Optional: Override the default list of filtered "
+ "extensions."))
parser.add_option("",
"exclude-path",
"list2",
"exclude_path",
- _("Override the default list of filtered pathes."))
+ _("Optional: Override the default list of filtered paths."))
default_extension_ignored = ['html', 'png', 'txt', 'js', 'xml', 'cmake', 'gif',
'm4', 'in', 'pyo', 'pyc', 'doctree', 'css']
'''
return _("The find_duplicates command search recursively for all duplicates"
" files in a the INSTALL directory (or the optionally given "
- "directory) and prints the found files to the terminal.")
+ "directory) and prints the found files to the terminal.\n\n"
+ "example:\nsat find_duplicates --path /tmp")
def run(args, runner, logger):
'''method that is called when salomeTools is called with find_duplicates
parser = src.options.Options()
parser.add_option('p', 'products', 'list2', 'products',
- _("the list of products to generate"))
+ _("Optional: the list of products to generate"))
parser.add_option('', 'yacsgen', 'string', 'yacsgen',
- _("path to YACSGEN's module_generator package"))
+ _("Optional: path to YACSGEN's module_generator package"))
def generate_component_list(config, product_info, context, logger):
res = "?"
:rtype: str
'''
return _("The generate command generates SALOME modules from 'pure cpp' "
- "products.\nWARNING this command NEEDS YACSGEN to run!")
+ "products.\nWARNING this command NEEDS YACSGEN to run!\n\nexample:"
+ "\nsat generate SALOME-master --products FLICACPP")
def run(args, runner, logger):
# Define all possible option for the make command : sat make <options>
parser = src.options.Options()
parser.add_option('j', 'jobs_config', 'string', 'jobs_cfg',
- _('The name of the config file that contains'
+ _('Mandatory: The name of the config file that contains'
' the jobs configuration'))
parser.add_option('', 'name', 'string', 'job',
- _('The job name from which to execute commands.'), "")
+ _('Mandatory: The job name from which to execute commands.'), "")
def description():
'''method that is called when salomeTools is called with --help option.
:rtype: str
'''
return _("Executes the commands of the job defined"
- " in the jobs configuration file")
+ " in the jobs configuration file\n\nexample:\nsat job "
+ "--jobs_config my_jobs --name my_job")
def run(args, runner, logger):
'''method that is called when salomeTools is called with job parameter.
logger.write(src.printcolors.printcError(message))
return 1
+ # Make sure the name option has been called
+ if not options.job:
+ message = _("The option --name is required\n")
+ logger.write(src.printcolors.printcError(message))
+ return 1
+
# Find the file in the directories
found = False
for cfg_dir in l_cfg_dir:
parser = src.options.Options()
parser.add_option('n', 'name', 'string', 'jobs_cfg',
- _('The name of the config file that contains'
+ _('Mandatory: The name of the config file that contains'
' the jobs configuration'))
parser.add_option('o', 'only_jobs', 'list2', 'only_jobs',
_('Optional: the list of jobs to launch, by their name. '))
parser.add_option('i', 'input_boards', 'string', 'input_boards', _("Optional: "
"the path to csv file that contain "
"the expected boards."),"")
-parser.add_option('n', 'completion', 'boolean', 'no_label',
+parser.add_option('', 'completion', 'boolean', 'no_label',
_("Optional (internal use): do not print labels, Works only "
"with --list."),
False)
# Describes the command
def description():
return _("The jobs command launches maintenances that are described"
- " in the dedicated jobs configuration file.")
+ " in the dedicated jobs configuration file.\n\nexample:\nsat "
+ "jobs --name my_jobs --publish")
##
# Runs the command.
\r
parser = src.options.Options()\r
\r
-parser.add_option('n', 'name', 'string', 'name', _('The name of the launcher '\r
- '(default is APPLICATION.profile.launcher_name)'))\r
+parser.add_option('n', 'name', 'string', 'name', _('Optional: The name of the'\r
+ ' launcher (default is '\r
+ 'APPLICATION.profile.launcher_name)'))\r
parser.add_option('c', 'catalog', 'string', 'catalog',\r
- _('The resources catalog to use'))\r
+ _('Optional: The resources catalog to use'))\r
parser.add_option('', 'gencat', 'string', 'gencat',\r
- _("Create a resources catalog for the specified machines "\r
+ _("Optional: Create a resources catalog for the specified machines "\r
"(separated with ',') \n\tNOTICE: this command will ssh to retrieve"\r
" information to each machine in the list"))\r
\r
##\r
# Describes the command\r
def description():\r
- return _("The launcher command generates a salome launcher.")\r
+ return _("The launcher command generates a SALOME launcher.\n\nexample:"\r
+ "\nsat launcher SALOME-master")\r
\r
##\r
# Runs the command.\r
# Define all possible option for log command : sat log <options>
parser = src.options.Options()
-parser.add_option('t', 'terminal', 'boolean', 'terminal', "Terminal log.")
+parser.add_option('t', 'terminal', 'boolean', 'terminal', "Optional: "
+ "Terminal log.")
parser.add_option('l', 'last', 'boolean', 'last', "Show the log of the last "
- "launched command.")
-parser.add_option('f', 'full', 'boolean', 'full', "Show the logs of ALL "
- "launched commands.")
-parser.add_option('c', 'clean', 'int', 'clean', "Erase the n most ancient "
- "log files.")
+ "Optional: launched command.")
+parser.add_option('f', 'full', 'boolean', 'full', "Optional: Show the logs of "
+ "ALL the launched commands.")
+parser.add_option('c', 'clean', 'int', 'clean', "Optional: Erase the n most "
+ "ancient log files.")
def get_last_log_file(logDir, notShownCommands):
'''Used in case of last option. Get the last log command file path.
:return: The text to display for the log command description.
:rtype: str
'''
- return _("Gives access to the logs produced by the salomeTools commands.")
+ return _("Gives access to the logs produced by the salomeTools commands.\n"
+ "\nexample:\nsat log")
def run(args, runner, logger):
'''method that is called when salomeTools is called with log parameter.
# Define all possible option for the make command : sat make <options>
parser = src.options.Options()
parser.add_option('p', 'products', 'list2', 'products',
- _('products to configure. This option can be'
+ _('Optional: products to configure. This option can be'
' passed several time to configure several products.'))
parser.add_option('o', 'option', 'string', 'option',
- _('Option to add to the make command.'), "")
+ _('Optional: Option to add to the make command.'), "")
def get_products_list(options, cfg, logger):
'''method that gives the product list with their informations from
:rtype: str
'''
return _("The make command executes the \"make\" command in"
- " the build directory")
+ " the build directory.\nIn case of a product that is constructed "
+ "using a script (build_source : \"script\"), then the make "
+ "command executes the script.\n\nexample:\nsat make SALOME-master "
+ "--products Python,KERNEL,GUI")
def run(args, runner, logger):
'''method that is called when salomeTools is called with make parameter.
# Define all possible option for the makeinstall command : sat makeinstall <options>
parser = src.options.Options()
parser.add_option('p', 'products', 'list2', 'products',
- _('products to configure. This option can be'
- ' passed several time to configure several products.'))
+ _('Optional: products to install. This option can be'
+ ' passed several time to install several products.'))
def get_products_list(options, cfg, logger):
'''method that gives the product list with their informations from
:rtype: str
'''
return _("The makeinstall command executes the \"make install\" command in"
- " the build directory")
+ " the build directory.\nIn case of product that is constructed "
+ "using a script (build_source : \"script\"), then the "
+ "makeinstall command do nothing.\n\nexample:\nsat makeinstall "
+ "SALOME-master --products KERNEL,GUI")
def run(args, runner, logger):
'''method that is called when salomeTools is called with makeinstall parameter.
# Define all possible option for the package command : sat package <options>
parser = src.options.Options()
parser.add_option('b', 'binaries', 'boolean', 'binaries',
- _('Produce a binary package.'), False)
+ _('Optional: Produce a binary package.'), False)
parser.add_option('f', 'force_creation', 'boolean', 'force_creation',
- _('Only binary package: produce the archive even if there are some missing '
- 'products.'), False)
+ _('Optional: Only binary package: produce the archive even if '
+ 'there are some missing products.'), False)
parser.add_option('', 'with_sources', 'boolean', 'with_sources',
- _('Only binary package: produce and and a source archive in the binary '
- 'package.'), False)
+ _('Optional: Only binary package: produce and and a source archive in the '
+ 'binary package.'), False)
parser.add_option('s', 'sources', 'boolean', 'sources',
- _('Produce a compilable archive of the sources of the application.'), False)
+ _('Optional: Produce a compilable archive of the sources of the '
+ 'application.'), False)
parser.add_option('', 'with_vcs', 'boolean', 'with_vcs',
- _('Only source package: do not make archive of vcs products.'), False)
+ _('Optional: Only source package: do not make archive of vcs products.'),
+ False)
parser.add_option('p', 'project', 'string', 'project',
- _('Produce an archive that contains a project.'), "")
+ _('Optional: Produce an archive that contains a project.'), "")
parser.add_option('t', 'salometools', 'boolean', 'sat',
- _('Produce an archive that contains salomeTools.'), False)
+ _('Optional: Produce an archive that contains salomeTools.'), False)
parser.add_option('n', 'name', 'string', 'name',
- _('The name or full path of the archive.'), None)
+ _('Optional: The name or full path of the archive.'), None)
def add_files(tar, name_archive, d_content, logger):
'''Create an archive containing all directories and files that are given in
" It contains the products archives, a project corresponding to "
"the application and salomeTools,\n 3- The project archive. It "
"contains a project (give the project file path as argument),\n 4-"
- " The salomeTools archive. It contains salomeTools.")
+ " The salomeTools archive. It contains salomeTools.\n\nexample:"
+ "\nsat package SALOME-master --sources")
def run(args, runner, logger):
'''method that is called when salomeTools is called with package parameter.
# Check if no option for package type
if all_option_types.count(True) == 0:
msg = _("Error: Precise a type for the package\nUse one of the "
- "following options: --binaries, --sources, --project or --sat")
+ "following options: --binaries, --sources, --project or"
+ " --salometools")
logger.write(src.printcolors.printcError(msg), 1)
logger.write("\n", 1)
return 1
# Define all possible option for patch command : sat patch <options>
parser = src.options.Options()
parser.add_option('p', 'products', 'list2', 'products',
- _('products to get the sources. This option can be'
+ _('Optional: products to get the sources. This option can be'
' passed several time to get the sources of several products.'))
def apply_patch(config, product_info, max_product_name_len, logger):
:rtype: str
'''
return _("The patch command apply the patches on the sources of "
- "the application products if there is any")
+ "the application products if there is any.\n\nexample:\nsat "
+ "patch SALOME-master --products qt,boost")
def run(args, runner, logger):
'''method that is called when salomeTools is called with patch parameter.
# Define all possible option for prepare command : sat prepare <options>
parser = src.options.Options()
parser.add_option('p', 'products', 'list2', 'products',
- _('products to prepare. This option can be'
+ _('Optional: products to prepare. This option can be'
' passed several time to prepare several products.'))
parser.add_option('f', 'force', 'boolean', 'force',
- _("force to prepare the products in development mode."))
+ _("Optional: force to prepare the products in development mode."))
parser.add_option('', 'force_patch', 'boolean', 'force_patch',
- _("force to apply patch to the products in development mode."))
+ _("Optional: force to apply patch to the products in development mode."))
def get_products_list(options, cfg, logger):
'''method that gives the product list with their informations from
:rtype: str
'''
return _("The prepare command gets the sources of "
- "the application products and apply the patches if there is any.")
+ "the application products and apply the patches if there is any."
+ "\n\nexample:\nsat prepare SALOME-master --products KERNEL,GUI")
def run(args, runner, logger):
'''method that is called when salomeTools is called with prepare parameter.
:rtype: str
'''
return _("This command runs the application launcher"
- " with the given arguments.")
+ " with the given arguments.\n\nexample:\nsat run SALOME-master")
def run(args, runner, logger):
'''method that is called when salomeTools is called with run parameter.
# Define all possible option for the shell command : sat shell <options>
parser = src.options.Options()
parser.add_option('c', 'command', 'string', 'command',
- _('The shell command to execute.'), "")
+ _('Mandatory: The shell command to execute.'), "")
def description():
'''method that is called when salomeTools is called with --help option.
:return: The text to display for the shell command description.
:rtype: str
'''
- return _("Executes the shell command passed as argument")
+ return _("Executes the shell command passed as argument.\n\nexample:"
+ "\nsat shell --command \"ls \\-l /tmp\"")
def run(args, runner, logger):
'''method that is called when salomeTools is called with shell parameter.
# Parse the options
(options, args) = parser.parse_args(args)
-
+
+ # Make sure the command option has been called
+ if not options.command:
+ message = _("The option --command is required\n")
+ logger.write(src.printcolors.printcError(message))
+ return 1
+
res = subprocess.call(options.command,
shell=True,
stdout=logger.logTxtFile,
# Define all possible option for patch command : sat patch <options>
parser = src.options.Options()
parser.add_option('p', 'products', 'list2', 'products',
- _('products from which to get the sources. This option can be'
+ _('Optional: products from which to get the sources. This option can be'
' passed several time to get the sources of several products.'))
def get_source_for_dev(config, product_info, source_dir, logger, pad):
:rtype: str
'''
return _("The source command gets the sources of the application products "
- "from cvs, git, an archive or a directory..")
+ "from cvs, git or an archive.\n\nexample:"
+ "\nsat source SALOME-master --products KERNEL,GUI")
def run(args, runner, logger):
'''method that is called when salomeTools is called with source parameter.
parser = src.options.Options()
parser.add_option('n', 'name', 'string', 'name',
- _("""REQUIRED the name of the module to create.
+ _("""REQUIRED: the name of the module to create.
\tThe name must be a single word in upper case with only alphanumeric characters.
\tWhen generating a c++ component the module's """
"""name must be suffixed with 'CPP'."""))
parser.add_option('t', 'template', 'string', 'template',
- _('REQUIRED the template to use.'))
+ _('REQUIRED: the template to use.'))
parser.add_option('', 'target', 'string', 'target',
- _('REQUIRED where to create the module.'))
+ _('REQUIRED: where to create the module.'))
parser.add_option('', 'param', 'string', 'param',
- _('''dictionary to generate the configuration for salomeTools.
+ _('''Optional: dictionary to generate the configuration for salomeTools.
\tFormat is: --param param1=value1,param2=value2... without spaces
\tNote that when using this option you must supply all the '''
'''values otherwise an error will be raised.'''))
parser.add_option('', 'info', 'boolean', 'info',
- _('Get information on the template.'), False)
+ _('Optional: Get information on the template.'), False)
class TParam:
def __init__(self, param_def, compo_name, dico=None):
##
# Describes the command
def description():
- return _("""The template command creates the sources for a SALOME """
- """module from a template.""")
+ return _("The template command creates the sources for a SALOME "
+ "module from a template.\n\nexample\nsat template "
+ "--name my_product_name --template PythonComponent --target /tmp")
def run(args, runner, logger):
'''method that is called when salomeTools is called with template parameter.
# Define all possible option for the test command : sat test <options>
parser = src.options.Options()
parser.add_option('b', 'base', 'string', 'base',
- _("Indicate the name of the test base to use.\n\tThis name has to be "
- "registered in your application and in a project.\n\tA path to a test "
- "base can also be used."))
+ _("Optional: Indicate the name of the test base to use.\n\tThis name has to"
+ " be registered in your application and in a project.\n\tA path to a "
+ "test base can also be used."))
parser.add_option('l', 'launcher', 'string', 'launcher',
- _("Use this option to specify the path to a SALOME launcher to use to "
- "launch the test scripts of the test base."))
+ _("Optional: Use this option to specify the path to a SALOME launcher to "
+ "use to launch the test scripts of the test base."))
parser.add_option('g', 'grid', 'list', 'grids',
- _('Indicate which grid(s) to test (subdirectory of the test base).'))
+ _('Optional: Indicate which grid(s) to test (subdirectory of the test '
+ 'base).'))
parser.add_option('s', 'session', 'list', 'sessions',
- _('Indicate which session(s) to test (subdirectory of the grid).'))
+ _('Optional: indicate which session(s) to test (subdirectory of the '
+ 'grid).'))
parser.add_option('', 'display', 'string', 'display',
- _("Set the display where to launch SALOME."
+ _("Optional: set the display where to launch SALOME."
"\tIf value is NO then option --show-desktop=0 will be used to launch SALOME."))
def description():
:return: The text to display for the test command description.
:rtype: str
'''
- return _("The test command runs a test base on a SALOME installation.")
+ return _("The test command runs a test base on a SALOME installation.\n\n"
+ "example:\nsat test SALOME-master --grid GEOM --session light")
def parse_option(args, config):
""" Parse the options and do some verifications about it
sat = Sat("-l " + tmp_file)
# Execute the job command
- sat.test(application + " --module GEOM --type light" )
+ sat.test(application + " --grid GEOM --session light" )
ff = open(tmp_file, "r")
log_files = ff.readlines()
text = open(log_testboard[0], "r").read()
- if '<type name="light">' in text:
+ if '<session name="light">' in text:
OK = 'OK'
# pyunit method to compare 2 str
self.assertEqual(OK, 'OK')
sat = Sat("-l " + tmp_file)
# Execute the job command
- sat.test(application + " --module MED --type PY_test_withKernel" )
+ sat.test(application + " --grid MED --session PY_test_withKernel" )
ff = open(tmp_file, "r")
log_files = ff.readlines()
text = open(log_testboard[0], "r").read()
- if '<type name="light">' in text:
+ if '<session name="PY_test_withKernel">' in text:
OK = 'OK'
# pyunit method to compare 2 str
self.assertEqual(OK, 'OK')