Example #1
0
    def update(self):
        # Step 1: Get latest succesfull build revision
        response = urllib2.urlopen(self.nightly_dir + "LAST_CHANGE")
        chromium_rev = response.read()

        # Step 3: Get v8 revision
        response = urllib2.urlopen(self.nightly_dir + chromium_rev +
                                   "/REVISIONS")
        self.cset = re.findall('"v8_revision_git": "([a-z0-9]*)",',
                               response.read())[0]

        # Step 3: Test if there is a new revision
        utils.getOrDownload(
            self.tmp_dir, "chrome", self.cset,
            self.nightly_dir + chromium_rev + "/" + self.filename,
            self.tmp_dir + self.filename)
        # Step 4: Unzip
        utils.unzip(self.tmp_dir, self.filename)

        # Step 5: Install on device
        if self.slaveType == "android":
            print subprocess.check_output([
                "adb", "install", "-r",
                self.tmp_dir + "/chrome-android/apks/ChromeShell.apk"
            ])

        # Step 6: Save info
        self.updated = True
Example #2
0
    def __init__(self):
        super(Shumway, self).__init__('shumway', '0.1', 'shumway')

        # Only update harness once a day:
        from datetime import datetime
        date = datetime.now().strftime("%Y-%m-%d")
        utils.getOrDownload("/tmp/", "shumway", date,
                            "http://mozilla.github.io/shumway/shell/shumway-shell.zip",
                            "/tmp/shumway-shell.zip")
        utils.unzip("/tmp/", "shumway-shell.zip")
Example #3
0
    def __init__(self):
        super(Shumway, self).__init__('shumway', '0.1', 'shumway')

        # Only update harness once a day:
        from datetime import datetime
        date = datetime.now().strftime("%Y-%m-%d")
        utils.getOrDownload(
            "/tmp/", "shumway", date,
            "http://mozilla.github.io/shumway/shell/shumway-shell.zip",
            "/tmp/shumway-shell.zip")
        utils.unzip("/tmp/", "shumway-shell.zip")
Example #4
0
    def _update(self, folder_id):
        # Step 2: Find the correct file
        response = urllib2.urlopen(self.nightly_dir+"/"+folder_id)
        html = response.read()
        if self.slaveType == "android":
            exec_file = re.findall("fennec-[a-zA-Z0-9.]*.en-US.android-arm.apk", html)[0]
            json_file = re.findall("fennec-[a-zA-Z0-9.]*.en-US.android-arm.json", html)[0]
        elif self.slaveType == "mac-desktop":
            exec_file = re.findall("firefox-[a-zA-Z0-9.]*.en-US.mac.dmg", html)[0]
            json_file = re.findall("firefox-[a-zA-Z0-9.]*.en-US.mac.json", html)[0]
        elif self.slaveType == "linux-desktop":
            exec_file = re.findall("firefox-[a-zA-Z0-9.]*.en-US.linux-x86_64.tar.bz2", html)[0]
            json_file = re.findall("firefox-[a-zA-Z0-9.]*.en-US.linux-x86_64.json", html)[0]
        else:
            exec_file = re.findall("firefox-[a-zA-Z0-9.]*.en-US.win32.zip", html)[0]
            json_file = re.findall("firefox-[a-zA-Z0-9.]*.en-US.win32.json", html)[0]

        # Step 3: Get build information
        response = urllib2.urlopen(self.nightly_dir+"/"+folder_id+"/"+json_file)
        html = response.read()
        info = json.loads(html)

        # Step 4: Test if there is a new revision
        if self.slaveType == "android":
            output = self.tmp_dir + self.folder + "/fennec.apk"
        elif self.slaveType == "mac-desktop":
            output = self.tmp_dir + self.folder + "/firefox.dmg"
        elif self.slaveType == "linux-desktop":
            output = self.tmp_dir + self.folder + "/firefox.tar.bz2"
        else:
            output = self.tmp_dir + self.folder + "/firefox.zip"
        utils.getOrDownload(self.tmp_dir, "mozilla", info["moz_source_stamp"],
                            self.nightly_dir + "/" + folder_id + "/" + exec_file,
                            output)

        # Step 5: Prepare to run
        if self.slaveType == "android":
            print subprocess.check_output(["adb", "install", "-r", self.tmp_dir + self.folder + "/fennec.apk"])
        elif self.slaveType == "mac-desktop":
            if os.path.exists("/Volumes/Nightly"):
                print subprocess.check_output(["hdiutil", "detach", "/Volumes/Nightly"])
            print subprocess.check_output(["hdiutil", "attach", self.tmp_dir + self.folder + "/firefox.dmg"])
        elif self.slaveType == "linux-desktop":
            utils.unzip(self.tmp_dir + self.folder, "firefox.tar.bz2")
        else:
            utils.unzip(self.tmp_dir + self.folder, "firefox.zip")

        # Step 6: Save info
        self.updated = True
        self.cset = info["moz_source_stamp"]
