~ubuntu-branches/ubuntu/quantal/virtinst/quantal-proposed

« back to all changes in this revision

Viewing changes to tests/clonetest.py

  • Committer: Bazaar Package Importer
  • Author(s): Jean-Louis Dupond
  • Date: 2010-05-05 03:32:42 UTC
  • mfrom: (1.3.13 sid)
  • Revision ID: james.westby@ubuntu.com-20100505033242-um6f6pjcc89i07m0
Tags: 0.500.3-1ubuntu1
* Merge from debian unstable. (LP: #590068)  Remaining changes:
  - debian/patches/9001_Ubuntu.patch:
     + Added lucid and maverick to OS list and enable virtio for it.
  - debian/patches/0003-Fix-patch-to-keyboard-configuration.patch: disable
    as the keyboard config in Ubuntu is still in /etc/default/console-setup
    and this was causing virt-manager to always default to a en-us
    keyboard. (LP: #524318)
  - debian/control: added acl package to depends. (LP: #533048)
  - Demote virt-viewer to Suggests, as it's in universe.
  - Recommends libvirt-bin (LP: #215084)
* debian/patches/9002-add-ca-keymap.patch: dropped, its now in upstream

Show diffs side-by-side

added added

removed removed

Lines of Context:
37
37
POOL2 = "/cross-pool"
38
38
DISKPOOL = "/disk-pool"
39
39
 
40
 
for f in [ FILE1, FILE2 ]:
41
 
    os.system("touch %s" % f)
 
40
local_files = [ FILE1, FILE2]
42
41
 
43
42
clonexml_dir = os.path.join(os.getcwd(), "tests/clone-xml")
44
43
clone_files = []
45
44
 
46
 
for f in os.listdir(clonexml_dir):
 
45
for tmpf in os.listdir(clonexml_dir):
47
46
    black_list = [ "managed-storage", "cross-pool", "force", "skip",
48
47
                   "fullpool"]
49
 
    if f.endswith("-out.xml"):
50
 
        f = f[0:(len(f) - len("-out.xml"))]
51
 
        if f not in clone_files and f not in black_list:
52
 
            clone_files.append(f)
 
48
    if tmpf.endswith("-out.xml"):
 
49
        tmpf = tmpf[0:(len(tmpf) - len("-out.xml"))]
 
50
        if tmpf not in clone_files and tmpf not in black_list:
 
51
            clone_files.append(tmpf)
53
52
 
54
53
conn = tests.open_testdriver()
55
54
 
59
58
class TestClone(unittest.TestCase):
60
59
 
61
60
    def setUp(self):
62
 
        pass
 
61
        for f in local_files:
 
62
            os.system("touch %s" % f)
 
63
 
 
64
    def tearDown(self):
 
65
        for f in local_files:
 
66
            os.unlink(f)
63
67
 
64
68
    def _clone_helper(self, filebase, disks=None, force_list=None,
65
69
                      skip_list=None, compare=True):