diff --git a/lisa/testsuite.py b/lisa/testsuite.py index 1e6dbedabd..77382757fe 100644 --- a/lisa/testsuite.py +++ b/lisa/testsuite.py @@ -290,7 +290,17 @@ def _send_result_message(self, stacktrace: Optional[str] = None) -> None: # force refresh information, when test result status is changed. The # refreshed information is not used so far. But in case it's needed # in future, keep it up to date. - self._environment_information = self.environment.get_information() + # avoid fetching information unnecessarily when rerun env + force_run = True + if ( + result_message.status == TestResult.status.RUNNING + and not self.environment.is_new + ): + force_run = False + + self._environment_information = self.environment.get_information( + force_run=force_run + ) self.information.update(self._environment_information) self.information["environment"] = self.environment.name