[gvfs] tests: Drop MTP test case



commit 29be4f023e984e7ed9dd547936990a04958ecc45
Author: Martin Pitt <martin pitt ubuntu com>
Date:   Mon Nov 3 08:42:44 2014 +0100

    tests: Drop MTP test case
    
    It stopped working with newer libmtp versions (1.1.8) and I don't have this
    Sony Xperia device any more.

 test/Makefile.am               |    2 -
 test/files/mtp_xperia.ioctl.xz |  Bin 5556 -> 0 bytes
 test/files/mtp_xperia.umockdev |  328 ----------------------------------------
 test/gvfs-test                 |   85 -----------
 4 files changed, 0 insertions(+), 415 deletions(-)
---
diff --git a/test/Makefile.am b/test/Makefile.am
index 1cd7b0b..309aaac 100644
--- a/test/Makefile.am
+++ b/test/Makefile.am
@@ -85,8 +85,6 @@ nobase_installed_test_DATA += \
        files/source-gphoto/IMG_0002.jpg \
        files/bogus-cd.iso.bz2 \
        files/joliet.iso.bz2 \
-       files/mtp_xperia.ioctl.xz \
-       files/mtp_xperia.umockdev \
        files/powershot.ioctl \
        files/powershot.umockdev \
        files/ssh_host_rsa_key \
diff --git a/test/gvfs-test b/test/gvfs-test
index ec74a33..09a6f1b 100755
--- a/test/gvfs-test
+++ b/test/gvfs-test
@@ -1702,91 +1702,6 @@ class GPhoto(GvfsTestCase):
         #umockdev_testbed.uevent('/sys/devices/pci0000:00/0000:00:1a.0/usb1/1-1/1-1.5/1-1.5.2/1-1.5.2.3', 
'add');
 
 
- unittest skipUnless(have_umockdev,
-                     'umockdev not installed; get it from https://launchpad.net/umockdev')
-class Mtp(GvfsTestCase):
-    @classmethod
-    def setUpClass(klass):
-        '''Load Sony Xperia MTP dump into testbed'''
-
-        GvfsTestCase.setUpClass()
-        umockdev_testbed.add_from_file(os.path.join(my_dir, 'files', 'mtp_xperia.umockdev'))
-        umockdev_testbed.load_ioctl('/dev/bus/usb/001/017',
-                                    os.path.join(my_dir, 'files', 'mtp_xperia.ioctl.xz'))
-
-    def shell(self):
-        subprocess.call(['umockdev-wrapper', 'bash', '-i'])
-
-    def xtest_detect(self):
-        '''mtp:// detection'''
-
-        out = self.program_out_success(['umockdev-wrapper', 'gvfs-mount', '-li'])
-        print(out)
-
-    def test_mount_cli(self):
-        '''mtp:// mount with CLI'''
-
-        uri = 'mtp://[usb:001,017]'
-
-        # this might take a bit until everything is detected
-        timeout = 5
-        while timeout > 0:
-            if subprocess.call(['gvfs-mount', uri], stderr=subprocess.PIPE) == 0:
-                break
-            timeout -= 1
-            time.sleep(0.5)
-        else:
-            self.fail('gvfs-mount %s failed' % uri)
-
-        try:
-            # The top-level name is defined by the mobile firmware
-            self.assertEqual(self.program_out_success(['gvfs-ls', uri]), 'SD-Karte\n')
-            out = self.program_out_success(['gvfs-ls', uri + '/SD-Karte'])
-            self.assertIn('DCIM\n', out)
-            self.assertIn('Music\n', out)
-            self.assertIn('hello.txt\n', out)
-            self.assertEqual(self.program_out_success(['gvfs-ls', uri + '/SD-Karte/Music']),
-                             'GStreamer - The Test Sine\n')
-            self.assertEqual(self.program_out_success(['gvfs-ls', uri + '/SD-Karte/Music/GStreamer - The 
Test Sine']),
-                             'sine.ogg\n')
-
-            # info for a dir and a music file
-            out = self.program_out_success(['gvfs-info', uri + '/SD-Karte/Music/GStreamer - The Test Sine'])
-            self.assertIn('standard::content-type: inode/directory', out)
-            self.assertIn('access::can-read: TRUE', out)
-            self.assertIn('access::can-write: TRUE', out)
-            self.assertIn('access::can-delete: TRUE', out)
-
-            out = self.program_out_success(['gvfs-info', uri + '/SD-Karte/Music/GStreamer - The Test 
Sine/sine.ogg'])
-            self.assertIn('standard::content-type: audio/ogg', out)
-            self.assertIn('standard::size: 4033', out)
-            self.assertIn('access::can-read: TRUE', out)
-            self.assertIn('access::can-write: TRUE', out)
-            self.assertIn('access::can-delete: TRUE', out)
-
-            # read ogg file
-            out = subprocess.check_output(['gvfs-cat', uri + '/SD-Karte/Music/GStreamer - The Test 
Sine/sine.ogg'])
-            self.assertTrue(out.startswith(b'OggS\x00'), out[:20])
-
-            # text file
-            self.assertEqual(self.program_out_success(['gvfs-cat', uri + '/SD-Karte/hello.txt']),
-                             'world\n')
-            out = self.program_out_success(['gvfs-info', uri + '/SD-Karte/hello.txt'])
-            self.assertIn('standard::content-type: text/plain', out)
-            self.assertIn('standard::size: 6', out)
-
-            # photo
-            out = self.program_out_success(['gvfs-info', uri + '/SD-Karte/DCIM/100CANON/IMG_0001.JPG'])
-            self.assertIn('standard::content-type: image/jpeg', out)
-            self.assertIn('standard::size: 4151', out)
-            self.assertIn('preview::icon:', out)
-
-            out = subprocess.check_output(['gvfs-cat', uri + '/SD-Karte/DCIM/100CANON/IMG_0001.JPG'])
-            self.assertIn(b'JFIF', out[:20])
-        finally:
-            self.unmount(uri)
-
-
 def start_dbus():
     '''Run a local D-BUS daemon under temporary XDG directories
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]