Salome HOME
the legend is now collapsible
[tools/sat.git] / commands / testcommand.py
1 #!/usr/bin/env python
2 #-*- coding:utf-8 -*-
3
4 import src
5
6 # Define all possible option for testcommand command :  sat testcommand <options>
7 parser = src.options.Options()
8 parser.add_option('p', 'product', 'list2', 'nb_proc',
9     _('products to get the sources. This option can be'
10     ' passed several time to get the sources of several products.'))
11
12 parser.add_option('', 'dd', 'list2', 'makeflags',
13     _('products to get the sources. This option can be'
14     ' passed several time to get the sources of several products.'))
15
16 def description():
17     return _("Test d'une commande supplĂ©mentaire.")
18     
19
20 def run(args, runner, logger):
21     (options, args) = parser.parse_args(args)
22
23     # check that the command has been called with an application
24     src.check_config_has_application( runner.cfg )
25     
26     pi = src.product.get_product_config(runner.cfg, 'PRODUCT_GIT')
27     
28     builder = src.compilation.Builder(runner.cfg, logger, options, pi)
29     
30     builder.prepare()
31     
32     builder.cmake()
33     
34     builder.make()