From e2d9a1348af50b4d8777e3681e7d0d4918422681 Mon Sep 17 00:00:00 2001 From: Henrik Skupin Date: Fri, 12 Apr 2013 14:16:10 +0200 Subject: [PATCH] Remove already downloaded but not removed updates at the end of update tests (#34) --- mozmill_automation/testrun.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/mozmill_automation/testrun.py b/mozmill_automation/testrun.py index 2c73b51..c99c6c9 100644 --- a/mozmill_automation/testrun.py +++ b/mozmill_automation/testrun.py @@ -656,6 +656,14 @@ def run_update_tests(self, is_fallback): TestRun.run_tests(self) except Exception, e: print "Execution of test-run aborted: %s" % str(e) + finally: + try: + path = self._mozmill.persisted["updateStagingPath"] + print "Remove updates staging folder: %s" % path + shutil.rmtree(path) + except Exception, e: + print "Failed to remove the update staging folder: " + str(e) + self.last_exception = e def exec_testrun(cls):