def substep3(depth="", diedepth="", **args): sshaft.beginstep('substep3', args) depth = depth + ":substep3" if (depth == diedepth): sshaft.dief("ERROR: Error depth reached: " + diedepth) return sshaft.endstep()
def substep3(depth="", diedepth="", **args): sshaft.beginstep('substep3',args) depth=depth+":substep3" if (depth==diedepth): sshaft.dief("ERROR: Error depth reached: "+diedepth) return sshaft.endstep()
def substep1(depth="", diedepth="", **args): sshaft.beginstep('substep1', args) depth = depth + ":substep1" if (depth == diedepth): sshaft.dief("ERROR: Error depth reached: " + diedepth) sshaft.substep(cmd=[substep2, [], {'depth': depth, 'diedepth': diedepth}]) return sshaft.endstep()
def substep1(depth="", diedepth="", **args): sshaft.beginstep('substep1',args) depth=depth+":substep1" if (depth==diedepth): sshaft.dief("ERROR: Error depth reached: "+diedepth) sshaft.substep(cmd=[substep2,[],{'depth':depth, 'diedepth':diedepth }]) return sshaft.endstep()
def substep2(depth="", diedepth="", **args): sshaft.beginstep('substep2', args) depth = depth + ":substep2" if (depth == diedepth): sshaft.dief("ERROR: Error depth reached: " + diedepth) cmd = "testsshaft.tcl" cmd = cmd + " -depth " + depth cmd = cmd + " -return" if (diedepth): cmd = cmd + " -die " + diedepth sshaft.substep(mode='unix_step', cmd=cmd) for app in string.split(sshaft.gettechvar('Sshaft::Apps::AppList')): sshaft.dir_init('run/' + app, app) cmd = sshaft.gettechvar('Sshaft::Apps::' + app + '::TestCmd') sshaft.substep(mode=app + '_step', cmd=cmd, rundir='run/' + app) return sshaft.endstep()
def substep2(depth="", diedepth="", **args): sshaft.beginstep('substep2',args) depth=depth+":substep2" if (depth==diedepth): sshaft.dief("ERROR: Error depth reached: "+diedepth) cmd="testsshaft.tcl" cmd=cmd+" -depth "+depth cmd=cmd+" -return" if (diedepth): cmd=cmd+" -die "+diedepth sshaft.substep(mode='unix_step',cmd=cmd) for app in string.split(sshaft.gettechvar('Sshaft::Apps::AppList')): sshaft.dir_init('run/'+app,app) cmd=sshaft.gettechvar('Sshaft::Apps::'+app+'::TestCmd') sshaft.substep(mode=app+'_step',cmd=cmd,rundir='run/'+app) return sshaft.endstep()
################################################### # # checkCdsCni.py # # Created 3/3/2007 by Rhett Davis ([email protected]) # # Check master layer/purpose list and look for layers # that haven't been defined # ##################################################### import sshaft, os, sys, re sshaft.beginstep("genCdsCni.py") # Parse arguments args = sys.argv[1:] while len(args) > 0: arg = args[0] args = args[1:] sshaft.logf("LOG_WARN", "WARNING: Unrecognized argument " + arg) layers = [] section = False f = file(os.environ["PDK_DIR"] + "/techfile/cni/Santana.tech", "r") for line in f: m = re.search(r"^\s*(\w+)\(", line) if m: section = m.group(1) continue
################################################### # # gentech.py # # Created 1/3/2007 by Rhett Davis ([email protected]) # ##################################################### import sshaft, os, sys, testproc sshaft.beginstep('gentech.py') # Parse arguments args = sys.argv[1:] while (len(args) > 0): arg = args[0] args = args[1:] sshaft.logf('LOG_WARN', "WARNING: Unrecognized argument " + arg) #filename=os.environ['PDK_DIR']+'/techfile/'+sshaft.gettechvar('GenTech::CdsTechFile') #libname=sshaft.gettechvar('GenTech::TechLibName') #tech=sshaft.gettechvar('GenTech::CdsTechData') #path=os.environ['PDK_DIR']+'/lib/'+libname #sshaft.dir_init('run/cds','cds') #cmd='pdkCompileTechLibrary( ?libname "'+libname+'" ?path "'+path+'"' #cmd+=' ?filename "'+filename+'" ?tech "'+tech+'" )' #sshaft.substep(mode='cds_step', cmd=cmd, rundir='run/cds') filename = os.environ['PDK_DIR'] + '/ncsu_basekit/techfile/cni/Santana.tech' libname = 'NCSU_TechLib_FreePDK45' pycellname = os.environ['PDK_DIR'] + '/ncsu_basekit/lib/' + libname
################################################### # # gentech.py # # Created 1/3/2007 by Rhett Davis ([email protected]) # ##################################################### import sshaft, os, sys, testproc sshaft.beginstep("genlitho.py") # Parse arguments args = sys.argv[1:] while len(args) > 0: arg = args[0] args = args[1:] sshaft.logf("LOG_WARN", "WARNING: Unrecognized argument " + arg) opticdir = os.environ["PDK_DIR"] + "/ncsu_basekit/techfile/calibre/models/" cmd = "calibrewb -a opticsgen -opticalfile " + opticdir + "OpticalD0 -o " + opticdir + "opticalD0 >& calibrewb.log.D0" sshaft.substep(mode="unix_prog", cmd=cmd, env="calibre") cmd = ( "calibrewb -a opticsgen -opticalfile " + opticdir + "OpticalD10 -o " + opticdir + "opticalD10 >& calibrewb.log.D10" ) sshaft.substep(mode="unix_prog", cmd=cmd, env="calibre") cmd = ( "calibrewb -a opticsgen -opticalfile " + opticdir
# leaf-node in the regression test tree. # # testsshaft.tcl is defined in # dist/src/tcl/testsshaft.tcl # The other scriptapps are defined in # dist/src/[lang]/testapp.[lang] # where [lang] is tcl, py, or pl # substep1, substep2, and substep3 are defined in # dist/lib/[lang]/testproc.[lang] # where [lang] is tcl, py, or il # ##################################################### import sshaft, sys, testproc sshaft.beginstep('testapp.py') ret=0 depth="" diedepth="" # Parse arguments args=sys.argv[1:] sshaft.logf('LOG_INFO',"Arguments: "+str(args)) while (len(args)>0): arg=args[0] args=args[1:] if (arg=="-return"): ret=1 elif (arg=="-depth"): depth=args[0]
################################################### # # gentech.py # # Created 1/3/2007 by Rhett Davis ([email protected]) # ##################################################### import sshaft, os, sys, testproc sshaft.beginstep('genlitho.py') # Parse arguments args = sys.argv[1:] while (len(args) > 0): arg = args[0] args = args[1:] sshaft.logf('LOG_WARN', "WARNING: Unrecognized argument " + arg) opticdir = os.environ[ 'PDK_DIR'] + '/ncsu_basekit/techfile/calibre/models/metal_contact/' cmd = 'calibrewb -a opticsgen -opticalfile ' + opticdir + 'OpticalD0 -o ' + opticdir + 'opticalD0 >& calibrewb.log.D0' sshaft.substep(mode='unix_prog', cmd=cmd, env='calibre') cmd = 'calibrewb -a opticsgen -opticalfile ' + opticdir + 'OpticalD10 -o ' + opticdir + 'opticalD10 >& calibrewb.log.D10' sshaft.substep(mode='unix_prog', cmd=cmd, env='calibre') cmd = 'calibrewb -a opticsgen -opticalfile ' + opticdir + 'OpticalDM10 -o ' + opticdir + 'opticalDM10 >& calibrewb.log.DM10' sshaft.substep(mode='unix_prog', cmd=cmd, env='calibre') opticdir = os.environ[
################################################### # # checkCdsCni.py # # Created 3/3/2007 by Rhett Davis ([email protected]) # # Check master layer/purpose list and look for layers # that haven't been defined # ##################################################### import sshaft, os, sys, re sshaft.beginstep('genCdsCni.py') # Parse arguments args = sys.argv[1:] while (len(args) > 0): arg = args[0] args = args[1:] sshaft.logf('LOG_WARN', "WARNING: Unrecognized argument " + arg) layers = [] section = False f = file(os.environ['PDK_DIR'] + '/techfile/cni/Santana.tech', 'r') for line in f: m = re.search(r"^\s*(\w+)\(", line) if m: section = m.group(1) continue
################################################### # # gentech.py # # Created 1/3/2007 by Rhett Davis ([email protected]) # ##################################################### import sshaft, os, sys, testproc sshaft.beginstep('gentech.py') # Parse arguments args=sys.argv[1:] while (len(args)>0): arg=args[0] args=args[1:] sshaft.logf('LOG_WARN',"WARNING: Unrecognized argument "+arg) #filename=os.environ['PDK_DIR']+'/techfile/'+sshaft.gettechvar('GenTech::CdsTechFile') #libname=sshaft.gettechvar('GenTech::TechLibName') #tech=sshaft.gettechvar('GenTech::CdsTechData') #path=os.environ['PDK_DIR']+'/lib/'+libname #sshaft.dir_init('run/cds','cds') #cmd='pdkCompileTechLibrary( ?libname "'+libname+'" ?path "'+path+'"' #cmd+=' ?filename "'+filename+'" ?tech "'+tech+'" )' #sshaft.substep(mode='cds_step', cmd=cmd, rundir='run/cds') filename=os.environ['PDK_DIR']+'/ncsu_basekit/techfile/cni/Santana.tech' libname='NCSU_TechLib_FreePDK45' pycellname=os.environ['PDK_DIR']+'/ncsu_basekit/lib/'+libname
################################################### # # dir_init.py # # Created 1/3/2007 by Rhett Davis ([email protected]) # ##################################################### import sshaft, sys, testproc sshaft.beginstep('dir_init.py') sshaft.dir_init(sys.argv[1], sys.argv[2]) sshaft.endstep()
# leaf-node in the regression test tree. # # testsshaft.tcl is defined in # dist/src/tcl/testsshaft.tcl # The other scriptapps are defined in # dist/src/[lang]/testapp.[lang] # where [lang] is tcl, py, or pl # substep1, substep2, and substep3 are defined in # dist/lib/[lang]/testproc.[lang] # where [lang] is tcl, py, or il # ##################################################### import sshaft, sys, testproc sshaft.beginstep('testapp.py') ret = 0 depth = "" diedepth = "" # Parse arguments args = sys.argv[1:] sshaft.logf('LOG_INFO', "Arguments: " + str(args)) while (len(args) > 0): arg = args[0] args = args[1:] if (arg == "-return"): ret = 1 elif (arg == "-depth"): depth = args[0]
################################################### # # dir_init.py # # Created 1/3/2007 by Rhett Davis ([email protected]) # ##################################################### import sshaft, sys, testproc sshaft.beginstep('dir_init.py') sshaft.dir_init(sys.argv[1],sys.argv[2]) sshaft.endstep()