def testEnd(self, testrun): if testrun.status: testStr = bcolors.OKGREEN + 'OK: '.ljust(6) + bcolors.ENDC else: testStr = bcolors.FAIL + 'KO: '.ljust(6) + bcolors.ENDC print(testStr + bcolors.BOLD + testrun.test.getFullName().ljust(self.maxTestNameLen + 5) + bcolors.ENDC + ' %s' % (testrun.config)) test = self.plpobjects.getTest(testrun.test.getFullName()) testResult = plpobjects.TestRun(self.plpobjects, test, testrun.status, testrun.duration, testrun.config, testrun.log, build=self.build) if testrun in self.runnings: self.runnings.remove(testrun) runResult = TestRunResult(testrun.test.getFullName(), testrun.config, testrun.status, testrun.log) if self.uiServer.handler != None: self.uiServer.handler.transport.write(pickle.dumps(runResult)) if len(self.pendings) > 0: testrun = self.pendings.pop() self.run(testrun) self.check_completion()
def get(self, pobj): return plpobjects.TestRun(pobj=pobj, test=None, success=self.status == 'success', duration=self.time.timestamp(), log=None, name=self.name, metrics=self.metrics, config=self.config, build=self.build)