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)
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
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
def preProcessTests(self): RuntestBase.preProcessTests(self) #if not isfile(self.abcasmShell+'.abc'): # self.js_print("Precompiling %s" % self.abcasmShell) # self.compile_test(self.abcasmShell+'.as') # 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)