DXR is a code search and navigation tool aimed at making sense of large projects. It supports full-text and regex searches as well as structural queries.

Mercurial (d1ed7de67f5a)

VCS Links

Line Code
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29
from b2g_update_test import B2GUpdateTestCase, OTA, FOTA
import os

this_dir = os.path.abspath(os.path.dirname(__file__))
update_test_dir = os.path.dirname(this_dir)

class UpdateTestStatus(B2GUpdateTestCase):
    B2G_UPDATES = "/data/local/b2g-updates"

    def setUp(self):
        # Stage a phony update to get the http server up and running
        mar_path = os.path.join(update_test_dir, "unit", "data", "simple.mar")
        self.stage_update(complete_mar=mar_path)

        bad_xml = os.path.join(this_dir, "data", "bad.xml")
        err_cgi = os.path.join(this_dir, "data", "err.cgi")
        self.runner.adb.push(bad_xml, self.B2G_UPDATES + "/bad.xml")
        self.runner.adb.shell("mkdir " + self.B2G_UPDATES + "/cgi-bin")
        self.runner.adb.push(err_cgi, self.B2G_UPDATES + "/cgi-bin/err.cgi")
        self.runner.adb.shell("chmod 755 " + self.B2G_UPDATES + "/cgi-bin/err.cgi")

        B2GUpdateTestCase.setUp(self)

    def test_status(self):
        self.marionette.set_script_timeout(30 * 1000)
        status_js = os.path.join(os.path.dirname(__file__),
                                 "update_test_status.js")
        self.execute_update_test(status_js)