def analyse_test_list(self, testList): tests = [] testchain = AbstractClasses.Helper.testchain.parse_test_list(testList) test = testchain.next() Testnames = [] while test: env = AbstractClasses.Helper.environment.environment(test.test_str, self.initParser) test.environment = env test.testname = test.test_str.split("@")[0] Testnames.append(test.test_str.split("@")[0]) test = test.next() index = 0 test = testchain.next() if not ('HREfficiency' in Testnames): tests, test, index = self.appendTemperatureGraph(tests, test, index) HRTestAdded = False while test: if 'fulltest' in test.testname.lower(): print '\t-> appendFulltest' tests, test, index = self.appendFulltest(tests, test, index) elif 'powercycle' in test.testname: test = test.next() elif 'fpixtest' in test.testname.lower(): print '\t-> appendFPIXTest' tests, test, index = self.appendFPIXTest(tests, test, index) elif 'purduetest' in test.testname.lower(): print '\t-> appendPurduetest' tests, test, index = self.appendPurduetest(tests, test, index) elif 'pretest' in test.testname.lower(): print '\t-> appendPretest' # skips the pretest, not a high priority to parse test = test.next() elif 'cycle' in test.testname.lower(): print '\t-> appendTemperatureCycle' tests, test, index = self.appendTemperatureCycle(tests, test, index) elif 'xrayspectrum' in test.testname.lower() or 'xraypxar' in test.testname.lower(): print '\t-> appendXraySpectrum' tests, test, index = self.appendXrayCalibration(tests, test, index) elif ( ('hrefficiency' in test.testname.lower() or 'hrdata' in test.testname.lower() or 'hrscurves' in test.testname.lower() ) and not HRTestAdded ): # Accept all tests with names 'HREfficiency' print '\t-> appendXRayHighRateTest' tests, test, index = self.appendXRayHighRateTest(tests, test, index) HRTestAdded = True elif 'leakagecurrentpon' in test.testname.lower(): print '\t-> appendLeakageCurrentPON' tests, test, index = self.appendLeakageCurrentPON(tests, test, index) else: if self.verbose: print '\t-> cannot convert ', test.testname index += 1 test = test.next() self.appendOperationDetails(self.ResultData['SubTestResultDictList']) return tests
def analyse_test_list(self, testList): print 'analyse_test_list' tests = [] testchain = AbstractClasses.Helper.testchain.parse_test_list(testList) test = testchain.next() while test: env = AbstractClasses.Helper.environment.environment(test.test_str, self.initParser) test.environment = env test.testname = test.test_str.split("@")[0] test = test.next() index = 0 test = testchain.next() tests, test, index = self.appendTemperatureGraph(tests, test, index) while test: if 'fulltest' in test.testname.lower(): print '\t-> appendFulltest' tests, test, index = self.appendFulltest(tests, test, index) elif 'cycle' in test.testname.lower(): print '\t-> appendTemperatureCycle' tests, test, index = self.appendTemperatureCycle(tests, test, index) elif 'xrayspectrum' in test.testname.lower() or 'xraypxar' in test.testname.lower(): print '\t-> appendXraySpectrum' tests, test, index = self.appendXrayCalibration(tests, test, index) elif 'highratetest' in test.testname.lower() or \ 'highratepixelmap' in test.testname.lower() or \ 'highrateefficiency' in test.testname.lower(): # Accept all tests with names 'HighRateTest', 'HighRatePixelMap', and 'HighRateEfficiency' as high rate tests # The distinction of the tests is made within the 'appendHighRateTest' function. print '\t-> appendHighRateTest' tests, test, index = self.appendHighRateTest(tests, test, index) elif 'powercycle' in test.testname: test = test.next() else: if self.verbose: print '\t-> cannot convert ', test.testname index += 1 test = test.next() self.appendOperationDetails(self.ResultData['SubTestResultDictList']) return tests
def analyse_test_list(self, testList): tests = [] testchain = AbstractClasses.Helper.testchain.parse_test_list(testList) if testchain: test = testchain.next() Testnames = [] while test: env = AbstractClasses.Helper.environment.environment(test.test_str, self.initParser) test.environment = env test.testname = test.test_str.split("@")[0] Testnames.append(test.test_str.split("@")[0]) test = test.next() index = 0 test = testchain.next() if not ('HREfficiency' in Testnames): tests, test, index = self.appendTemperatureGraph(tests, test, index) tests, test, index = self.appendHumidityGraph(tests, test, index) tests, test, index = self.appendCurrentGraph(tests, test, index) HRTestAdded = False else: test = None self.TestResultEnvironmentObject.IVCurveFiles = {} # qualifications QualificationAdded = False while test: if 'fulltest' in test.testname.lower(): print '\t-> appendFulltest' tests, test, index = self.appendFulltest(tests, test, index) QualificationAdded = True elif test.testname.lower().startswith('reception'): print '\t-> appendReception' tests, test, index = self.appendReception(tests, test, index) QualificationAdded = True elif 'powercycle' in test.testname: test = test.next() elif 'cycle' in test.testname.lower(): print '\t-> appendTemperatureCycle' tests, test, index = self.appendTemperatureCycle(tests, test, index) elif 'xrayspectrum' in test.testname.lower() or 'xraypxar' in test.testname.lower(): print '\t-> appendXraySpectrum' tests, test, index = self.appendXrayCalibration(tests, test, index) QualificationAdded = True elif ( ('hrefficiency' in test.testname.lower() or 'hrdata' in test.testname.lower() or 'hrscurves' in test.testname.lower() ) and not HRTestAdded ): # Accept all tests with names 'HREfficiency' print '\t-> appendXRayHighRateTest' tests, test, index = self.appendXRayHighRateTest(tests, test, index) HRTestAdded = True QualificationAdded = True elif 'leakagecurrentpon' in test.testname.lower(): print '\t-> appendLeakageCurrentPON' tests, test, index = self.appendLeakageCurrentPON(tests, test, index) else: if self.verbose: print '\t-> cannot convert ', test.testname index += 1 test = test.next() # single tests singleTestsList = ['PixelAlive', 'ReadbackCal', 'BumpBonding', 'Scurves', 'Trim', 'GainPedestal', 'Hitmap', 'PhOptimization'] # try to find tests from test list in ini file if not QualificationAdded: print "no qualifications found, looking for single tests" #testchain = AbstractClasses.Helper.testchain.parse_test_list(testList) if testchain: test = testchain.next() index = 0 while test: if test.testname.lower() in [x.lower() for x in singleTestsList]: print '\t-> appendSingleTest %s'%test.testname tests, test, index = self.appendSingleTest(tests, test, index) QualificationAdded = True else: if self.verbose: print '\t-> cannot convert ', test.testname index += 1 test = test.next() # check root files in subfolders directly and try to find something... if not QualificationAdded: SubtestfoldersPath = "%s/*_*_*/*.root"%self.TestResultEnvironmentObject.ModuleDataDirectory SubtestfolderRootFiles = glob.glob(SubtestfoldersPath) print "found at least some .root files:", SubtestfolderRootFiles # these defines the histograms which are checked for existence in the .root file # if found, the single test is added SingleTestsDicts = [ {'HistoDictSection': 'PixelMap', 'HistoDictEntry': 'Calibrate', 'SingleTestName': 'PixelAlive'}, {'HistoDictSection': 'VcalThresholdUntrimmed', 'HistoDictEntry': 'ThresholdMap', 'SingleTestName': 'Scurves'}, {'HistoDictSection': 'TrimBitMap', 'HistoDictEntry': 'TrimBitMap', 'SingleTestName': 'Trim'}, {'HistoDictSection': 'GainPedestal', 'HistoDictEntry': 'GainPedestalP0', 'SingleTestName': 'GainPedestal'}, {'HistoDictSection': 'PHMap', 'HistoDictEntry': 'MaxPHMap', 'SingleTestName': 'PhOptimization'}, ] for RootFileName in SubtestfolderRootFiles: RootFile = ROOT.TFile.Open(RootFileName) if RootFile: self.check_Test_Software() print "file: %s =>"%RootFileName for SingleTestsDict in SingleTestsDicts: if self.HistoDict.has_option(SingleTestsDict['HistoDictSection'], SingleTestsDict['HistoDictEntry']): histname = self.HistoDict.get(SingleTestsDict['HistoDictSection'], SingleTestsDict['HistoDictEntry']) object = HistoGetter.get_histo(RootFile, histname, rocNo = 0) if object: SubfolderName = RootFileName.split('/')[-2] print '\t-> appendSingleTest %s'%test index = int(SubfolderName.split('_')[0]) Environment = SubfolderName.split('_')[-1] Temperature = Environment.replace('p','').replace('m', '-') Directory = SubfolderName tests, test, index = self.appendSingleTestFromRootfile(tests, SingleTestsDict['SingleTestName'], index, Directory, Environment, Temperature) QualificationAdded = True RootFile.Close() else: print "cannot open root file '%s'"%RootFileName if not QualificationAdded: print "Could not find anything to analyze, check if:" print " - there is either a correct .ini file in configfiles subfolder containing the test list" print " - or a .root file in the test subfolder containing histograms with the correct naming convention (eg. like in pxar.cfg)" self.appendOperationDetails(self.ResultData['SubTestResultDictList']) return tests
def analyse_test_list(self, testList): tests = [] testchain = AbstractClasses.Helper.testchain.parse_test_list(testList) test = testchain.next() Testnames = [] while test: env = AbstractClasses.Helper.environment.environment( test.test_str, self.initParser) test.environment = env test.testname = test.test_str.split("@")[0] Testnames.append(test.test_str.split("@")[0]) test = test.next() index = 0 test = testchain.next() if not ('HREfficiency' in Testnames): tests, test, index = self.appendTemperatureGraph( tests, test, index) tests, test, index = self.appendHumidityGraph(tests, test, index) HRTestAdded = False self.TestResultEnvironmentObject.IVCurveFiles = {} while test: if 'fulltest' in test.testname.lower(): print '\t-> appendFulltest' tests, test, index = self.appendFulltest(tests, test, index) elif test.testname.lower().startswith('reception'): print '\t-> appendReception' tests, test, index = self.appendReception(tests, test, index) elif 'powercycle' in test.testname: test = test.next() elif 'fpixtest' in test.testname.lower(): print '\t-> appendFulltest' tests, test, index = self.appendFulltest(tests, test, index) elif 'purduetest' in test.testname.lower(): print '\t-> appendFulltest' tests, test, index = self.appendFulltest(tests, test, index) elif 'quicktest' in test.testname.lower(): print '\t-> appendFulltest' tests, test, index = self.appendFulltest(tests, test, index) elif 'pretest' in test.testname.lower(): print '\t-> appendPretest' # skips the pretest, not a high priority to parse test = test.next() elif 'cycle' in test.testname.lower(): print '\t-> appendTemperatureCycle' tests, test, index = self.appendTemperatureCycle( tests, test, index) elif 'xrayspectrum' in test.testname.lower( ) or 'xraypxar' in test.testname.lower(): print '\t-> appendXraySpectrum' tests, test, index = self.appendXrayCalibration( tests, test, index) elif (('hrefficiency' in test.testname.lower() or 'hrdata' in test.testname.lower() or 'hrscurves' in test.testname.lower()) and not HRTestAdded): # Accept all tests with names 'HREfficiency' print '\t-> appendXRayHighRateTest' tests, test, index = self.appendXRayHighRateTest( tests, test, index) HRTestAdded = True elif 'leakagecurrentpon' in test.testname.lower(): print '\t-> appendLeakageCurrentPON' tests, test, index = self.appendLeakageCurrentPON( tests, test, index) else: if self.verbose: print '\t-> cannot convert ', test.testname index += 1 test = test.next() self.appendOperationDetails(self.ResultData['SubTestResultDictList']) return tests