(self, *, binary, binary_cache_suffix=None, args, env=None, output_file=None, log_error_code=True)
| 177 | self._run_system(cmd=f'cp {aim} {binary_path}') |
| 178 | |
| 179 | def run(self, *, binary, binary_cache_suffix=None, args, env=None, output_file=None, log_error_code=True): |
| 180 | binary_path = self._get_cached_binary_name(binary=binary, binary_cache_suffix=binary_cache_suffix) |
| 181 | if not os.path.exists(binary_path): |
| 182 | raise Exception(f'Cannot find {binary_path}, did you call build()?') |
| 183 | |
| 184 | args_string = "" |
| 185 | for arg, value in args.items(): |
| 186 | if value: |
| 187 | args_string += f' --{arg}={value}' |
| 188 | else: |
| 189 | args_string += f' --{arg}' |
| 190 | |
| 191 | cmd = binary_path + args_string |
| 192 | code, _ = self._run_system_unsafe(cmd=cmd, env=env, output_file=output_file) |
| 193 | if log_error_code: |
| 194 | LOG.info(f'Finish with exit code: {code}') |
| 195 | |
| 196 | def get_or_create_unique_dir_path(self, *, prefix_path): |
| 197 | branch_hash_name = get_branch_hash_name(branch=self.branch, hash=self.hash) |
no test coverage detected