def run_devpi_command(project, logger, params) :
reports_dir = project.expand_path("$dir_reports/devpi")
if not os.path.exists(reports_dir) :
os.mkdir(reports_dir)
logger.debug("Executing devpi command %s", params)
output_file_path = os.path.join(reports_dir, params[0].replace("/", ""))
with open(output_file_path, "w") as output_file :
commandexec = ["devpi"]
commandexec.extend(params)
working_dir = project.expand_path("$dir_dist")
process = subprocess.Popen(commandexec, cwd=working_dir, stdout=output_file, stderr=output_file, shell=False)
return_code = process.wait()
if return_code != 0 :
raise BuildFailedException("Error while executing devpi command %s, see %s for details" % (params, output_file_path))
评论列表
文章目录