本文整理汇总了Python中util.runtestBase.RuntestBase类的典型用法代码示例。如果您正苦于以下问题:Python RuntestBase类的具体用法?Python RuntestBase怎么用?Python RuntestBase使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了RuntestBase类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Python代码示例。
示例1: usage
def usage(self, c):
RuntestBase.usage(self, c)
print " --esc run esc instead of avm"
print " --escbin location of esc/bin directory - defaults to ../../esc/bin"
print " --ext set the testfile extension (defaults to .as)"
print " --threads number of threads to run (default=1), set to 1 to have tests finish sequentially"
exit(c)
开发者ID:FlowShift,项目名称:thane,代码行数:7,代码来源:runtests.py
示例2: preProcessTests
def preProcessTests(self):
RuntestBase.preProcessTests(self)
# Are we running esc - depends on a valid avm
if self.runESC:
self.runSource = True
# generate the executable cmd for esc
#escAbcs = [f for f in os.listdir(self.escbin) if f.endswith('.abc')] #not all abcs are used for esc
escAbcs = ['debug','util','bytes-tamarin','util-tamarin','lex-char','lex-token',
'lex-scan','ast','ast-decode','parse','asm','abc','emit','cogen',
'cogen-stmt','cogen-expr','esc-core','eval-support','esc-env','main']
if not self.escbin.endswith('/'):
self.escbin += '/'
for f in escAbcs:
self.avm += ' %s%s.es.abc' % (self.escbin, f)
self.avm += ' -- '
self.avm += ' %s../test/spidermonkey-prefix.es' % self.escbin #needed to run shell harness
if self.androidthreads:
p=subprocess.Popen('adb devices',shell=True,stdout=subprocess.PIPE,stderr=subprocess.PIPE)
(out,err)=p.communicate()
out = out.decode('latin_1','replace')
out = out.split('\n')
for line in out:
items=line.split()
if len(items)==2 and items[1]=='device':
for i in range(self.threads):
self.androiddevices.append(items[0])
if len(self.androiddevices)==0:
print("error: adb did not detect any attached devices")
print("adb devices stdout: %s stderr: %s" % (out,err))
sys.exit(1)
print("detected %d android devices" % (len(self.androiddevices)/self.threads))
self.threads=len(self.androiddevices)
开发者ID:bsdf,项目名称:trx,代码行数:32,代码来源:runtests.py
示例3: compile_test
def compile_test(self, as_file):
if not isfile(self.shellabc):
exit("ERROR: shell.abc %s does not exist, SHELLLABC environment variable or --shellabc must be set to shell.abc" % self.shellabc)
args = []
args.append('-import %s' % self.shellabc)
if self.optimize:
args.append('-optimize')
RuntestBase.compile_test(self, as_file, args)
开发者ID:FlowShift,项目名称:thane,代码行数:8,代码来源:runtests.py
示例4: usage
def usage(self, c):
RuntestBase.usage(self, c)
print ' --ext set the testfile extension (defaults to .as)'
print ' --threads number of threads to run (default=# of cpu/cores), set to 1 to have tests finish sequentially'
print ' --full do a full coverage pass (all switches and options exercised)'
# print ' -i --intermediate create and compare intermediate code/AVM assembly/parse tree'
print ' -r --regex output err.actual files that are regex corrected'
exit(c)
开发者ID:haibocheng,项目名称:flex,代码行数:9,代码来源:runtests.py
示例5: usage
def usage(self, c):
RuntestBase.usage(self, c)
print ' --ext set the testfile extension (defaults to .as)'
print ' --threads number of threads to run (default=# of cpu/cores), set to 1 to have tests finish sequentially'
print ' --diff create and compare intermediate code/AVM assembly/parse tree to asc2'
print ' --asc2 required for diff tests - specify asc.jar to compare results to'
print ' -r --regex output err.actual files that are regex corrected'
exit(c)
开发者ID:mapleelpam,项目名称:adobe-asc-thrift,代码行数:9,代码来源:runtests.py
示例6: usage
def usage(self, c):
RuntestBase.usage(self, c)
print ' --esc run esc instead of avm'
print ' --escbin location of esc/bin directory - defaults to ../../esc/bin'
print ' --eval use run-time compiler'
print ' --ext set the testfile extension (defaults to .as)'
print ' --ats generate ats swfs instead of running tests'
print ' --atsdir base output directory for ats swfs - defaults to ATS_SWFS'
print ' --threads number of threads to run (default=# of cpu/cores), set to 1 to have tests finish sequentially'
print ' --verify run a verify pass instead of running abcs'
exit(c)
开发者ID:Jeffxz,项目名称:nodeas,代码行数:11,代码来源:runtests.py
示例7: preProcessTests
def preProcessTests(self):
RuntestBase.preProcessTests(self)
# Are we running esc - depends on a valid avm
if self.runESC:
self.runSource = True
# generate the executable cmd for esc
#escAbcs = [f for f in os.listdir(self.escbin) if f.endswith('.abc')] #not all abcs are used for esc
escAbcs = ['debug','util','bytes-tamarin','util-tamarin','lex-char','lex-token',
'lex-scan','ast','ast-decode','parse','asm','abc','emit','cogen',
'cogen-stmt','cogen-expr','esc-core','eval-support','esc-env','main']
if not self.escbin.endswith('/'):
self.escbin += '/'
for f in escAbcs:
self.avm += ' %s%s.es.abc' % (self.escbin, f)
self.avm += ' -- '
self.avm += ' %s../test/spidermonkey-prefix.es' % self.escbin #needed to run shell harness
开发者ID:zwetan,项目名称:tessa,代码行数:16,代码来源:runtests.py
示例8: usage
def usage(self, c):
RuntestBase.usage(self, c)
print ' --esc run esc instead of avm'
print ' --escbin location of esc/bin directory - defaults to ../../esc/bin'
print ' --eval use run-time compiler'
print ' --ext set the testfile extension (defaults to .as)'
print ' --ats generate ats swfs instead of running tests'
print ' --atsdir base output directory for ats swfs - defaults to ATS_SWFS'
print ' --threads number of threads to run (default=# of cpu/cores), set to 1 to have tests finish sequentially'
print ' --verify run a verify pass instead of running abcs'
print ' --aotsdk location of the AOT sdk used to compile tests to standalone executables.'
print ' --aotout where the resulting binaries should be put (defaults to the location of the as file).'
print ' --aotargs any extra arguments to pass to compile.py.'
print ' --remoteip IP/DNS address of the machine to run the tests on.'
print ' --remoteuser user name to use to connect to the remote machine.'
exit(c)
开发者ID:zwetan,项目名称:tessa,代码行数:16,代码来源:runtests.py
示例9: parseOptions
def parseOptions(self):
opts = RuntestBase.parseOptions(self)
for o, v in opts:
if o in ('--ext',):
self.sourceExt = v
elif o in ('--esc',):
self.runESC = True
elif o in ('--escbin',):
self.escbin = v
elif o in ('--eval',):
self.eval = True
elif o in ('--threads',):
self.threads=int(v)
elif o in ('--ats',):
self.genAtsSwfs = True
self.rebuildtests = True
elif o in ('--atsdir',):
self.atsDir = v
elif o in ('--verify',):
self.verify = True
self.vmargs = '-Dverifyall -Dverbose=verify'
elif o in ('--aotsdk',):
self.aotsdk = v
elif o in ('--aotout',):
self.aotout = v
elif o in ('--aotargs',):
self.aotextraargs = v
elif o in ('--remoteip',):
self.remoteip = v
elif o in ('--remoteuser',):
self.remoteuser = v
开发者ID:zwetan,项目名称:tessa,代码行数:31,代码来源:runtests.py
示例10: usage
def usage(self, c):
RuntestBase.usage(self, c)
print(' --esc run esc instead of avm')
print(' --escbin location of esc/bin directory - defaults to ../../esc/bin')
print(' --eval use run-time compiler')
print(' --ext set the testfile extension (defaults to .as)')
print(' --ats generate ats swfs instead of running tests')
print(' --atsdir base output directory for ats swfs - defaults to ATS_SWFS')
print(' --threads number of threads to run (default=# of cpu/cores), set to 1 to have tests finish sequentially')
print(' --passthreadid set the environment variable threadid when calling the AVM script. The threadid is an integer 0...n-1 where threads=n.')
print(' --androidthreads assign a thread for each android device connected.')
print(' --verify run a verify pass instead of running abcs')
print(' --verifyonly run a -Dverifyonly pass: only checks test exitcode')
print(' --remoteip IP/DNS address of the machine to run the tests on.')
print(' --remoteuser user name to use to connect to the remote machine.')
exit(c)
开发者ID:bsdf,项目名称:trx,代码行数:16,代码来源:runtests.py
示例11: parseOptions
def parseOptions(self):
opts = RuntestBase.parseOptions(self)
for o, v in opts:
if o in ('-S', '--avm2'):
self.avm2 = v
elif o in ('--avmname',):
self.avmname = v
elif o in ('--avm2name',):
self.avm2name = v
elif o in ('-i', '--iterations'):
self.iterations = int(v)
elif o in ('-l','--log'):
self.logFileType='log'
self.createOutputFile()
elif o in ('-k', '--socketlog'):
self.logresults = True
elif o in ('-r', '--runtime'):
self.vmname = v
elif o in ('-m', '--memory'):
self.memory = True
elif o in ('--vmversion',):
self.vmversion = v
elif o in ('--vmargs2',):
self.vmargs2 = v
elif o in ('--nooptimize',):
self.optimize = False
elif o in ('--perfm',):
self.perfm = True
开发者ID:FlowShift,项目名称:thane,代码行数:28,代码来源:runtests.py
示例12: parseOptions
def parseOptions(self):
opts = RuntestBase.parseOptions(self)
for o, v in opts:
if o in ('--ext',):
self.sourceExt = v
elif o in ('--threads',):
self.threads=int(v)
elif o in ('-r','--regex',):
self.regexOutput = True
elif o in ('--full',):
self.fullRun = True
开发者ID:haibocheng,项目名称:flex,代码行数:11,代码来源:runtests.py
示例13: parseOptions
def parseOptions(self):
opts = RuntestBase.parseOptions(self)
for o, v in opts:
if o in ('--ext',):
self.sourceExt = v
elif o in ('--threads',):
self.threads=int(v)
elif o in ('-r','--regex',):
self.regexOutput = True
elif o in ('--diff',):
self.diffTesting = True
elif o in ('--asc2',):
self.asc2 = v
开发者ID:mapleelpam,项目名称:adobe-asc-thrift,代码行数:13,代码来源:runtests.py
示例14: parseOptions
def parseOptions(self):
opts = RuntestBase.parseOptions(self)
for o, v in opts:
if o in ('--ext',):
self.sourceExt = v
elif o in ('--esc',):
self.runESC = True
elif o in ('--escbin',):
self.escbin = v
elif o in ('--eval',):
self.eval = True
elif o in ('--passthreadid',):
self.passthreadid=True
elif o in ('--androidthreads',):
self.androidthreads=True
self.threads=1
elif o in ('--threads',):
try:
self.threads=int(v)
except ValueError:
print('Incorrect threads value: %s\n' % v)
self.usage(2)
elif o in ('--ats',):
self.genAtsSwfs = True
self.rebuildtests = True
# Need to run single threaded since we create a temp file for
# every test and this file can collide when using multiple threads
self.threads = 1
elif o in ('--atsdir',):
self.atsDir = v
elif o in ('--verify',):
self.verify = True
self.vmargs = '-Dverifyall -Dverbose=verify'
elif o in ('--verifyonly',):
self.verifyonly = True
if '-Dverifyonly' not in self.vmargs:
self.vmargs += ' -Dverifyonly'
elif o in ('--remoteip',):
self.remoteip = v
elif o in ('--remoteuser',):
self.remoteuser = v
开发者ID:bsdf,项目名称:trx,代码行数:41,代码来源:runtests.py
示例15: setEnvironVars
def setEnvironVars(self):
RuntestBase.setEnvironVars(self)
if "ESCBIN" in environ:
self.escbin = environ["ESCBIN"].strip()
开发者ID:FlowShift,项目名称:thane,代码行数:4,代码来源:runtests.py
示例16: setEnvironVars
def setEnvironVars(self):
RuntestBase.setEnvironVars(self)
开发者ID:haibocheng,项目名称:flex,代码行数:2,代码来源:runtests.py
示例17: setOptions
def setOptions(self):
RuntestBase.setOptions(self)
self.longOptions.extend(['ext=','esc','escbin=','eval','threads=','ats','atsdir=','verify'])
开发者ID:zwetan,项目名称:tessa,代码行数:3,代码来源:runtests.py
示例18: setOptions
def setOptions(self):
RuntestBase.setOptions(self)
# self.options += ''
self.longOptions.extend(["ext=", "esc", "escbin=", "threads="])
开发者ID:FlowShift,项目名称:thane,代码行数:4,代码来源:runtests.py
示例19: setOptions
def setOptions(self):
RuntestBase.setOptions(self)
self.options += 'ri'
self.longOptions.extend(['ext=','diff','asc2=','regex','threads='])
开发者ID:mapleelpam,项目名称:adobe-asc-thrift,代码行数:4,代码来源:runtests.py
示例20: __init__
def __init__(self):
# Set threads to # of available cpus/cores
self.threads = detectCPUs()
RuntestBase.__init__(self)
开发者ID:bsdf,项目名称:trx,代码行数:4,代码来源:runtests.py
注:本文中的util.runtestBase.RuntestBase类示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论