コード例 #1
0
ファイル: sikuliUtils.py プロジェクト: briceFoundry/flix_qa_2
def initSettings(OS, testPath, logFile):

    # Sikuli settings
    sikuli.Debug.setLogFile(logFile)
    sikuli.addImagePath(testPath + 'images/' + OS)
    sikuli.addImagePath(testPath + 'images/')
    sikuli.addImagePath(testPath + 'images/outputImages')

    # Log Levels
    sikuli.Settings.ActionLogs = False
    sikuli.Settings.DebugLogs = True
    sikuli.Settings.InfoLogs = True

    # Image recognition
    sikuli.Settings.MinSimilarity = 0.9
コード例 #2
0
ファイル: testInfo.py プロジェクト: briceFoundry/flix_qa_2
    def __init__(self):
        # self.OS = pythonHelper.getOS()
        # self.user = getpass.getuser()
        if os.getenv('QA_FLIX_OS') == "Windows":
            self.OS = "win"
        elif os.getenv('QA_FLIX_OS') == "Darwin":
            self.OS = "mac"
        elif os.getenv('QA_FLIX_OS') is None:
            log('Environment variables not defined, exiting...', 'error')
            sys.exit()
        self.user = os.getenv('QA_FLIX_USER')
        # self.testPath = pythonHelper.getPath(self.user, self.OS)
        self.testPath = os.getenv('QA_TESTSUITE_PATH')

        # Attributes that should be set using a config file
        self.testName = os.getenv('QA_TEST_NAME')
        self.log = os.getenv('QA_TEST_LOG')
        self.outDir = os.getenv('QA_TEST_OUTDIR')
        self.flixLog = os.getenv('QA_FLIX_LOG')
        self.flixRoot = os.getenv('QA_FLIX_ROOT')
        self.flixVersion = os.getenv('QA_FLIX_VERSION')
        self.show = os.getenv('QA_FLIX_SHOW')
        self.episode = os.getenv('QA_FLIX_EPISODE')
        self.sequenceName = os.getenv('QA_FLIX_SEQUENCE')
        if self.episode:
            self.sequence = '%s_%s' % (self.episode, self.sequenceName)
        else:
            self.sequence = self.sequenceName
        self.remote = os.getenv('QA_FLIX_REMOTE')
        # self.sbpDir = os.getenv('QA_SBP_DIR')
        # self.psExe = os.getenv('QA_PS_EXE')
        # self.mayaExe = os.getenv('QA_MAYA_EXE')

        # Versions per branch
        self.mainVersion = 0
        self.editorialVersion = 0
        self.customVersion = 0

        self.supportedBeats = ['p', 'a', 'm', 'ref', 's', 'rlo']

        # All the panels in the sequence
        self.allPanels = {}
        # Panels in the current edit
        self.editPanels = {}
        for beat in self.supportedBeats:
            self.allPanels[beat] = []
            self.editPanels[beat] = []
        self.allMarkers = []
        self.allAudio = 0

        self.dialogue = {}
        self.editMarkers = []
        self.editAudio = 0
        self.currentBranch = 'main'
        self.editDuration = 0

        # Number of panels new and published to Premiere
        self.fcpPublished = []
        # Number of panels new and published to Avid
        self.avidPublished = []
        # Number of AAFs already imported into Avid
        self.avidImported = []

        # List of unique IDs for every panel already imported from SBP (using master comment)
        self.importedFromSBP = []
        # List of filenames for every ref panel already imported from editorial
        self.importedFromEditorial = []

        # Number of movies that were published to Flix (present in the flix/editorial/mov directory)
        self.publishedMovs = 0

        self.failures = []

        # Sikuli settings
        sikuli.Debug.setLogFile(self.log)
        sikuli.addImagePath(self.testPath + '/images/' + self.OS)
        sikuli.addImagePath(self.testPath + '/images/')
        sikuli.addImagePath(self.testPath + '/images/outputImages')

        # Log Levels
        sikuli.Settings.ActionLogs = False
        sikuli.Settings.DebugLogs = True
        sikuli.Settings.InfoLogs = True

        # Clear Flix's local log
        open(self.flixLog, 'w').close()

        # Image recognition
        sikuli.Settings.MinSimilarity = 0.9