Ejemplo n.º 1
0
    def create_profile(self):
        retVal = PerfTest.create_profile(self)

        config_file = os.path.join(self.build.dir, 'robotium.config')
        with open(config_file, 'w') as fHandle:
            fHandle.write("profile=%s\n" % self.profile_path)

            remoteLog = self._paths['dest'] + "/tcheck3.log"
            fHandle.write("logfile=%s\n" % remoteLog)
            fHandle.write("host=%s\n" % self.options.webserver_url)
            fHandle.write("rawhost=%s\n" % self.options.webserver_url)
            envstr = ""
            delim = ""
            # This is not foolproof and the ideal solution would be to have
            # one env/line instead of a single string
            env_vars = {'MOZ_CRASHREPORTER_SHUTDOWN': 1,
                        'NO_EM_RESTART': 1,
                        'MOZ_CRASHREPORTER_NO_REPORT': 1,
                        'MOZ_CRASHREPORTER': 1}
#TODO: disabled until we have a single device and we can tweak the test for
#      network access
#                        'MOZ_DISABLE_NONLOCAL_CONNECTIONS': 1}
            for item in env_vars:
                envstr += "%s%s=%s" % (delim, item, env_vars[item])
                delim = ","
            fHandle.write("envvars=%s\n" % envstr)

        self.dm.push(config_file, self._paths['dest'])
        return retVal