Author: gnichols
Date: 2012-05-29 19:13:50 +0000 (Tue, 29 May 2012)
New Revision: 1339
Modified:
trunk/tests/storage/storage.py
Log:
825247 - storage test may schedule tests for multiple disks on the same controller
Modified: trunk/tests/storage/storage.py
===================================================================
--- trunk/tests/storage/storage.py 2012-05-29 17:14:22 UTC (rev 1338)
+++ trunk/tests/storage/storage.py 2012-05-29 19:13:50 UTC (rev 1339)
@@ -45,6 +45,7 @@
def plan(self, devices):
tests = dict()
+ self.controllers = ''
for device in devices:
disk = self.planUDisks(device, devices)
@@ -67,7 +68,6 @@
if isinstance(device, UDisksDrive):
if device.getProperty("DeviceIsPartitionTable"):
disk = device.getProperty("DeviceFile")
- print "found device file " + disk
# get rid of the "/dev/"
if '/'in disk:
disk = disk.split('/')[-1]
@@ -75,7 +75,6 @@
def planHAL(self, device, devices):
disk = None
- controllers = ''
if 'storage' in device.getProperty("info.capabilities") and device.getProperty("storage.drive_type") in ["disk", "sd_mmc"]:
disk = device.getProperty("block.device")
# bug#437866 , plan by each controller, block device's parent is the HD, HD's parent is the controller, so need to track back twice
@@ -88,12 +87,12 @@
# then the contoller's ID is found
controllerId = deviceItem.getProperty("info.parent")
continue
- if controllerId in controllers:
+ if controllerId in self.controllers:
print "the controller %s is already in testplan, will skip the block device %s" % (controllerId, disk)
disk = ''
else:
# add the controller to the plan and record it
- controllers = controllers + ', ' + controllerId
+ self.controllers = self.controllers + ', ' + controllerId
# chop off /dev/ (5 characters)
if disk and len(disk) > 5:
disk = disk[5:]