~sylvain-pineau/checkbox/eMMC_as_DISK

« back to all changes in this revision

Viewing changes to checkbox-support/checkbox_support/parsers/tests/test_udevadm.py

  • Committer: Sylvain Pineau
  • Date: 2016-01-08 14:42:43 UTC
  • Revision ID: sylvain.pineau@canonical.com-20160108144243-cd0eqpv2mr6485hm
checkbox-support:parsers:udevadm: Allow eMMC drives to be treated as disks

First from a udev point of view it's impossible to distinguish an eMMC drive
from a simple MMC card. both are using the same driver.

The proposed workaround is to detect drives using GPT and treat them as disks.
SD cards using VFAT/MBR won't interfere with disk tests then.

Fixes: https://bugs.launchpad.net/plainbox-provider-checkbox/+bug/1522768

Show diffs side-by-side

added added

removed removed

Lines of Context:
555
555
 
556
556
    def test_PANDABOARD(self):
557
557
        devices = self.parse("PANDABOARD")
558
 
        self.assertEqual(len(devices), 14)
 
558
        self.assertEqual(len(devices), 15)
559
559
        # Check that the wireless product name is extracted from the platform
560
560
        # modalias
561
 
        self.assertEqual(devices[2].product, "wl12xx")
 
561
        self.assertEqual(devices[3].product, "wl12xx")
562
562
        self.assertEqual(self.count(devices, "VIDEO"), 0)
563
563
        self.assertEqual(self.count(devices, "AUDIO"), 0)
564
564
        self.assertEqual(self.count(devices, "KEYBOARD"), 1)
565
565
        self.assertEqual(self.count(devices, "TOUCHPAD"), 0)
566
 
        self.assertEqual(self.count(devices, "CARDREADER"), 0)
 
566
        self.assertEqual(self.count(devices, "CARDREADER"), 1)
567
567
        self.assertEqual(self.count(devices, "CDROM"), 0)
568
568
        self.assertEqual(self.count(devices, "FIREWIRE"), 0)
569
569
        self.assertEqual(self.count(devices, "MOUSE"), 0)