Example #5
0
    def _update(self, folder_id):
        # Step 2: Find the correct file
        response = urllib2.urlopen(self.nightly_dir+"/"+folder_id)
        html = response.read()
        if self.slaveType == "android":
            exec_file = re.findall("fennec-[a-zA-Z0-9.]*.en-US.android-arm.apk", html)[0]
            json_file = re.findall("fennec-[a-zA-Z0-9.]*.en-US.android-arm.json", html)[0]
        elif self.slaveType == "mac-desktop":
            exec_file = re.findall("firefox-[a-zA-Z0-9.]*.en-US.mac.dmg", html)[0]
            json_file = re.findall("firefox-[a-zA-Z0-9.]*.en-US.mac.json", html)[0]
        elif self.slaveType == "linux-desktop":
            exec_file = re.findall("firefox-[a-zA-Z0-9.]*.en-US.linux-x86_64.tar.bz2", html)[0]
            json_file = re.findall("firefox-[a-zA-Z0-9.]*.en-US.linux-x86_64.json", html)[0]
        else:
            exec_file = re.findall("firefox-[a-zA-Z0-9.]*.en-US.win32.zip", html)[0]
            json_file = re.findall("firefox-[a-zA-Z0-9.]*.en-US.win32.json", html)[0]

        # Step 3: Get build information
        response = urllib2.urlopen(self.nightly_dir+"/"+folder_id+"/"+json_file)
        html = response.read()
        info = json.loads(html)

        # Step 4: Test if there is a new revision
        if self.slaveType == "android":
            output = self.tmp_dir + self.folder + "/fennec.apk"
        elif self.slaveType == "mac-desktop":
            output = self.tmp_dir + self.folder + "/firefox.dmg"
        elif self.slaveType == "linux-desktop":
            output = self.tmp_dir + self.folder + "/firefox.tar.bz2"
        else:
            output = self.tmp_dir + self.folder + "/firefox.zip"
        utils.getOrDownload(self.tmp_dir, "mozilla", info["moz_source_stamp"],
                            self.nightly_dir + "/" + folder_id + "/" + exec_file,
                            output)

        # Step 5: Prepare to run
        if self.slaveType == "android":
            print subprocess.check_output(["adb", "install", "-r", self.tmp_dir + self.folder + "/fennec.apk"])
        elif self.slaveType == "mac-desktop":
            if os.path.exists("/Volumes/Nightly"):
                print subprocess.check_output(["hdiutil", "detach", "-force", "/Volumes/Nightly"])
            print subprocess.check_output(["hdiutil", "attach", self.tmp_dir + self.folder + "/firefox.dmg"])
        elif self.slaveType == "linux-desktop":
            utils.unzip(self.tmp_dir + self.folder, "firefox.tar.bz2")
        else:
            utils.unzip(self.tmp_dir + self.folder, "firefox.zip")

        # Step 6: Save info
        self.updated = True
        self.cset = info["moz_source_stamp"]
Example #6
0
    def update(self):
        # Step 1: Get latest succesfull build revision
        response = urllib2.urlopen(self.build_info_url)
        self.cset = re.findall('WebKit r([0-9]*)<', response.read())[0]

        # Step 2: Download the latest installation
        utils.getOrDownload(self.tmp_dir, "webkit", self.cset,
                            self.nightly_dir + "WebKit-SVN-r" + self.cset + ".dmg",
                            self.tmp_dir + "WebKit.dmg")

        # Step 3: Prepare running
        if os.path.exists("/Volumes/WebKit"):
            self.kill()
            print subprocess.check_output(["hdiutil", "detach", "/Volumes/WebKit"])
        print subprocess.check_output(["hdiutil", "attach", self.tmp_dir + "/WebKit.dmg"])

        # Step 4: Save info
        self.updated = True
Example #7
0
    def update(self):
        # Step 1: Get latest succesfull build revision
        response = urllib2.urlopen(self.build_info_url)
        self.cset = re.findall('WebKit r([0-9]*)<', response.read())[0]

        # Step 2: Download the latest installation
        utils.getOrDownload(self.tmp_dir, "webkit", self.cset,
                            self.nightly_dir + "WebKit-SVN-r" + self.cset + ".dmg",
                            self.tmp_dir + "WebKit.dmg")

        # Step 3: Prepare running
        if os.path.exists("/Volumes/WebKit"):
            self.kill()
            print subprocess.check_output(["hdiutil", "detach", "/Volumes/WebKit"])
        print subprocess.check_output(["hdiutil", "attach", self.tmp_dir + "/WebKit.dmg"])

        # Step 4: Save info
        self.updated = True
Example #8
0
    def update(self):
        # Step 1: Get latest succesfull build revision
        response = urllib2.urlopen(self.nightly_dir+"LAST_CHANGE")
        chromium_rev = response.read()

        # Step 3: Get v8 revision
        response = urllib2.urlopen(self.nightly_dir + chromium_rev + "/REVISIONS")
        self.cset = re.findall('"v8_revision_git": "([a-z0-9]*)",', response.read())[0]

        # Step 3: Test if there is a new revision
        utils.getOrDownload(self.tmp_dir, "chrome", self.cset,
                            self.nightly_dir + chromium_rev + "/" + self.filename,
                            self.tmp_dir + self.filename)
        # Step 4: Unzip
        utils.unzip(self.tmp_dir, self.filename)

        # Step 5: Install on device
        if self.slaveType == "android":
            print subprocess.check_output(["adb", "install", "-r", self.tmp_dir+"/chrome-android/apks/ChromeShell.apk"])

        # Step 6: Save info
        self.updated = True