Ejemplo n.º 1
0
    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)
Ejemplo n.º 2
0
    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)
Ejemplo n.º 3
0
    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)
Ejemplo n.º 4
0
    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)
Ejemplo n.º 5
0
 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
Ejemplo n.º 6
0
 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
Ejemplo n.º 7
0
    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)
Ejemplo n.º 8
0
    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)
Ejemplo n.º 9
0
 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
Ejemplo n.º 10
0
 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
Ejemplo n.º 11
0
    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
Ejemplo n.º 12
0
    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
Ejemplo n.º 13
0
 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)
Ejemplo n.º 14
0
 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)
Ejemplo n.º 15
0
 def pushLibs(self):
     if not self.options.use_device_libs:
         XPCShellRemote.pushLibs(self)
Ejemplo n.º 16
0
 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)
Ejemplo n.º 17
0
 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)
Ejemplo n.º 18
0
 def pushLibs(self):
     if not self.options.use_device_libs:
         XPCShellRemote.pushLibs(self)
Ejemplo n.º 19
0
 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)