Ai
23 Star 56 Fork 90

openEuler/hpcrunner
关闭

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
buildService.py 929 Bytes
一键复制 编辑 原始数据 按行查看 历史
chunlin 提交于 2023-03-06 20:34 +08:00 . Add CESM config
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
from dataService import DataService
from executeService import ExecuteService
from toolService import ToolService
class BuildService:
def __init__(self):
self.hpc_data = DataService()
self.exe = ExecuteService()
self.tool = ToolService()
def clean(self):
print(f"start clean {DataService.app_name}")
clean_cmd=self.hpc_data.get_clean_cmd()
clean_file = 'clean.sh'
self.tool.write_file(clean_file, clean_cmd)
run_cmd = f'''
chmod +x {clean_file}
./{clean_file}
'''
self.exe.exec_raw(run_cmd)
def build(self):
print(f"start build {DataService.app_name}")
build_cmd = self.hpc_data.get_build_cmd()
build_file = 'build.sh'
self.tool.write_file(build_file, build_cmd)
run_cmd = f'''
chmod +x {build_file}
./{build_file}
'''
self.exe.exec_raw(run_cmd)
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/openeuler/hpcrunner.git
git@gitee.com:openeuler/hpcrunner.git
openeuler
hpcrunner
hpcrunner
master

搜索帮助