예제 #1
0
 def getReconnectState(self, test):
     reconnLocation = os.path.join(self.rootDirToCopy, test.getRelPath())
     self.diag.info("Reconnecting to test at " + reconnLocation)
     if os.path.isdir(reconnLocation):
         return self.getReconnectStateFrom(test, reconnLocation)
     else:
         return plugins.Unrunnable(briefText="no results",
                                   freeText="No file found to load results from under " + reconnLocation)
예제 #2
0
 def readState(cls, stateFile):
     file = open(stateFile, "rU")
     try:
         state = cls.getNewState(file)
         if isinstance(state, plugins.TestState):
             return state
         else:
             return cls.readErrorState("Incorrect type for state object.")
     except Exception, e:
         if os.path.getsize(stateFile) > 0:
             return cls.readErrorState("Stack info follows:\n" + str(e))
         else:
             return plugins.Unrunnable("Results file was empty, probably the disk it resides on is full.", "Disk full?")
예제 #3
0
 def readErrorState(errMsg):
     freeText = "Failed to read results file, possibly deprecated format. " + errMsg
     return plugins.Unrunnable(freeText, "read error")
예제 #4
0
 def failTest(self, excString):
     execHosts = self.test.state.executionHosts
     failState = plugins.Unrunnable(freeText=excString,
                                    briefText="TEXTTEST EXCEPTION",
                                    executionHosts=execHosts)
     self.test.changeState(failState)