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


Python Executor.check_run_cmd_output方法代码示例

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


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

示例1: test_cpp

# 需要导入模块: from common_py.system.executor import Executor [as 别名]
# 或者: from common_py.system.executor.Executor import check_run_cmd_output [as 别名]
def test_cpp():
    test_dir = fs.join(os.path.dirname(__file__), 'test_cpp')
    test_cpp = fs.join(test_dir, 'test.cpp')

    # Compile test.c and make a static library
    print_blue('Compile C++ test module.')
    ex.check_run_cmd_output('c++', ['-c', test_cpp, '-o', test_dir + '/test.o'])
    ex.check_run_cmd_output('ar', ['-cr', test_dir + '/libtest.a',
                     test_dir + '/test.o'])

    # Generate test_module
    print_blue('Generate binding for C++ test module.')
    ex.check_run_cmd_output(generator_script, [test_dir, 'c++'])

    # Build iotjs
    print_blue('Build IoT.js.')
    module_dir = fs.join(module_generator_dir, 'output', 'test_cpp_module')
    args = [
    '--external-module=' + module_dir,
    '--cmake-param=-DENABLE_MODULE_TEST_CPP_MODULE=ON',
    '--jerry-profile=es2015-subset',
    '--clean'
    ]
    ex.check_run_cmd_output(build_script, args)

    run_test_js(test_dir)

    print_green('C++ test succeeded.')
开发者ID:Samsung,项目名称:iotjs,代码行数:30,代码来源:test.py

示例2: __init__

# 需要导入模块: from common_py.system.executor import Executor [as 别名]
# 或者: from common_py.system.executor.Executor import check_run_cmd_output [as 别名]
    def __init__(self, options):
        self._process_pool = multiprocessing.Pool(processes=1)
        self.iotjs = fs.abspath(options.iotjs)
        self.quiet = options.quiet
        self.platform = options.platform
        self.timeout = options.timeout
        self.valgrind = options.valgrind
        self.coverage = options.coverage
        self.n_api = options.n_api
        self.skip_modules = []
        self.results = {}
        self._msg_queue = multiprocessing.Queue(1)

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

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

        self.builtins = set(build_info["builtins"])
        self.features = set(build_info["features"])
        self.stability = build_info["stability"]
        self.debug = build_info["debug"]
        if options.n_api:
            build_napi_test_module(self.debug)
开发者ID:Samsung,项目名称:iotjs,代码行数:29,代码来源:testrunner.py

示例3: check

# 需要导入模块: from common_py.system.executor import Executor [as 别名]
# 或者: from common_py.system.executor.Executor import check_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.check_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:MoonkiHong,项目名称:iotjs,代码行数:18,代码来源:check_tidy.py

示例4: __init__

# 需要导入模块: from common_py.system.executor import Executor [as 别名]
# 或者: from common_py.system.executor.Executor import check_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.check_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:MoonkiHong,项目名称:iotjs,代码行数:24,代码来源:testrunner.py

示例5: run_test_js

# 需要导入模块: from common_py.system.executor import Executor [as 别名]
# 或者: from common_py.system.executor.Executor import check_run_cmd_output [as 别名]
def run_test_js(test_dir):
    # Run test.js
    print_blue('Run test.js file.')
    binary = fs.join(path.BUILD_ROOT, 'x86_64-linux', 'debug', 'bin', 'iotjs')
    test_js = fs.join(test_dir, 'test.js')
    ex.check_run_cmd_output(binary, [test_js])
开发者ID:Samsung,项目名称:iotjs,代码行数:8,代码来源:test.py


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