Author: gnichols Date: 2010-01-29 14:56:23 +0000 (Fri, 29 Jan 2010) New Revision: 351
Modified: trunk/v7/opticalDiskTest.py Log: 555898 - optical tests should provide a method to force/override the read-only, write, re-write code path decision
Modified: trunk/v7/opticalDiskTest.py =================================================================== --- trunk/v7/opticalDiskTest.py 2010-01-29 14:56:06 UTC (rev 350) +++ trunk/v7/opticalDiskTest.py 2010-01-29 14:56:23 UTC (rev 351) @@ -82,6 +82,18 @@ tests.append(test)
return tests + + + def getRequiredRPMs(self): + rpms = ["dvd+rw-tools"] + (osProduct, osVersion, osCodeName) = self.getRedHatRelease() + if "Fedora" in osProduct or ("Red Hat" in osProduct and "6" in osVersion): + rpms.append("genisoimage") # for mkisofs + rpms.append("wodim") # for cdrecord + else: + rpms.append("mkisofs") + rpms.append("cdrecord") + return rpms
def handleEject(self,cdromDevice): @@ -210,15 +222,15 @@
def printMediaName(self, media): mediaName = media.upper() - if "PLUS" in media: + if "PLUS" in mediaName: mediaName = mediaName.replace("PLUS", "+") - elif "DVD" in media and media != "DVD": + elif "DVD" in mediaName and mediaName != "DVD": mediaName = mediaName.replace("DVD", "DVD-") - elif "CD" in media and media != "CD": + elif "CD" in mediaName and mediaName != "CD": mediaName = mediaName.replace("CD", "CD-") elif mediaName == "CD": mediaName = "CDROM" - return media + return mediaName.lower()
def convertMediaName(self, name): name = name.lower() @@ -474,7 +486,7 @@ # ask user to insert a disk try: Command("eject /dev/%s" % self.getLogicalDeviceName()).run() - self.prompt("\n Please insert a %s disk into %s and then press ENTER to continue !" % (message, self.getLogicalDeviceName())) + self.prompt("Please insert a %s disk into %s and then press ENTER to continue !" % (message, self.getLogicalDeviceName())) Command("eject -t /dev/%s" % self.getLogicalDeviceName()) except V7CommandException, exception: print exception
v7-commits@lists.stg.fedorahosted.org