Exemplo n.º 1
0
	def test_01_File(self):
		print 'testFile'

		fileSrcList = srcApi.listFiles(path = path, retriveList = ['all'], otherDetails = True)
		fileDstList = dstApi.listFiles(path = path, retriveList = ['all'], otherDetails = True)
		fileSrcList.sort(key=lambda obj: obj['LogicalFileName'])
		fileDstList.sort(key=lambda obj: obj['LogicalFileName'])

		
		for i in range(len(fileSrcList)):
			valid.assertFile(self, fileSrcList[i], fileDstList[i])

			algoSrcList = fileSrcList[i]['AlgoList']
			algoDstList = fileDstList[i]['AlgoList']
			algoSrcList.sort(key=lambda obj: obj['ParameterSetID']['Hash'])
			algoDstList.sort(key=lambda obj: obj['ParameterSetID']['Hash'])
			algoSrcList.sort(key=lambda obj: obj['ApplicationFamily'])
			algoDstList.sort(key=lambda obj: obj['ApplicationFamily'])
			#print algoSrcList
			#print "_______________________"
			#print algoDstList
			for j in range(len(algoSrcList)):
				valid.assertAlgo(self, algoSrcList[j], algoDstList[j])

			lumiSrcList = fileSrcList[i]['LumiList']
			lumiDstList = fileDstList[i]['LumiList']
			lumiSrcList.sort(key=lambda obj: obj['LumiSectionNumber'])
			lumiDstList.sort(key=lambda obj: obj['LumiSectionNumber'])
			for j in range(len(lumiSrcList)):
				valid.assertLumi(self, lumiSrcList[j], lumiSrcList[j])


			parentSrcList = fileSrcList[i]['ParentList']
			parentDstList = fileDstList[i]['ParentList']
			parentSrcList.sort(key=lambda obj: obj['LogicalFileName'])
			parentDstList.sort(key=lambda obj: obj['LogicalFileName'])
			for j in range(len(parentSrcList)):
				valid.assertFile(self, parentSrcList[j], parentDstList[j])



			runSrcList = fileSrcList[i]['RunsList']	
			runDstList = fileDstList[i]['RunsList']	
			runSrcList.sort(key=lambda obj: obj['RunNumber'])
			runDstList.sort(key=lambda obj: obj['RunNumber'])
			#print runSrcList
			#print "____________________________________________"
			#print runDstList
			for j in range(len(runSrcList)):
				valid.assertRun(self, runSrcList[j], runDstList[j])
Exemplo n.º 2
0
    def testProcessed(self):
        print "testProcessed"
        procSrcList = self.srcApi.listProcessedDatasets(patternPrim=self.primName, patternProc=self.procName)
        procDstList = self.dstApi.listProcessedDatasets(patternPrim=self.primName, patternProc=self.procName)
        valid.assertProc(self, procSrcList[0], procDstList[0])
        for i in range(len(procSrcList[0]["AlgoList"])):
            valid.assertAlgo(self, procSrcList[0]["AlgoList"][i], procDstList[0]["AlgoList"][i])

        parentSrcList = self.srcApi.listDatasetParents(self.path)
        parentDstList = self.dstApi.listDatasetParents(self.path)
        parentSrcList.sort(key=lambda obj: obj["Name"])
        parentDstList.sort(key=lambda obj: obj["Name"])
        for i in range(len(parentSrcList)):
            self.assertEqual(parentSrcList[i]["PrimaryDataset"]["Name"], parentDstList[i]["PrimaryDataset"]["Name"])
            self.assertEqual(parentSrcList[i]["Name"], parentDstList[i]["Name"])
