INNER CODE UNIT · Python

_get_uitest_pid

codematrixer/hmdriver2 · hmdriver2/_client.py:234

    def _get_uitest_pid(self) -> typing.List[str]:
        proc_pids = []
        result = self.hdc.shell("ps -ef").output.strip()
        lines = result.splitlines()
        filtered_lines = [line for line in lines if 'uitest' in line and 'singleness' in line]
        for line in filtered_lines:
            if 'uitest start-daemon singleness' not in line:
                continue
            proc_pids.append(line.split()[1])
        return proc_pids

    def _kill_uitest_service(self):
        for pid in self._get_uitest_pid():
            self.hdc.shell(f"kill -9 {pid}")
            logger.debug(f"Killed uitest process with PID {pid}")

    def _start_uitest_daemon(self):
        """Start the UITest daemon."""

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…