コード例 #1
0
ファイル: task.py プロジェクト: MapleSystem/OpenArkCompiler
 def update_sub_config(self, config):
     if self.path.exists():
         self.internal_var.update(
             config_section_to_dict(config, "internal-var"))
         self.env.update(config_section_to_dict(config, "env"))
         self.suffix_comments.update(
             config_section_to_dict(config, "suffix"))
     else:
         print("config file: {}, not exists, will use upper config".format(
             self.path))
コード例 #2
0
ファイル: task.py プロジェクト: MapleSystem/OpenArkCompiler
    def __init__(self,
                 test_path,
                 cfg_path,
                 running_config,
                 cli_running_config=None):
        if cli_running_config is None:
            cli_running_config = {}

        self.path = complete_path(test_path)
        self.cfg_path = cfg_path

        config = read_config(self.cfg_path)
        if config is None:
            raise TestError(
                "Test suite config path:{} not found, skip!!!!!".format(
                    self.cfg_path))
        try:
            self.name = config["description"]["title"].replace(" ", "")
        except KeyError:
            self.name = self.path.name
        self.suffix_comments = config_section_to_dict(config, "suffix")

        self.result = defaultdict(int)

        self.config_set = {}
        self.testlist_set = {}

        self.task_set = defaultdict(list)
        self.task_set_result = {}
        self.all_cases = {}
        self._form_task_set(running_config, cli_running_config)