diff options
author | Martin Pitt <martinpitt@gnome.org> | 2013-01-12 12:09:31 +0100 |
---|---|---|
committer | Martin Pitt <martinpitt@gnome.org> | 2013-01-12 12:11:48 +0100 |
commit | 44f9a55da370969578899390ff00ba2bd34fb95f (patch) | |
tree | 2977f2ea2a73641a8aac1d7d9328d361e0f7024f /test | |
parent | a2c5d87c70e501aa3e0ebb148c62bb2bdaeb281b (diff) | |
download | gvfs-44f9a55da370969578899390ff00ba2bd34fb95f.tar.gz |
gvfs-test: Drop genisoimage dependency
Some distros use the original cdrtools where it is called differently
(mkisofs), and argument compatibility between the two is not guaranteed. Also,
the Drive tests already use pre-generated images in test/files/, so
pre-generate the remaining missing image (ISO9660 with Joliet extensions)
instead of building them at test time.
Part of https://bugzilla.gnome.org/show_bug.cgi?id=691568
Diffstat (limited to 'test')
-rw-r--r-- | test/files/joliet.iso.bz2 | bin | 0 -> 1018 bytes | |||
-rwxr-xr-x | test/gvfs-test | 26 |
2 files changed, 14 insertions, 12 deletions
diff --git a/test/files/joliet.iso.bz2 b/test/files/joliet.iso.bz2 Binary files differnew file mode 100644 index 00000000..5a6bc1c3 --- /dev/null +++ b/test/files/joliet.iso.bz2 diff --git a/test/gvfs-test b/test/gvfs-test index 1fb86d73..093ca6a8 100755 --- a/test/gvfs-test +++ b/test/gvfs-test @@ -313,19 +313,20 @@ class ArchiveMounter(GvfsTestCase): def test_iso_rr(self): '''archive:// for RockRidge .iso''' - shutil.copy(__file__, os.path.join(self.workdir, 'gvfs-test.py')) - subprocess.check_call(['genisoimage', '-R', '-quiet', '-o', 'stuff.iso', 'gvfs-test.py'], - cwd=self.workdir) - self.do_test_for_archive(os.path.join(self.workdir, 'stuff.iso')) + iso = os.path.join(self.workdir, 'bogus-cd.iso') + with open(iso, 'wb') as f: + subprocess.check_call(['bzip2', '-cd', os.path.join(my_dir, 'files', 'bogus-cd.iso.bz2')], + stdout=f) + self.do_test_for_archive(iso) def test_iso_joliet(self): '''archive:// for Joliet .iso''' - shutil.copy(__file__, os.path.join(self.workdir, 'gvfs-test.py')) - iso_path = os.path.join(self.workdir, 'stuff.iso') - subprocess.check_call(['genisoimage', '-JR', '-quiet', '-o', 'stuff.iso', 'gvfs-test.py'], - cwd=self.workdir) - self.do_test_for_archive(os.path.join(self.workdir, 'stuff.iso')) + iso = os.path.join(self.workdir, 'joliet.iso') + with open(iso, 'wb') as f: + subprocess.check_call(['bzip2', '-cd', os.path.join(my_dir, 'files', 'joliet.iso.bz2')], + stdout=f) + self.do_test_for_archive(iso) def do_test_for_archive(self, path): # mount it; yes, gvfs expects double quoting @@ -344,9 +345,10 @@ class ArchiveMounter(GvfsTestCase): self.assertTrue('access::can-read: TRUE' in out, out) # check gvfs-cat - out = self.program_out_success(['gvfs-cat', uri + '/gvfs-test.py']) - with open(__file__) as f: - self.assertEqual(out, f.read()) + out = self.program_out_success(['gvfs-cat', uri + '/hello.txt']) + self.assertEqual(out, 'hello\n') + out = self.program_out_success(['gvfs-cat', uri + '/stuff/bye.txt']) + self.assertEqual(out, 'bye\n') finally: self.unmount(uri) |