Пример #1
0
    def runPerfMatrix(self):

        part = self.only
        wf = ''
        m = re.match('^perfMatrix(\d+\.\d+|)$',part)
        if m:  wf = m.group(1)
        if wf: wf = '--list '+wf
        cmd = 'mkdir %s; cd %s;' % (part, part)
        cmd += scriptPath+'/runPerfMatrix.py %s > %s.log 2>&1 ' % (wf, part)
        self.doCmd( cmd )

        from publishQAResults import QAPublisher
        qap = QAPublisher(self.plat, self.release)
        qap.publishPerfMatrixResults(part)

        remDir = self.afsLogDir
        if not os.path.exists(remDir): os.makedirs(remDir)

        cmd = 'cp '+part+'/'+part+'.log '+remDir
        try:
            self.doCmd( cmd )
        except Exception, e:
            print "ERROR when copying perfMatrix logFile to ", remDir
            print "      exception ", str(e)
            print "      cmd = ", cmd
Пример #2
0
    def runPerfMatrix(self):

        part = self.only
        wf = ''
        m = re.match('^perfMatrix(\d+\.\d+|)$', part)
        if m: wf = m.group(1)
        if wf: wf = '--list ' + wf
        cmd = 'mkdir %s; cd %s;' % (part, part)
        cmd += scriptPath + '/runPerfMatrix.py %s > %s.log 2>&1 ' % (wf, part)
        self.doCmd(cmd)

        from publishQAResults import QAPublisher
        qap = QAPublisher(self.plat, self.release)
        qap.publishPerfMatrixResults(part)

        remDir = self.afsLogDir
        if not os.path.exists(remDir): os.makedirs(remDir)

        cmd = 'cp ' + part + '/' + part + '.log ' + remDir
        try:
            self.doCmd(cmd)
        except Exception, e:
            print "ERROR when copying perfMatrix logFile to ", remDir
            print "      exception ", str(e)
            print "      cmd = ", cmd
Пример #3
0
    def runTests(self):

        self.afsLogDir = os.path.join(self.installDir, self.plat,
                                      self.stamp[:3],
                                      self.cycle + '-' + self.stamp,
                                      self.release, 'qaLogs')
        threadWeight = {
            'relval+standard': 8,
            'relval+highstats': 8,
            'autoBuild': 4,
            'perfMatrix': 3,
            '1of2': 8,
            '2of2': 8,
        }
        self.prepare()
        self.fixJobNames(threadWeight)
        for item in self.only:
            tWeight = 1
            try:
                tWeight = threadWeight[item]
            except:
                print "\n ==> found process with unknown threadWeight", item, '\n'

            print '\nitem=', item, '; tWeight=', tWeight

            self.continueIfHasEnoughPower(tWeight)

            cmd = self.cmsenv + scriptPath + '/runReleaseTests.py --afsLogDir ' + self.afsLogDir + ' --only ' + item

            print '\nPreparing to run %s "%s"' % (self.buildDir, cmd)
            if self.dryRun: continue

            current = Tester(self.buildDir, cmd, tWeight, self.release,
                             self.afsLogDir, item)
            self.threadList.append(current)
            current.start()
            time.sleep(
                random.randint(0, 5) + 5
            )  # try to avoid race cond by sleeping random amount of time [5,10] sec

    # wait until all threads are finished
        activeThrd = self.activeThreads()
        while activeThrd > 0:
            time.sleep(10)
            aThrd = self.activeThreads()
            if aThrd != activeThrd:
                print "Waiting for " + str(aThrd) + " threads to finish"
                activeThrd = aThrd

        if self.dryRun: return
        from publishQAResults import QAPublisher
        qap = QAPublisher(self.plat, self.release)
        qap.publishVGResults(self.afsLogDir)
        return
