Esempio n. 1
0
    def __init__(self):
        try:
            self.mCmdLineParms = CommandLineParameters
            self.mConfigArgs = retrieve_config_argument(sys.argv[1:])

        except SystemExit as aSysExit:
            sys.exit(int(str(aSysExit)))
        except BaseException:
            print(
                "[ERROR] - An Unhandled Error has Occurred during applications"
                " setup of " + str(sys.argv[0]))
            traceback.print_exc(file=sys.stdout)
            sys.exit(44)

        super().__init__(CmdLine.Switches[CmdLine.msg_lev], Defaults.msg_level)

        self.fctrl_dir = None
        self.mode = None
        self.summary = None
        self.process_queue = None
        self.client_lev = False
        self.default_root = ""

        self.ctrl_item = ControlItem()

        # no propogate values
        self.num_runs = None
        self.sum_level = None

        self.item_data = {}
        self.options = {}

        self.max_fails = 0
        self.limit_fails = False
        self.crit_sec = HiCriticalSection()
        self.processor_name = None
        self.fctrl = None
        self.iss = None
        self.generator = None
        self.rtl = None
        self.performance = None
        self.regression = None
        self.master_config = None
        self.fctrl_name = None
        self.output_root = None
        self.launcher_type = None
        self.output_dir = None
        self.process_cmd = None

        self.terminated = False

        # this is a proc that will decrement the fails counter until it is 0
        # if the proc is None then this will not occur
        self.on_fail_proc = None
        self.is_term_proc = None

        # if an external terminate event is captured then this call back will
        # shutdown master run and all associated threads gracefully
        global shutdown_proc
        shutdown_proc = self.trigger_shutdown
Esempio n. 2
0
    def __init__( self, aAppsInfo):

        Msg.dbg( "Controller::__init__()" )
        self.ctrl_item = None
        self.on_fail_proc = None
        self.is_term_proc = None
        self.mAppsInfo = aAppsInfo
        self.crit_sec = HiCriticalSection()
Esempio n. 3
0
    def __init__(self):
        try:
            self.mCmdLineParms = CommandLineParameters
            self.mConfigArgs = retrieveConfigArgument(sys.argv[1:])
            self.mAppsSetup = ApplicationsSetup(self.mCmdLineParms, sys.argv, self.mConfigArgs, True, True)
            self._mAppsInfo = self.mAppsSetup.getApplicationsInfo()
        except SystemExit as aSysExit:
            sys.exit(int(str(aSysExit)))
        except:
            print("[ERROR] - An Unhandled Error has Occurred during applications setup of " + str(sys.argv[0]))
            traceback.print_exc(file=sys.stdout)
            sys.exit(44)

        self.module_dir, self.module_name = PathUtils.split_path(PathUtils.real_path(sys.argv[0]))
        # self._mAppsInfo = apps_info
        self.load_message_levels(CmdLine.Switches[CmdLine.msg_lev], Defaults.msg_level)

        #print( "Got here (2.1)" )

        # persistent values
        self._mAppsInfo.mMainAppPath = PathUtils.include_trailing_path_delimiter(self.module_dir) + "../.." # TODO still keep main app path for now.
        self._mAppsInfo.mProcessMax = self.option_def( CmdLine.Switches[CmdLine.process_max], None, self.to_int )
        self._mAppsInfo.mTestBaseDir = None
        self._mAppsInfo.mToolPath = self.module_dir
        self.fctrl_dir = None
        self.mode = None
        self.summary = None
        self.process_queue = None
        self.client_lev = False
        self.default_root = ""

        self.ctrl_item = ControlItem()

        # no propogate values
        self.num_runs = None
        self.sum_level = None

        self.item_data = {}
        self.options = {}

        self.max_fails = 0
        self.limit_fails = False
        self.crit_sec = HiCriticalSection()
        self.processor_name = None
        self.fctrl = None

        self.terminated = False

        # this is a proc that will decrement the fails counter until it is 0
        # if the proc is None then this will not occur
        self.on_fail_proc = None
        self.is_term_proc = None

        # if an external terminate event is captured then this call back will shutdown
        # master run and all associated threads gracefully
        global shutdown_proc
        shutdown_proc = self.trigger_shutdown
Esempio n. 4
0
    def __init__(self, aAppsInfo):
        # print( "Got here (2.0)" )
        super().__init__(CmdLine.Switches[CmdLine.msg_lev], Defaults.msg_level,
                         aAppsInfo)
        #print( "Got here (2.1)" )

        # persistent values
        self._mAppsInfo.mMainAppPath = PathUtils.include_trailing_path_delimiter(
            self.module_dir
        ) + "../.."  # TODO still keep main app path for now.
        self._mAppsInfo.mProcessMax = self.option_def(
            CmdLine.Switches[CmdLine.process_max], None, self.to_int)
        self._mAppsInfo.mTestBaseDir = None
        self._mAppsInfo.mToolPath = self.module_dir
        self.fctrl_dir = None
        self.mode = None
        self.summary = None
        self.process_queue = None
        self.client_lev = False
        self.default_root = ""

        self.ctrl_item = ControlItem()

        # no propogate values
        self.num_runs = None
        self.sum_level = None

        self.item_data = {}
        self.options = {}

        self.max_fails = 0
        self.limit_fails = False
        self.crit_sec = HiCriticalSection()
        self.processor_name = None

        self.terminated = False

        # this is a proc that will decrement the fails counter until it is 0
        # if the proc is None then this will not occur
        self.on_fail_proc = None
        self.is_term_proc = None

        # if an external terminate event is captured then this call back will shutdown
        # master run and all associated threads gracefully
        global shutdown_proc
        shutdown_proc = self.trigger_shutdown
Esempio n. 5
0
    def __init__(self, arg_summary_dir, arg_cleanUpRules):

        self.summary_dir = arg_summary_dir
        self.tasks = defaultdict(list)
        self.errors = []
        self.groups = SummaryGroups()
        self.queue = SummaryQueue()
        self.cleanUpRules = arg_cleanUpRules

        # common code protection
        self.crit_sec = HiCriticalSection()
        # failed callback
        self.on_fail_proc = None
        # check terminated callback
        self.is_term_proc = None

        # Launch a Summary Thread
        self.summary_thread = SummaryThread(self.queue, self)