~ubuntu-branches/ubuntu/vivid/pkgbinarymangler/vivid

« back to all changes in this revision

Viewing changes to test/run

  • Committer: Martin Pitt
  • Date: 2011-08-21 19:13:56 UTC
  • Revision ID: martin.pitt@canonical.com-20110821191356-qguf1tg8vv5j53oz
* test/icecream/debian/rules, test/icecream/Makefile: Install PNGs with some
  defined permissions.
* test/run, check_deb_integrity(): Verify that PNG permissions in the final
  debs are as they are expected to be.
* pkgstripfiles: Restore permissions of optimized PNG files to their
  original value; advpng does not preserve them. (LP: #817792)

Show diffs side-by-side

added added

removed removed

Lines of Context:
263
263
                self.assertTrue(os.path.islink(foolink))
264
264
                self.assertEqual(os.readlink(foolink), 'foo%.png')
265
265
 
 
266
            # verify permissions are kept
 
267
            d = os.path.join(extractdir, 'usr', 'share', 'icecream')
 
268
            foo_png = os.path.join(d, 'foo%.png')
 
269
            if os.path.exists(foo_png):
 
270
                self.assertEqual(os.stat(foo_png).st_mode & 0o777, 0o600)
 
271
            notapng = os.path.join(d, 'nota.png')
 
272
            if os.path.exists(notapng):
 
273
                self.assertEqual(os.stat(notapng).st_mode & 0o777, 0o644)
 
274
 
266
275
    def test_no_mangler(self):
267
276
        '''No pkgbinarymangler'''
268
277