3 # Copyright (C) 2010-2012 CEA/DEN
5 # This library is free software; you can redistribute it and/or
6 # modify it under the terms of the GNU Lesser General Public
7 # License as published by the Free Software Foundation; either
8 # version 2.1 of the License.
10 # This library is distributed in the hope that it will be useful,
11 # but WITHOUT ANY WARRANTY; without even the implied warranty of
12 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 # Lesser General Public License for more details.
15 # You should have received a copy of the GNU Lesser General Public
16 # License along with this library; if not, write to the Free Software
17 # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
24 testdir = os.path.dirname(os.path.realpath(__file__))
25 sys.path.append(os.path.join(testdir, '..', '..'))
26 sys.path.append(os.path.join(testdir, '..', '_testTools'))
27 sys.path.append(os.path.join(testdir, '..', '..','commands'))
31 from salomeTools import Sat
34 class TestMakeinstall(unittest.TestCase):
35 '''Test of the makeinstall command
38 def test_makeinstall(self):
39 '''Test the configure command without any option
44 product_name = 'PRODUCT_GIT'
48 sat.prepare(appli + ' --product ' + product_name)
49 expected_install_dir = src.product.get_product_config(sat.cfg, product_name).install_dir
50 expected_file_path = os.path.join(expected_install_dir, 'bin/hello')
52 sat.configure(appli + ' --product ' + product_name)
54 sat.make(appli + ' --product ' + product_name)
56 sat.makeinstall(appli + ' --product ' + product_name)
58 if os.path.exists(expected_file_path):
60 # pyunit method to compare 2 str
61 self.assertEqual(OK, 'OK')
63 def test_description(self):
64 '''Test the sat -h make
71 if "The makeinstall command executes the \"make install\" command" in makeinstall.description():
74 # pyunit method to compare 2 str
75 self.assertEqual(OK, "OK")
78 if __name__ == '__main__':