def _set_running_results()

in lisa/runners/legacy_runner.py [0:0]


    def _set_running_results(self, running_cases: List[Dict[str, str]]) -> None:
        # copy a list to find changed cases
        new_running_cases = running_cases[:]
        not_matched_results = [
            x for x in self._results if x.status != TestStatus.QUEUED
        ]
        # remove existing running case, left new running cases
        for running_case in running_cases:
            for result in not_matched_results:
                if self._is_matched_infomation(result, running_case):
                    new_running_cases.remove(running_case)
                    not_matched_results.remove(result)
                    break
        if not_matched_results:
            self.log.error(
                f"not matched should be empty, but {not_matched_results}, "
                f"parsed running cases: {[running_cases]}"
            )

        # set new running case information
        queued_results = [x for x in self._results if x.status == TestStatus.QUEUED]
        for running_case in new_running_cases:
            name = running_case["name"]
            for result in queued_results:
                if result.name == name:
                    # initialize new running case
                    running_case["status"] = str(TestStatus.RUNNING.name)
                    self._set_result(result, information=running_case)
                    # every not run just match one
                    queued_results.remove(result)
                    break