comparison test/test_builder.py @ 171:c0ea6cbb0fd2

Add "--debbuildopts -b" to "pbuilder build" command line to stop pbuilder from creating a source package. The .changes would otherwise contain references to that new source package instead of the one we passed to pbuilder. The checksums for the two source packages would be different so the .changes file would not match the source package that treepkg produces.
author Bernhard Herzog <bh@intevation.de>
date Mon, 23 Jun 2008 16:12:01 +0000
parents bfcb2bbf9a52
children 97435e92411a
comparison
equal deleted inserted replaced
170:bfcb2bbf9a52 171:c0ea6cbb0fd2
160 builder.build("my_dsc_file", binary_dir_name, "the_logfile") 160 builder.build("my_dsc_file", binary_dir_name, "the_logfile")
161 self.check_command_line(['/usr/sbin/pbuilder', 'build', 161 self.check_command_line(['/usr/sbin/pbuilder', 'build',
162 '--configfile', 'my_pbuilderrc', 162 '--configfile', 'my_pbuilderrc',
163 '--logfile', 'the_logfile', 163 '--logfile', 'the_logfile',
164 '--buildresult', binary_dir_name, 164 '--buildresult', binary_dir_name,
165 '--debbuildopts', '-b',
165 'my_dsc_file']) 166 'my_dsc_file'])
166 self.failUnless(os.path.isdir(binary_dir_name)) 167 self.failUnless(os.path.isdir(binary_dir_name))
167 168
168 def test_build_with_bindmounts(self): 169 def test_build_with_bindmounts(self):
169 """Tests the PBuilder.build method with the bindmounts parameter""" 170 """Tests the PBuilder.build method with the bindmounts parameter"""
181 '--configfile', 'my_pbuilderrc', 182 '--configfile', 'my_pbuilderrc',
182 '--bindmounts', "/home/builder/tracks", 183 '--bindmounts', "/home/builder/tracks",
183 '--bindmounts', "/home/builder/pbuilder", 184 '--bindmounts', "/home/builder/pbuilder",
184 '--logfile', 'the_logfile', 185 '--logfile', 'the_logfile',
185 '--buildresult', binary_dir_name, 186 '--buildresult', binary_dir_name,
187 '--debbuildopts', '-b',
186 'my_dsc_file']) 188 'my_dsc_file'])
187 self.failUnless(os.path.isdir(binary_dir_name)) 189 self.failUnless(os.path.isdir(binary_dir_name))
188 190
189 def test_build_with_extra_packages(self): 191 def test_build_with_extra_packages(self):
190 """Tests the PBuilder.build method with the extra_packages parameter""" 192 """Tests the PBuilder.build method with the extra_packages parameter"""
201 '--configfile', 'my_pbuilderrc', 203 '--configfile', 'my_pbuilderrc',
202 '--extrapackages', "subversion", 204 '--extrapackages', "subversion",
203 '--extrapackages', "texinfo", 205 '--extrapackages', "texinfo",
204 '--logfile', 'the_logfile', 206 '--logfile', 'the_logfile',
205 '--buildresult', binary_dir_name, 207 '--buildresult', binary_dir_name,
208 '--debbuildopts', '-b',
206 'my_dsc_file']) 209 'my_dsc_file'])
207 self.failUnless(os.path.isdir(binary_dir_name)) 210 self.failUnless(os.path.isdir(binary_dir_name))
208 211
209 def test_build_with_extra_env(self): 212 def test_build_with_extra_env(self):
210 """Tests the PBuilder.build method with the extra_env parameter""" 213 """Tests the PBuilder.build method with the extra_env parameter"""
223 extra_env=dict(TREEPKG_TEST=env_test_file)) 226 extra_env=dict(TREEPKG_TEST=env_test_file))
224 self.check_command_line(['/usr/sbin/pbuilder', 'build', 227 self.check_command_line(['/usr/sbin/pbuilder', 'build',
225 '--configfile', 'my_pbuilderrc', 228 '--configfile', 'my_pbuilderrc',
226 '--logfile', 'the_logfile', 229 '--logfile', 'the_logfile',
227 '--buildresult', binary_dir_name, 230 '--buildresult', binary_dir_name,
231 '--debbuildopts', '-b',
228 'my_dsc_file']) 232 'my_dsc_file'])
229 self.failUnless(os.path.isdir(binary_dir_name)) 233 self.failUnless(os.path.isdir(binary_dir_name))
230 self.failUnless(os.path.exists(env_test_file)) 234 self.failUnless(os.path.exists(env_test_file))
231 235
232 def test_run_script(self): 236 def test_run_script(self):
This site is hosted by Intevation GmbH (Datenschutzerklärung und Impressum | Privacy Policy and Imprint)