Exemplo n.º 3
0
    def test_01_File(self):
        print 'testFile'

        fileSrcList = srcApi.listFiles(path=path,
                                       retriveList=['all'],
                                       otherDetails=True)
        fileDstList = dstApi.listFiles(path=path,
                                       retriveList=['all'],
                                       otherDetails=True)
        fileSrcList.sort(key=lambda obj: obj['LogicalFileName'])
        fileDstList.sort(key=lambda obj: obj['LogicalFileName'])

        for i in range(len(fileSrcList)):
            valid.assertFile(self, fileSrcList[i], fileDstList[i])

            algoSrcList = fileSrcList[i]['AlgoList']
            algoDstList = fileDstList[i]['AlgoList']
            algoSrcList.sort(key=lambda obj: obj['ApplicationFamily'])
            algoDstList.sort(key=lambda obj: obj['ApplicationFamily'])
            #print algoSrcList
            #print "_______________________"
            #print algoDstList
            for j in range(len(algoSrcList)):
                valid.assertAlgo(self, algoSrcList[j], algoDstList[j])

            lumiSrcList = fileSrcList[i]['LumiList']
            lumiDstList = fileDstList[i]['LumiList']
            lumiSrcList.sort(key=lambda obj: obj['LumiSectionNumber'])
            lumiDstList.sort(key=lambda obj: obj['LumiSectionNumber'])
            for j in range(len(lumiSrcList)):
                valid.assertLumi(self, lumiSrcList[j], lumiSrcList[j])

            parentSrcList = fileSrcList[i]['ParentList']
            parentDstList = fileDstList[i]['ParentList']
            parentSrcList.sort(key=lambda obj: obj['LogicalFileName'])
            parentDstList.sort(key=lambda obj: obj['LogicalFileName'])
            for j in range(len(parentSrcList)):
                valid.assertFile(self, parentSrcList[j], parentDstList[j])

            runSrcList = fileSrcList[i]['RunsList']
            runDstList = fileDstList[i]['RunsList']
            runSrcList.sort(key=lambda obj: obj['RunNumber'])
            runDstList.sort(key=lambda obj: obj['RunNumber'])
            #print runSrcList
            #print "____________________________________________"
            #print runDstList
            for j in range(len(runSrcList)):
                valid.assertRun(self, runSrcList[j], runDstList[j])
Exemplo n.º 4
0
	def testProcessed(self):
		print 'testProcessed'
		procSrcList = srcApi.listProcessedDatasets(patternPrim = primName, patternProc = procName)
		procDstList = dstApi.listProcessedDatasets(patternPrim = primName, patternProc = procName, patternDT=pathTokens[3])
		#print processedInDBS
		print '\n\n\nprocSrcList',procSrcList
		print '\n\n\nprocDstList',procDstList
		valid.assertProc(self, procSrcList[0], procDstList[0])
		for i in range(len(procSrcList[0]['AlgoList'])):
			valid.assertAlgo(self, procSrcList[0]['AlgoList'][i], procDstList[0]['AlgoList'][i])

			
		parentSrcList = srcApi.listDatasetParents(path)
		parentDstList = dstApi.listDatasetParents(path)
		parentSrcList.sort(key=lambda obj: obj['Name'])
		parentDstList.sort(key=lambda obj: obj['Name'])
		for i in range(len(parentSrcList)):
			self.assertEqual(parentSrcList[i]['PrimaryDataset']['Name'], parentDstList[i]['PrimaryDataset']['Name'])
			self.assertEqual(parentSrcList[i]['Name'], parentDstList[i]['Name'])
Exemplo n.º 5
0
    def testProcessed(self):
        print 'testProcessed'
        procSrcList = self.srcApi.listProcessedDatasets(
            patternPrim=self.primName, patternProc=self.procName)
        procDstList = self.dstApi.listProcessedDatasets(
            patternPrim=self.primName, patternProc=self.procName)
        valid.assertProc(self, procSrcList[0], procDstList[0])
        for i in range(len(procSrcList[0]['AlgoList'])):
            valid.assertAlgo(self, procSrcList[0]['AlgoList'][i],
                             procDstList[0]['AlgoList'][i])

        parentSrcList = self.srcApi.listDatasetParents(self.path)
        parentDstList = self.dstApi.listDatasetParents(self.path)
        parentSrcList.sort(key=lambda obj: obj['Name'])
        parentDstList.sort(key=lambda obj: obj['Name'])
        for i in range(len(parentSrcList)):
            self.assertEqual(parentSrcList[i]['PrimaryDataset']['Name'],
                             parentDstList[i]['PrimaryDataset']['Name'])
            self.assertEqual(parentSrcList[i]['Name'],
                             parentDstList[i]['Name'])