Пример #4
0
    def runTests(self):
        
        self.afsLogDir = os.path.join(self.installDir,self.plat,self.stamp[:3],self.cycle+'-'+self.stamp,self.release,'qaLogs')
        threadWeight = { 'relval+standard' : 8 ,
                         'relval+highstats': 8 ,
                         'autoBuild'       : 4 ,
                         'perfMatrix'      : 3 ,
                         '1of2'            : 8 ,
                         '2of2'            : 8 ,
                         }
        self.prepare()
        self.fixJobNames(threadWeight)
        for item in self.only:
            tWeight = 1
            try:
                tWeight = threadWeight[item]
            except:
                print "\n ==> found process with unknown threadWeight", item, '\n'
            
            print '\nitem=', item, '; tWeight=', tWeight
            
            self.continueIfHasEnoughPower(tWeight)

            cmd = self.cmsenv + scriptPath+'/runReleaseTests.py --afsLogDir '+self.afsLogDir+' --only '+item
            
            print '\nPreparing to run %s "%s"' % (self.buildDir, cmd)
            if self.dryRun: continue

            current = Tester(self.buildDir, cmd, tWeight, self.release, self.afsLogDir, item)
            self.threadList.append(current)
            current.start()
            time.sleep(random.randint(0,5)+5) # try to avoid race cond by sleeping random amount of time [5,10] sec 

    	# wait until all threads are finished
        activeThrd = self.activeThreads()
        while activeThrd > 0:
    	    time.sleep(10)
            aThrd = self.activeThreads()
            if aThrd != activeThrd:
                print "Waiting for "+str(aThrd)+" threads to finish"
                activeThrd = aThrd

    	if self.dryRun: return
        from publishQAResults import QAPublisher
        qap = QAPublisher(self.plat, self.release)
        qap.publishVGResults(self.afsLogDir)
        return
Пример #5
0
                print "     exception ", str(e)
                print "     cmd = ", cmd
        
        print "rrt> publish valgrind xml files and command list to AFS install area ... "
        remDir = self.afsLogDir
        if not os.path.exists(remDir): os.makedirs(remDir)
            
        cmd = 'cd newPerf-'+part+'; tar cf - `find . -name \*vlgd.xml` | (cd '+remDir+' ; tar xf - ) '
        try:
            self.doCmd( cmd )
        except Exception, e:
	    pass

        print "rrt> going to publish QA results "
        from publishQAResults import QAPublisher
        qap = QAPublisher(self.plat, self.release)
        qap.publishPerfSuiteResults(part)
        qap.publishValgrindXML(part)
        qap.publishVGResults(remDir)

        print 'rrt> publishing perfNew log file to ', remDir
        cmd = 'cp newPerf-'+part+'/perfNew-'+part+'.log '+remDir
        try:
            self.doCmd( cmd )
        except Exception, e:
            print "rrt> ERROR when copying perfNew logFile to ", remDir
            print "     exception ", str(e)
            print "     cmd = ", cmd
        
        print "rrt> check for valgrind errors, rebuild and re-run if needed ..."
        stepRevg = 'none'
Пример #6
0
                print "     exception ", str(e)
                print "     cmd = ", cmd

        print "rrt> publish valgrind xml files and command list to AFS install area ... "
        remDir = self.afsLogDir
        if not os.path.exists(remDir): os.makedirs(remDir)

        cmd = 'cd newPerf-' + part + '; tar cf - `find . -name \*vlgd.xml` | (cd ' + remDir + ' ; tar xf - ) '
        try:
            self.doCmd(cmd)
        except Exception, e:
            pass

        print "rrt> going to publish QA results "
        from publishQAResults import QAPublisher
        qap = QAPublisher(self.plat, self.release)
        qap.publishPerfSuiteResults(part)
        qap.publishValgrindXML(part)
        qap.publishVGResults(remDir)

        print 'rrt> publishing perfNew log file to ', remDir
        cmd = 'cp newPerf-' + part + '/perfNew-' + part + '.log ' + remDir
        try:
            self.doCmd(cmd)
        except Exception, e:
            print "rrt> ERROR when copying perfNew logFile to ", remDir
            print "     exception ", str(e)
            print "     cmd = ", cmd

        print "rrt> check for valgrind errors, rebuild and re-run if needed ..."
        stepRevg = 'none'
