def _run_tests(tags): application_folder = None try: # Backup current tags test_tags = self.test_tags application_folder = self.duplicate_application(source_folder) self.bin = mozinstall.get_binary(application_folder, 'Firefox') self.test_tags = tags FirefoxUITestRunner.run_tests(self, tests) except Exception: self.exc_info = sys.exc_info() self.logger.error('Failure during execution of the update test.', exc_info=self.exc_info) finally: self.test_tags = test_tags self.logger.info('Removing copy of the application at "%s"' % application_folder) try: mozfile.remove(application_folder) except IOError as e: self.logger.error('Cannot remove copy of application: "%s"' % str(e))
def _run_tests(tags): application_folder = None try: # Backup current tags test_tags = self.test_tags application_folder = self.duplicate_application(source_folder) self.bin = mozinstall.get_binary(application_folder, 'Firefox') self.test_tags = tags FirefoxUITestRunner.run_tests(self, tests) except Exception: self.exc_info = sys.exc_info() self.logger.error( 'Failure during execution of the update test.', exc_info=self.exc_info) finally: self.test_tags = test_tags self.logger.info('Removing copy of the application at "%s"' % application_folder) try: mozfile.remove(application_folder) except IOError as e: self.logger.error( 'Cannot remove copy of application: "%s"' % str(e))
def __init__(self, **kwargs): FirefoxUITestRunner.__init__(self, **kwargs) self.original_bin = self.bin self.prefs.update(DEFAULT_PREFS) # In case of overriding the update URL, set the appropriate preference override_url = kwargs.pop('update_override_url', None) if override_url: self.prefs.update({'app.update.url.override': override_url}) self.run_direct_update = not kwargs.pop('update_fallback_only', False) self.run_fallback_update = not kwargs.pop('update_direct_only', False) self.test_handlers = [UpdateTestCase]