Example #1
0
         if key=='estimated wall time remaining':continue
         if key in dst:
            if str(src[key])!=str(dst[key]):
               print>>rf,"    Failed comparison -- key:",key,"  standard:",src[key],'  candidate:',dst[key]
               ok=False
         else:
            print>>rf,"    Candidate missing key:",key,src[key]
            ok=False
      keys=dst.keys()
      keys.sort(key=str.lower)
      for key in keys:
         if key not in src:
            print>>rf,"    Standard missing key:",key,dst[key]
      if ok:print>>rf,'\t    ... Passed'
      else: print>>rf,'    !! Failed one or more comparisons !!'



mainDir=os.path.join(os.getcwd(),'0main') # Point to the main that is used to run the tests

if __name__ == "__main__":
   sys.path.append(mainDir) # allow importing of modules from mainDir
   import main
   timMeth=timingMethods
   if len(sys.argv)==2 and sys.argv[1]=="originate":
      main.makeStandards(timingsDirList,mainDir,timMeth)
   else:
      main.makeCandidates(timingsDirList,mainDir,timingMethods)


Example #2
0
         if key in dst:
            if str(src[key])!=str(dst[key]):
               print>>rf,"    Failed comparison -- key:",key,"  standard:",src[key],'  candidate:',dst[key]
               ok=False
         else:
            print>>rf,"    Candidate missing key:",key,src[key]
            ok=False
      keys=dst.keys()
      keys.sort(key=str.lower)
      for key in keys:
         if key in skipKeys:continue
         if key not in src:
            print>>rf,"    Standard missing key:",key,dst[key]
      if ok:print>>rf,'\t    ... Passed'
      else: print>>rf,'    !! Failed one or more comparisons !!'



mainDir=os.path.join(os.getcwd(),'0main') # Point to the main that is used to run the tests

if __name__ == "__main__":
   sys.path.append(mainDir) # allow importing of modules from mainDir
   import main
   regMeth=regressMethods
   if len(sys.argv)==2 and sys.argv[1]=="originate":
      main.makeStandards(regressDirList,mainDir,regMeth)
   else:
      main.makeCandidates(regressDirList,mainDir,regressMethods)