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


Python Server.find_exe方法代码示例

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


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

示例1: run_all

# 需要导入模块: from server import Server [as 别名]
# 或者: from server.Server import find_exe [as 别名]
    def run_all(self):
        """For each file in the test suite, run client program
        assuming each file represents an individual test."""
        try:
            server = Server(self.ini["core"], self.ini["module"])
        except Exception as e:
            print e
            raise RuntimeError("Unknown server: core = {0}, module = {1}".format(
                               self.ini["core"], self.ini["module"]))

        if len(self.tests) == 0:
            # noting to test, exit
            return 0

        server.deploy(self.ini["config"],
                      server.find_exe(self.args.builddir, silent=False),
                      self.args.vardir, self.args.mem, self.args.start_and_exit,
                      self.args.gdb, self.args.valgrind,
                      init_lua=self.ini["init_lua"], silent=False)
        if self.args.start_and_exit:
            print "  Start and exit requested, exiting..."
            exit(0)

        longsep = "=============================================================================="
        shortsep = "------------------------------------------------------------"
        print longsep
        print string.ljust("TEST", 48), "RESULT"
        print shortsep
        failed_tests = []
        self.ini["server"] = server

        for test in self.tests:
            sys.stdout.write(string.ljust(test.name, 48))
            # for better diagnostics in case of a long-running test
            sys.stdout.flush()

            test_name = os.path.basename(test.name)
            if test_name in self.ini["disabled"]:
                print "[ skip ]"
            elif not server.debug and test_name in self.ini["release_disabled"]:
                print "[ skip ]"
            elif self.args.valgrind and test_name in self.ini["valgrind_disabled"]:
                print "[ skip ]"
            else:
                test.run(server)
                if not test.passed():
                    failed_tests.append(test.name)

        print shortsep
        if len(failed_tests):
            print "Failed {0} tests: {1}.".format(len(failed_tests),
                                                ", ".join(failed_tests))
        server.stop(silent=False)
        server.cleanup()

        if self.args.valgrind and check_valgrind_log(server.valgrind_log):
            print "  Error! There were warnings/errors in valgrind log file:"
            print_tail_n(server.valgrind_log, 20)
            return 1
        return len(failed_tests)
开发者ID:anatoliy-sokolenko,项目名称:tarantool,代码行数:62,代码来源:test_suite.py

示例2: find_exe

# 需要导入模块: from server import Server [as 别名]
# 或者: from server.Server import find_exe [as 别名]
 def find_exe(self, builddir, silent=True):
     return Server.find_exe(self, "{0}/mod/{1}".format(builddir, self.module), silent)
开发者ID:spbirhade,项目名称:tarantool,代码行数:4,代码来源:tarantool_server.py


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