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:
875 bytes
|
Line | |
---|
1 | #!/usr/bin/python |
---|
2 | |
---|
3 | # Copyright (C) International Business Machines Corp., 2005 |
---|
4 | # Author: Woody Marvel <marvel@us.ibm.com> |
---|
5 | |
---|
6 | import sys |
---|
7 | import re |
---|
8 | import time |
---|
9 | |
---|
10 | from XmTestLib import * |
---|
11 | |
---|
12 | # Create a domain (default XmTestDomain, with our ramdisk) |
---|
13 | domain = XmTestDomain() |
---|
14 | |
---|
15 | # Start it |
---|
16 | try: |
---|
17 | console = domain.start() |
---|
18 | except DomainError, e: |
---|
19 | if verbose: |
---|
20 | print "Failed to create test domain because:" |
---|
21 | print e.extra |
---|
22 | FAIL(str(e)) |
---|
23 | |
---|
24 | try: |
---|
25 | # Run 'ls' |
---|
26 | run = console.runCmd("ls") |
---|
27 | except ConsoleError, e: |
---|
28 | FAIL(str(e)) |
---|
29 | |
---|
30 | # Close the console |
---|
31 | domain.closeConsole() |
---|
32 | |
---|
33 | # Check the output of 'ls' |
---|
34 | if not re.search("proc", run["output"]): |
---|
35 | FAIL("'ls' output looks wrong (Didn't see proc)") |
---|
36 | |
---|
37 | # destroy domain - positive test |
---|
38 | status, output = traceCommand("xm destroy %s" % domain.getName()) |
---|
39 | if status != 0: |
---|
40 | FAIL("xm destroy returned invalid %i != 0" % status) |
---|
Note: See
TracBrowser
for help on using the repository browser.