source: trunk/packages/xen-common/xen-common/tools/xm-test/tests/destroy/01_destroy_basic_pos.py @ 34

Last change on this file since 34 was 34, checked in by hartmans, 17 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
6import sys
7import re
8import time
9
10from XmTestLib import *
11
12# Create a domain (default XmTestDomain, with our ramdisk)
13domain = XmTestDomain()
14
15# Start it
16try:
17    console = domain.start()
18except DomainError, e:
19    if verbose:
20        print "Failed to create test domain because:"
21        print e.extra
22    FAIL(str(e))
23
24try:
25    # Run 'ls'
26    run = console.runCmd("ls")
27except ConsoleError, e:
28    FAIL(str(e))
29
30# Close the console
31domain.closeConsole()
32
33# Check the output of 'ls'
34if not re.search("proc", run["output"]):
35    FAIL("'ls' output looks wrong (Didn't see proc)")
36
37# destroy domain - positive test
38status, output = traceCommand("xm destroy %s" % domain.getName())
39if status != 0:
40    FAIL("xm destroy returned invalid %i != 0" % status)
Note: See TracBrowser for help on using the repository browser.