michael@0: from b2g_update_test import B2GUpdateTestCase, OTA, FOTA michael@0: import os michael@0: michael@0: this_dir = os.path.abspath(os.path.dirname(__file__)) michael@0: update_test_dir = os.path.dirname(this_dir) michael@0: michael@0: class UpdateTestStatus(B2GUpdateTestCase): michael@0: B2G_UPDATES = "/data/local/b2g-updates" michael@0: michael@0: def setUp(self): michael@0: # Stage a phony update to get the http server up and running michael@0: mar_path = os.path.join(update_test_dir, "unit", "data", "simple.mar") michael@0: self.stage_update(complete_mar=mar_path) michael@0: michael@0: bad_xml = os.path.join(this_dir, "data", "bad.xml") michael@0: err_cgi = os.path.join(this_dir, "data", "err.cgi") michael@0: self.runner.adb.push(bad_xml, self.B2G_UPDATES + "/bad.xml") michael@0: self.runner.adb.shell("mkdir " + self.B2G_UPDATES + "/cgi-bin") michael@0: self.runner.adb.push(err_cgi, self.B2G_UPDATES + "/cgi-bin/err.cgi") michael@0: self.runner.adb.shell("chmod 755 " + self.B2G_UPDATES + "/cgi-bin/err.cgi") michael@0: michael@0: B2GUpdateTestCase.setUp(self) michael@0: michael@0: def test_status(self): michael@0: self.marionette.set_script_timeout(30 * 1000) michael@0: status_js = os.path.join(os.path.dirname(__file__), michael@0: "update_test_status.js") michael@0: self.execute_update_test(status_js) michael@0: