Beispiel #1
0
class FromSBP:
    def __init__(self, testInfo):
        self.testInfo = testInfo
        self.assetsDir = '%s/assets/fromSBP' % self.testInfo.testPath
        self.sbpDir = os.getenv('QA_SBP_DIR')
        self.fromSbpCheck = FromSbpCheck(self)

    def sbpToFlix(self, sbpShow="budsBud"):
        log('##### sbpToFlix')
    
        # Copy contents of the fromSBP directory to the ~/flix directory
        sourceDir = "%s/%s" % (self.assetsDir, sbpShow)
        sbpSource = os.listdir(sourceDir)
        sbpDest = self.sbpDir
        if not os.path.exists(sbpDest):
            os.makedirs(sbpDest)
        for f in sbpSource:
            shutil.copy('%s/%s' % (sourceDir, f), sbpDest)
        for f in os.listdir(sbpDest):
            if ".xml.bak" in f:
                filepath = "%s/%s" % (sbpDest, f)
                if self.testInfo.OS == "win":
                    homeFlixDir = "C:/Users/%s/flix" % self.testInfo.user
                else:
                    homeFlixDir = "/Users/%s/flix" % self.testInfo.user
                pyUtils.findReplace(filepath, filepath.strip(".bak"), "[homeFlixDir]", homeFlixDir)
    
        self.fromSbpCheck.sbpToFlixCheck(sbpShow)
Beispiel #2
0
 def __init__(self, testInfo):
     self.testInfo = testInfo
     self.assetsDir = '%s/assets/fromSBP' % self.testInfo.testPath
     self.sbpDir = os.getenv('QA_SBP_DIR')
     self.fromSbpCheck = FromSbpCheck(self)