Пример #7
0
    def runTests(self):

        self.release = helpers.getRelease(self.cycle)
        if not self.release:
            print "no release (yet) found for ", self.cycle
            return -2
        
        self.releasePath = helpers.getReleasePath(self.release)

        if not os.path.exists(os.path.join(self.releasePath,'.SCRAM',self.plat)): return
        if not os.path.exists(os.path.join(self.releasePath,'installed.done')): return
        if os.path.exists(os.path.join(self.releasePath,'qaLogs.done')): return

        self.afsLogDir = os.path.join(self.releasePath, 'qaLogs')
        cycx, xday, self.stamp = helpers.getStamp(self.release)

        report=''    	
    	print 'Running on %s machine(s)' % len(self.testBoxes)
        
        cmd0 = 'unset DISPLAY;export CMSINTBLD_CMS_PATH=%s;export SCRAM_ARCH=%s;' % (self.cmsPath,self.plat)
        self.buildDir = os.path.join(self.buildDir, self.release)
        usedHost = {}
        threadWeight = { 'relval+standard' : 8 ,
                         'relval+highstats': 8 ,
                         'autoBuild'       : 4 ,
                         'perfMatrix'      : 3 ,
                         '1of2'            : 8 ,
                         '2of2'            : 8 ,
                         }
        self.prepare()
        self.fixJobNames(threadWeight)
        for item in self.only:

            tWeight = 1 # default: item has only one process 
            try:
                tWeight = threadWeight[item]
            except:
                print "\n ==> found process with unknown threadWeight", item, '\n'
    	    actHost, usedHosts =  self.getNextHost(tWeight)
            
            print '\nitem', item, 'acthost', actHost, 'used hosts = ', usedHosts, 'tWeight = ', tWeight

            cmd = cmd0 + self.buildDir+'/QA/runReleaseTests.py '
            cmd += '--cycle ' + self.cycle  + ' '
            cmd += '--rel   ' + self.release  + ' '
            cmd += '--build ' + self.buildDir + ' '
            cmd += '--only  ' + item + ' '
            
            print '\nPreparing to run %s "%s" %s' % (self.buildDir, cmd, actHost)

            current = Tester(self.buildDir, cmd, actHost, tWeight, self.release, self.afsLogDir, item)
            self.threadList.append(current)
            current.start()
            time.sleep(random.randint(0,5)+5) # try to avoid race cond by sleeping random amount of time [5,10] sec 

    	# wait until all threads are finished
        activeThrd = self.activeThreads()
        while activeThrd > 0:
    	    time.sleep(10)
            aThrd = self.activeThreads()
            if aThrd != activeThrd:
                print "Waiting for "+str(aThrd)+" threads to finish"
                activeThrd = aThrd
    	    
        from publishQAResults import QAPublisher
        qap = QAPublisher(self.plat, self.release)
        qap.publishVGResults(self.afsLogDir)
        return
Пример #8
0
    def runTests(self):

        self.release = helpers.getRelease(self.cycle)
        if not self.release:
            print "no release (yet) found for ", self.cycle
            return -2

        self.releasePath = helpers.getReleasePath(self.release)

        if not os.path.exists(
                os.path.join(self.releasePath, '.SCRAM', self.plat)):
            return
        if not os.path.exists(os.path.join(self.releasePath,
                                           'installed.done')):
            return
        if os.path.exists(os.path.join(self.releasePath, 'qaLogs.done')):
            return

        self.afsLogDir = os.path.join(self.releasePath, 'qaLogs')
        cycx, xday, self.stamp = helpers.getStamp(self.release)

        report = ''
        print 'Running on %s machine(s)' % len(self.testBoxes)

        cmd0 = 'unset DISPLAY;export CMSINTBLD_CMS_PATH=%s;export SCRAM_ARCH=%s;' % (
            self.cmsPath, self.plat)
        self.buildDir = os.path.join(self.buildDir, self.release)
        usedHost = {}
        threadWeight = {
            'relval+standard': 8,
            'relval+highstats': 8,
            'autoBuild': 4,
            'perfMatrix': 3,
            '1of2': 8,
            '2of2': 8,
        }
        self.prepare()
        self.fixJobNames(threadWeight)
        for item in self.only:

            tWeight = 1  # default: item has only one process
            try:
                tWeight = threadWeight[item]
            except:
                print "\n ==> found process with unknown threadWeight", item, '\n'
            actHost, usedHosts = self.getNextHost(tWeight)

            print '\nitem', item, 'acthost', actHost, 'used hosts = ', usedHosts, 'tWeight = ', tWeight

            cmd = cmd0 + self.buildDir + '/QA/runReleaseTests.py '
            cmd += '--cycle ' + self.cycle + ' '
            cmd += '--rel   ' + self.release + ' '
            cmd += '--build ' + self.buildDir + ' '
            cmd += '--only  ' + item + ' '

            print '\nPreparing to run %s "%s" %s' % (self.buildDir, cmd,
                                                     actHost)

            current = Tester(self.buildDir, cmd, actHost, tWeight,
                             self.release, self.afsLogDir, item)
            self.threadList.append(current)
            current.start()
            time.sleep(
                random.randint(0, 5) + 5
            )  # try to avoid race cond by sleeping random amount of time [5,10] sec

    # wait until all threads are finished
        activeThrd = self.activeThreads()
        while activeThrd > 0:
            time.sleep(10)
            aThrd = self.activeThreads()
            if aThrd != activeThrd:
                print "Waiting for " + str(aThrd) + " threads to finish"
                activeThrd = aThrd

        from publishQAResults import QAPublisher
        qap = QAPublisher(self.plat, self.release)
        qap.publishVGResults(self.afsLogDir)
        return