Exemplo n.º 6
0
    def testFile(self):
        print "testFile"

        fileSrcList = self.srcApi.listFiles(path=self.path, retriveList=["all"], otherDetails=True)
        fileDstList = self.dstApi.listFiles(path=self.path, retriveList=["all"], otherDetails=True)
        fileSrcList.sort(key=lambda obj: obj["LogicalFileName"])
        fileDstList.sort(key=lambda obj: obj["LogicalFileName"])

        for i in range(len(fileSrcList)):
            valid.assertFile(self, fileSrcList[i], fileDstList[i])

            algoSrcList = fileSrcList[i]["AlgoList"]
            algoDstList = fileDstList[i]["AlgoList"]
            for j in range(len(algoSrcList)):
                valid.assertAlgo(self, algoSrcList[j], algoDstList[j])

            lumiSrcList = fileSrcList[i]["LumiList"]
            lumiDstList = fileDstList[i]["LumiList"]
            lumiSrcList.sort(key=lambda obj: obj["LumiSectionNumber"])
            lumiDstList.sort(key=lambda obj: obj["LumiSectionNumber"])
            for j in range(len(lumiSrcList)):
                valid.assertLumi(self, lumiSrcList[j], lumiSrcList[j])

            parentSrcList = fileSrcList[i]["ParentList"]
            parentDstList = fileDstList[i]["ParentList"]
            parentSrcList.sort(key=lambda obj: obj["LogicalFileName"])
            parentDstList.sort(key=lambda obj: obj["LogicalFileName"])
            for j in range(len(parentSrcList)):
                valid.assertFile(self, parentSrcList[j], parentDstList[j])

            runSrcList = fileSrcList[i]["RunsList"]
            runDstList = fileDstList[i]["RunsList"]

            runSrcList.sort(key=lambda obj: obj["RunNumber"])
            runDstList.sort(key=lambda obj: obj["RunNumber"])
            for j in range(len(runSrcList)):
                valid.assertRun(self, runSrcList[j], runDstList[j])
Exemplo n.º 7
0
	def testProcessed(self):
		print 'testProcessed'
		procSrcList = srcApi.listProcessedDatasets(patternPrim = primName, patternProc = procName, patternDT=tierName)
		procDstList = dstApi.listProcessedDatasets(patternPrim = primName, patternProc = procName, patternDT=tierName)
		valid.assertProc(self, procSrcList[0], procDstList[0])

		algoSrcList = procSrcList[0]['AlgoList']
		algoDstList = procDstList[0]['AlgoList']
		algoSrcList.sort(key=lambda obj: obj['ParameterSetID']['Hash'])
		algoDstList.sort(key=lambda obj: obj['ParameterSetID']['Hash'])
		algoSrcList.sort(key=lambda obj: obj['ApplicationFamily'])
		algoDstList.sort(key=lambda obj: obj['ApplicationFamily'])

		for i in range(len(algoSrcList)):
			valid.assertAlgo(self, algoSrcList[i], algoDstList[i])

			
		parentSrcList = srcApi.listDatasetParents(path)
		parentDstList = dstApi.listDatasetParents(path)
		parentSrcList.sort(key=lambda obj: obj['Name'])
		parentDstList.sort(key=lambda obj: obj['Name'])
		for i in range(len(parentSrcList)):
			self.assertEqual(parentSrcList[i]['PrimaryDataset']['Name'], parentDstList[i]['PrimaryDataset']['Name'])
			self.assertEqual(parentSrcList[i]['Name'], parentDstList[i]['Name'])