Last change
on this file since 34 was
34,
checked in by hartmans, 18 years ago
|
Add xen and xen-common
|
-
Property svn:mime-type set to
text/script
|
File size:
976 bytes
|
Line | |
---|
1 | #!/usr/bin/python |
---|
2 | |
---|
3 | # Copyright (C) International Business Machines Corp., 2005 |
---|
4 | # Author: Dan Smith <danms@us.ibm.com> |
---|
5 | |
---|
6 | from XmTestLib import * |
---|
7 | |
---|
8 | import re |
---|
9 | |
---|
10 | MAX_ARGS = 10 |
---|
11 | |
---|
12 | # These commands aren't suitable for this test, so we |
---|
13 | # ignore them |
---|
14 | skipcommands = ["top", "log"] |
---|
15 | |
---|
16 | status, output = traceCommand("xm help --long") |
---|
17 | |
---|
18 | commands = [] |
---|
19 | badcommands = [] |
---|
20 | |
---|
21 | lines = output.split("\n") |
---|
22 | for l in lines: |
---|
23 | match = re.match("^ ([a-z][^ ]+).*$", l) |
---|
24 | if match: |
---|
25 | commands.append(match.group(1)) |
---|
26 | |
---|
27 | for c in commands: |
---|
28 | if c in skipcommands: |
---|
29 | continue |
---|
30 | |
---|
31 | arglist = "" |
---|
32 | for i in range(0,MAX_ARGS+1): |
---|
33 | if i > 0: |
---|
34 | arglist += "%i " % i |
---|
35 | |
---|
36 | status, output = traceCommand("xm %s %s" % (c, arglist)) |
---|
37 | |
---|
38 | if output.find("Traceback") != -1: |
---|
39 | badcommands.append(c + " " + arglist) |
---|
40 | if verbose: |
---|
41 | print "Got Traceback: %s %s" % (c, arglist) |
---|
42 | |
---|
43 | if badcommands: |
---|
44 | FAIL("Got a traceback on: %s" % str(badcommands)) |
---|
Note: See
TracBrowser
for help on using the repository browser.