当前位置: 首页>>代码示例>>Python>>正文


Python Executor.run_cmd_output方法代码示例

本文整理汇总了Python中common_py.system.executor.Executor.run_cmd_output方法的典型用法代码示例。如果您正苦于以下问题:Python Executor.run_cmd_output方法的具体用法?Python Executor.run_cmd_output怎么用?Python Executor.run_cmd_output使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在common_py.system.executor.Executor的用法示例。


在下文中一共展示了Executor.run_cmd_output方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: check

# 需要导入模块: from common_py.system.executor import Executor [as 别名]
# 或者: from common_py.system.executor.Executor import run_cmd_output [as 别名]
    def check(self):
        self.error_count = 0

        if not self._node or not self._eslint:
            return
        args = ['src', '-f', 'codeframe']
        if self._options and self._options.autoedit:
             args.append('--fix')

        output = ex.run_cmd_output(self._eslint, args, quiet=True)
        match = re.search('(\d+) error', output)
        if match:
            self.error_count = int(match.group(1))

        # Delete unnecessary error messages.
        self.errors = output.split('\n')[:-4]
开发者ID:MoonkiHong,项目名称:iotjs,代码行数:18,代码来源:check_tidy.py

示例2: check

# 需要导入模块: from common_py.system.executor import Executor [as 别名]
# 或者: from common_py.system.executor.Executor import run_cmd_output [as 别名]
    def check(self, files):
        if not self._clang_format:
            return

        for file in filter(self.is_checked_by_clang, files):
            args = ['-style=file', file]
            if self._options and self._options.autoedit:
                args.append('-i')
            output = ex.run_cmd_output(self._clang_format,
                                       args,
                                       quiet=True)

            if output:
                with tempfile.NamedTemporaryFile() as temp:
                    temp.write(output)
                    temp.flush() # just to be really safe
                    self._diff(file, temp.name)
开发者ID:LaszloLango,项目名称:iotjs,代码行数:19,代码来源:check_tidy.py

示例3: __init__

# 需要导入模块: from common_py.system.executor import Executor [as 别名]
# 或者: from common_py.system.executor.Executor import run_cmd_output [as 别名]
    def __init__(self, options):
        self.iotjs = fs.abspath(options.iotjs)
        self.quiet = options.quiet
        self.timeout = options.timeout
        self.valgrind = options.valgrind
        self.coverage = options.coverage
        self.skip_modules = []
        self.results = {}

        if options.skip_modules:
            self.skip_modules = options.skip_modules.split(",")

        # Process the iotjs build information.
        iotjs_output = ex.run_cmd_output(self.iotjs, [path.BUILD_INFO_PATH])
        build_info = json.loads(iotjs_output)

        self.builtins = build_info["builtins"]
        self.stability = build_info["stability"]

        # Define own alarm handler to handle timeout.
        signal.signal(signal.SIGALRM, alarm_handler)
开发者ID:ziransun,项目名称:iotjs,代码行数:23,代码来源:testrunner.py

示例4: git_check_master

# 需要导入模块: from common_py.system.executor import Executor [as 别名]
# 或者: from common_py.system.executor.Executor import run_cmd_output [as 别名]
def git_check_master():
    return not ex.run_cmd_output('git diff master origin/master')
开发者ID:esevan,项目名称:iotjs,代码行数:4,代码来源:merge.py

示例5: git_current_branch

# 需要导入模块: from common_py.system.executor import Executor [as 别名]
# 或者: from common_py.system.executor.Executor import run_cmd_output [as 别名]
def git_current_branch():
    return ex.run_cmd_output('git rev-parse --abbrev-ref HEAD')
开发者ID:esevan,项目名称:iotjs,代码行数:4,代码来源:merge.py

示例6: git_cache_credential

# 需要导入模块: from common_py.system.executor import Executor [as 别名]
# 或者: from common_py.system.executor.Executor import run_cmd_output [as 别名]
def git_cache_credential():
    return ex.run_cmd_output('git config --global credential.helper cache')
开发者ID:esevan,项目名称:iotjs,代码行数:4,代码来源:merge.py


注:本文中的common_py.system.executor.Executor.run_cmd_output方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。