(self, cmd)
| 56 | subprocess.check_call(cmd, shell=True) |
| 57 | |
| 58 | def cmd(self, cmd): |
| 59 | output = "" |
| 60 | assert isinstance(cmd, list), "code issue happened!!" |
| 61 | for sub_cmd in cmd: |
| 62 | p_cmd = 'ssh -p {} {}@{} "{}" '.format( |
| 63 | self.port, self.login_name, self.ip, sub_cmd |
| 64 | ) |
| 65 | logging.debug("ssh run cmd: {}".format(p_cmd)) |
| 66 | output = output + subprocess.check_output(p_cmd, shell=True).decode("utf-8") |
| 67 | return output |
| 68 | |
| 69 | |
| 70 | def get_finally_bench_resulut_from_log(raw_log) -> float: |