⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 06_help_allcmds.py

📁 xen虚拟机源代码安装包
💻 PY
字号:
#!/usr/bin/python# Copyright (C) International Business Machines Corp., 2005# Author: Dan Smith <danms@us.ibm.com>from XmTestLib import *import reMAX_ARGS = 10# These commands aren't suitable for this test, so we# ignore themskipcommands = ["top", "log"]status, output = traceCommand("xm help --long")commands = []badcommands = []lines = output.split("\n")for l in lines:    match = re.match("^    ([a-z][^ ]+).*$", l)    if match:        commands.append(match.group(1))for c in commands:    if c in skipcommands:        continue    arglist = ""    for i in range(0,MAX_ARGS+1):        if i > 0:            arglist += "%i " % i        status, output = traceCommand("xm %s %s" % (c, arglist))        if output.find("Traceback") != -1:            badcommands.append(c + " " + arglist)            if verbose:                print "Got Traceback: %s %s" % (c, arglist)if badcommands:    FAIL("Got a traceback on: %s" % str(badcommands))

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -