def setupUtilities(self): if self.options.clean: # Ensure a fresh directory structure for our tests self.clean() self.device.mkDir(DEVICE_TEST_ROOT) XPCShellRemote.setupUtilities(self)
def setupUtilities(self): if self.options.clean: # Ensure a fresh directory structure for our tests self.clean() self.device.mkDir(self.options.remoteTestRoot) XPCShellRemote.setupUtilities(self)
def pushLibs(self): if not self.options.use_device_libs: count = XPCShellRemote.pushLibs(self) if not count: # couldn't find any libs, fallback to device libs self.env['LD_LIBRARY_PATH'] = '/system/b2g' self.options.use_device_libs = True
def setupTestDir(self): if self.device._useZip: return XPCShellRemote.setupTestDir(self) for root, dirs, files in os.walk(self.xpcDir): for filename in files: rel_path = os.path.relpath(os.path.join(root, filename), self.xpcDir) test_file = os.path.join(self.remoteScriptsDir, rel_path) print 'pushing %s' % test_file self.device.pushFile(os.path.join(root, filename), test_file, retryLimit=10)
def launchProcess(self, cmd, stdout, stderr, env, cwd): try: # This returns 1 even when tests pass - hardcode returncode to 0 (bug 773703) outputFile = XPCShellRemote.launchProcess(self, cmd, stdout, stderr, env, cwd) self.shellReturnCode = 0 except DMError: self.shellReturnCode = -1 outputFile = "xpcshelloutput" f = open(outputFile, "a") f.write("\n%s" % traceback.format_exc()) f.close() return outputFile
def setupTestDir(self): if self.device.useZip: return XPCShellRemote.setupTestDir(self) push_attempts = 10 for root, dirs, files in os.walk(self.xpcDir): for filename in files: rel_path = os.path.relpath(os.path.join(root, filename), self.xpcDir) test_file = os.path.join(self.remoteScriptsDir, rel_path) for retry in range(1, push_attempts + 1): print "pushing", test_file, "(attempt %s of %s)" % (retry, push_attempts) try: self.device.pushFile(os.path.join(root, filename), test_file) break except DMError: if retry == push_attempts: raise
def setupTestDir(self): if self.device._useZip: return XPCShellRemote.setupTestDir(self) push_attempts = 10 for root, dirs, files in os.walk(self.xpcDir): for filename in files: rel_path = os.path.relpath(os.path.join(root, filename), self.xpcDir) test_file = os.path.join(self.remoteScriptsDir, rel_path) for retry in range(1, push_attempts + 1): print 'pushing', test_file, '(attempt %s of %s)' % ( retry, push_attempts) try: self.device.pushFile(os.path.join(root, filename), test_file) break except DMError: if retry == push_attempts: raise
def setLD_LIBRARY_PATH(self, env): if self.options.use_device_libs: env['LD_LIBRARY_PATH'] = '/system/b2g' env['LD_PRELOAD'] = '/system/b2g/libmozglue.so' else: XPCShellRemote.setLD_LIBRARY_PATH(self, env)
def setLD_LIBRARY_PATH(self, env): if self.options.use_device_libs: env["LD_LIBRARY_PATH"] = "/system/b2g" env["LD_PRELOAD"] = "/system/b2g/libmozglue.so" else: XPCShellRemote.setLD_LIBRARY_PATH(self, env)
def pushLibs(self): if not self.options.use_device_libs: XPCShellRemote.pushLibs(self)
def setLD_LIBRARY_PATH(self): self.env['LD_LIBRARY_PATH'] = '/system/b2g' if not self.options.use_device_libs: # overwrite /system/b2g if necessary XPCShellRemote.setLD_LIBRARY_PATH(self)