comparison test/test_builder.py @ 119:92116333ef77

Add PBuilder.run_script method and associated tests. The run_script method allows arbitrary scripts to be run in the pbuilder chroot environment
author Bernhard Herzog <bh@intevation.de>
date Wed, 21 May 2008 13:20:36 +0000
parents 9d59ed0e3116
children 890bb70920d6
comparison
equal deleted inserted replaced
118:9d59ed0e3116 119:92116333ef77
58 '--configfile', 'my_pbuilderrc', 58 '--configfile', 'my_pbuilderrc',
59 '--logfile', 'the_logfile', 59 '--logfile', 'the_logfile',
60 '--buildresult', binary_dir_name, 60 '--buildresult', binary_dir_name,
61 'my_dsc_file']) 61 'my_dsc_file'])
62 self.failUnless(os.path.isdir(binary_dir_name)) 62 self.failUnless(os.path.isdir(binary_dir_name))
63
64 def test_run_script(self):
65 builder = PBuilder("my_pbuilderrc", self.root_command)
66 builder.run_script("my_script", logfile="the_logfile")
67 self.check_command_line(['/usr/sbin/pbuilder', 'execute',
68 '--configfile', 'my_pbuilderrc',
69 '--logfile', 'the_logfile',
70 'my_script'])
71
72 def test_run_script_with_bindmounts(self):
73 builder = PBuilder("my_pbuilderrc", self.root_command)
74 builder.run_script("my_script", logfile="the_logfile",
75 bindmounts=("/home/builder/foo",
76 "/home/builder/treepkg"))
77 self.check_command_line(['/usr/sbin/pbuilder', 'execute',
78 '--configfile', 'my_pbuilderrc',
79 '--logfile', 'the_logfile',
80 '--bindmounts', '/home/builder/foo',
81 '--bindmounts', '/home/builder/treepkg',
82 'my_script'])
This site is hosted by Intevation GmbH (Datenschutzerklärung und Impressum | Privacy Policy and Imprint)