def init(self, globalConf=None): self.__globalConf = globalConf self.__logger = LoggerModule.LoggerModule() self.__host = HostModule.HostModule() self.__relayCard = RelayCardModule.RelayCardModule() self.__device = DeviceModule.DeviceModule() self.__workaround = WorkaroundModule.WorkaroundModule() self.__getEndTime = None self.__misc = MiscModule.MiscModule() self.__osManager = OsManagerModule.OsManagerModule() self.__flashFile = FlashFileModule.FlashFileModule() self.__output = OutputModule.OutputModule() # table to match uefi var with offset in RCSI_table self.__RSCI_dict = dict() self.__RSCI_dict["wake_source"] = 36 self.__RSCI_dict["reset_source"] = 37 self.__RSCI_dict["reset_type"] = 38 self.__RSCI_dict["shutdown_source"] = 39 self.__RSCI_dict["reset_extra_information"] = None # table to match uefi var to name in sysfs self.efi_vars_matching = dict() self.efi_vars_matching["wake_source"] = "WakeSource" self.efi_vars_matching["reset_source"] = "ResetSource" self.efi_vars_matching["reset_type"] = "ResetType" self.efi_vars_matching["shutdown_source"] = "ShutdownSource" self.efi_vars_matching["mode"] = "LoaderEntryLast" self.efi_vars_matching["watchdog"] = "WdtCounter"
def __init__(self, conf): self.globalConf = conf self.verdict = True self.output = "" self.output_list = [] self.name = "" self.description = "" self.specific = "" self.isWorkaround = False self.skip = False self.backup_name = "" self.defaultParameter = dict() self.logger = LoggerModule.LoggerModule() self.host = HostModule.HostModule() self.relayCard = RelayCardModule.RelayCardModule() self.device = DeviceModule.DeviceModule() self.workaround = WorkaroundModule.WorkaroundModule() self.misc = MiscModule.MiscModule() self.osManager = OsManagerModule.OsManagerModule() self.flashFile = FlashFileModule.FlashFileModule() self.logs = LogsModule.LogsModule() self.efiVar = EfiVarModule.EfiVarModule() self.dediprog = DediprogModule.DediprogModule() self.outputModule = OutputModule.OutputModule() self.configuration = ConfigurationModule.ConfigurationModule() self.bootData = BootDataModule.BootDataModule() self.resetIrq = ResetIrqModule.ResetIrqModule() self.watchdog = WatchdogModule.WatchdogModule() self.download = DownloadModule.DownloadModule() self.campaign = CampaignModule.CampaignModule() self.flash = FlashModule.FlashModule() self.events = EventsModule.EventsModule()
def init(self, globalConf=None): self.__globalConf = globalConf self.__logger = LoggerModule.LoggerModule() self.__host = HostModule.HostModule() self.__device = DeviceModule.DeviceModule() self.__workaround = WorkaroundModule.WorkaroundModule() self.__configuration = ConfigurationModule.ConfigurationModule() self.__misc = MiscModule.MiscModule() self.__osManager = OsManagerModule.OsManagerModule() self.__output = OutputModule.OutputModule() self.__report = ReportModule.ReportModule() self.logsFiles = list() self.__mandatoryLogsFiles = ["history_event"] self.tc_name = "" self.tc_name_number = "" campaign_report_path = self.__globalConf.get("REPORT_PATH") if campaign_report_path and os.path.isdir(campaign_report_path): self.bootota_log_path = os.path.abspath(os.path.join(campaign_report_path, "logs_bootota")) # if directory not created, create it for future use in TC if not os.path.isdir(self.bootota_log_path): os.makedirs(self.bootota_log_path) self.__logger.printLog("WARNING", "LogsModule init: storing BootOta specific data into " "{}".format(self.bootota_log_path)) else: self.__logger.printLog("WARNING", "LogsModule init: invalid or empty report path " "('{}')".format(campaign_report_path)) self.bootota_log_path = "" self.tc_report_path = ""
def init(self, globalConf): self.__globalConf = globalConf self.__logger = LoggerModule.LoggerModule() self.__host = HostModule.HostModule() self.__output = OutputModule.OutputModule() self.__efiVar = EfiVarModule.EfiVarModule() self.__resetIrq = ResetIrqModule.ResetIrqModule() self.__device = DeviceModule.DeviceModule() self.__osManager = OsManagerModule.OsManagerModule() self.__logs = LogsModule.LogsModule() self.__workaround = WorkaroundModule.WorkaroundModule() self.__configuration = ConfigurationModule.ConfigurationModule() self.__RSCI_table = list()
def init(self, globalConf): self.__globalConf = globalConf self.__logger = LoggerModule.LoggerModule() self.__host = HostModule.HostModule() self.__output = OutputModule.OutputModule() self.__device = DeviceModule.DeviceModule() self.__osManager = OsManagerModule.OsManagerModule() self.__misc = MiscModule.MiscModule() self.__workaround = WorkaroundModule.WorkaroundModule() self.__configuration = ConfigurationModule.ConfigurationModule() self.__logs = LogsModule.LogsModule() self.force_ramdump_removal = False self.wd_handler = self.HistoryEventHandler(self.__globalConf)
def __init__(self, conf): self.__globalConf = conf self.__historyEvent = "" self.__initial_content = [] self.__delta = "" self.__crashlogs = None self.__configuration = ConfigurationModule.ConfigurationModule() self.__output = OutputModule.OutputModule() self.__logger = LoggerModule.LoggerModule() self.__host = HostModule.HostModule() self.__device = DeviceModule.DeviceModule() self.__workaround = WorkaroundModule.WorkaroundModule() self.__logs = LogsModule.LogsModule() self.__misc = MiscModule.MiscModule()
def __init__(self, conf): self.globalConf = conf self.logger = LoggerModule.LoggerModule() self.host = HostModule.HostModule() self.relayCard = RelayCardModule.RelayCardModule() self.device = DeviceModule.DeviceModule() self.workaround = WorkaroundModule.WorkaroundModule() self.misc = MiscModule.MiscModule() self.osManager = OsManagerModule.OsManagerModule() self.flashFile = FlashFileModule.FlashFileModule() self.logs = LogsModule.LogsModule() self.efiVar = EfiVarModule.EfiVarModule() self.dediprog = DediprogModule.DediprogModule() self.output = OutputModule.OutputModule() self.configuration = ConfigurationModule.ConfigurationModule() self.bootData = BootDataModule.BootDataModule() self.resetIrq = ResetIrqModule.ResetIrqModule() self.download = DownloadModule.DownloadModule() self.flash = FlashModule.FlashModule() self.campaign = CampaignModule.CampaignModule() self.watchdog = WatchdogModule.WatchdogModule() self.report = ReportModule.ReportModule() self.events = EventsModule.EventsModule() self.step_list = list() self.verdict = True self.output = "" self.name = "" self.skipping = False self.tc_crashlogs = None self.allowed_TC_upon_success = [] self.removed_TC_upon_success = [] self.allowed_TC_upon_failure = [] self.removed_TC_upon_failure = [] self.allowed_TC_upon_skip = [] self.removed_TC_upon_skip = [] self.campaign_constraint_file = "" self.campaign_constraint_file_name = "PupdrCampaignConstraints.json" self.enable_init = True self.enable_final = True self.INVALID = "INVALID" self.VALID = "VALID" self.BLOCKED = "BLOCKED" self.FAILURE = "FAILURE" self.SUCCESS = "SUCCESS" self.verdict_name = self.SUCCESS self.step_number = 0 self.output_dict = {}
def init(self, conf): # global conf self.__globalConf = conf # create all modules # create logger isExternal = self.__globalConf.get("EXTERNAL_LOGGER") LoggerModule.LoggerModule().init(self.__globalConf, externalLogger=isExternal) self.Logger = LoggerModule.LoggerModule() # create misc MiscModule.MiscModule().init(self.__globalConf) self.Misc = MiscModule.MiscModule() # create configs ConfigurationModule.ConfigurationModule().init(self.__globalConf) self.Configuration = ConfigurationModule.ConfigurationModule() # create workaround WorkaroundModule.WorkaroundModule().init(self.__globalConf) self.Workaround = WorkaroundModule.WorkaroundModule() # create host isExternal = self.__globalConf.get("EXTERNAL_LOCAL_EXEC", False) HostModule.HostModule().init(self.__globalConf, externalCmdExec=isExternal) self.Host = HostModule.HostModule() # create relay card RelayCardModule.RelayCardModule().init( self.__globalConf, externalRelayCard=self.__globalConf.get("EXTERNAL_RELAY_CARD")) self.RelayCard = RelayCardModule.RelayCardModule() # create report ReportModule.ReportModule().init(self.__globalConf) self.Report = ReportModule.ReportModule() # create output OutputModule.OutputModule().init(self.__globalConf) self.Output = OutputModule.OutputModule() # create device DeviceModule.DeviceModule().init(self.__globalConf) self.Device = DeviceModule.DeviceModule() # create campaign CampaignModule.CampaignModule().init(self.__globalConf) self.Campaign = CampaignModule.CampaignModule() # create OsManager OsManagerModule.OsManagerModule().init(self.__globalConf) self.OsManager = OsManagerModule.OsManagerModule() # create dediprog DediprogModule.DediprogModule().init(self.__globalConf) self.Dediprog = DediprogModule.DediprogModule() # create FlashFile FlashFileModule.FlashFileModule().init(self.__globalConf) self.FlashFile = FlashFileModule.FlashFileModule() # create logs LogsModule.LogsModule().init(self.__globalConf) self.Logs = LogsModule.LogsModule() # create efi var EfiVarModule.EfiVarModule().init(self.__globalConf) self.EfiVar = EfiVarModule.EfiVarModule() # create Flash FlashModule.FlashModule().init(self.__globalConf) self.Flash = FlashModule.FlashModule() # create reset irq ResetIrqModule.ResetIrqModule().init(self.__globalConf) self.ResetIrq = ResetIrqModule.ResetIrqModule() # create boot data BootDataModule.BootDataModule().init(self.__globalConf) self.BootData = BootDataModule.BootDataModule() # create watchdog WatchdogModule.WatchdogModule().init(self.__globalConf) self.Watchdog = WatchdogModule.WatchdogModule() # create download DownloadModule.DownloadModule().init(self.__globalConf) self.Download = DownloadModule.DownloadModule() # create testing TestingModule.TestingModule().init(self.__globalConf) self.Testing = TestingModule.TestingModule() # create DntEvents EventsModule.EventsModule().init(self.__globalConf) self.Events = EventsModule.EventsModule() # scripts scripts.COS_scripts.COS().init(self.__globalConf) self.COS_scripts = scripts.COS_scripts.COS() scripts.MOS_scripts.MOS().init(self.__globalConf) self.MOS_scripts = scripts.MOS_scripts.MOS() scripts.Watchdog_scripts.Watchdog().init(self.__globalConf) self.Watchdog_scripts = scripts.Watchdog_scripts.Watchdog() scripts.KeyPress_scripts.KeyPress().init(self.__globalConf) self.KeyPress_scripts = scripts.KeyPress_scripts.KeyPress() scripts.POS_scripts.POS().init(self.__globalConf) self.POS_scripts = scripts.POS_scripts.POS() scripts.RMA_scripts.RMA().init(self.__globalConf) self.RMA_scripts = scripts.RMA_scripts.RMA() scripts.ROS_scripts.ROS().init(self.__globalConf) self.ROS_scripts = scripts.ROS_scripts.ROS() scripts.DNX_scripts.DNX().init(self.__globalConf) self.DNX_scripts = scripts.DNX_scripts.DNX() scripts.Flash_scripts.Flash().init(self.__globalConf) self.Flash_scripts = scripts.Flash_scripts.Flash() scripts.Shell_scripts.Shell().init(self.__globalConf) self.Shell_scripts = scripts.Shell_scripts.Shell() scripts.Time_scripts.Time().init(self.__globalConf) self.Time_scripts = scripts.Time_scripts.Time() scripts.Debug_scripts.Debug().init(self.__globalConf) self.Debug_scripts = scripts.Debug_scripts.Debug() # print Library version self.Logger.printLog( "INFO", "BOOT/OTA LIBRARY Code Version: " + self.__version) self.__globalConf["BOOTOTA_LIBRARY_CODE_VERSION"] = self.__version if self.__framework_push: self.Logger.printLog( "INFO", "FRAMEWORK Code Version: " + self.__framework_push) self.__globalConf["FRAMEWORK_CODE_VERSION"] = self.__framework_push