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

« back to all changes in this revision

Viewing changes to tests/urltest.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:
44
44
FEDORA_BASEURL = "http://download.fedoraproject.org/pub/fedora/linux/releases/%s/Fedora/%s/os/"
45
45
FEDORA_RAWHIDE_BASEURL = "http://download.fedoraproject.org/pub/fedora/linux/development/%s/os"
46
46
OPENSUSE_BASEURL = "http://download.opensuse.org/distribution/%s/repo/oss/"
 
47
OLD_OPENSUSE_BASEURL = "http://ftp5.gwdg.de/pub/opensuse/discontinued/distribution/%s/repo/oss"
47
48
 
48
49
# ISO Code specific URLs
49
50
UBUNTU_BASEURL="http://us.archive.ubuntu.com/ubuntu/dists/%s/main/installer-%s"
59
60
NOXEN_FILTER=".*ubuntu.*|.*etch.*|.*mandriva.*|.*lenny-64.*|.*centos-4.0.*|.*scientific-4.0.*"
60
61
 
61
62
# Doesn't appear to be a simple boot iso in newer suse trees
62
 
NOBOOTISO_FILTER=".*opensuse11.*|.*opensuse10.3.*"
 
63
NOBOOTISO_FILTER=".*opensuse11.*|.*opensuse10.3.*|.*opensuse10.0.*"
63
64
 
64
65
# Opensuse < 10.3 (and some sles) require crazy rpm hacking to get a bootable
65
66
# kernel. We expect failure in this case since our test harness doesn't
66
67
# actually fetch anything
67
 
EXPECT_XEN_FAIL=".*opensuse10.2.*"
 
68
EXPECT_XEN_FAIL=".*opensuse10.2.*|.*opensuse10.0.*"
68
69
 
69
70
# Return the expected Distro class for the passed distro label
70
71
def distroClass(distname):
125
126
    },
126
127
 
127
128
    # SUSE Distros
 
129
    "opensuse10.0" : {
 
130
        'i386'  : "http://ftp.hosteurope.de/mirror/ftp.opensuse.org/discontinued/10.0/",
 
131
        'x86_64': "http://ftp.hosteurope.de/mirror/ftp.opensuse.org/discontinued/10.0/",
 
132
    },
128
133
    "opensuse10.2" : {
129
 
        'i386'  : OPENSUSE_BASEURL % ("10.2"),
130
 
        'x86_64': OPENSUSE_BASEURL % ("10.2")
 
134
        'i386'  : OLD_OPENSUSE_BASEURL % ("10.2"),
 
135
        'x86_64': OLD_OPENSUSE_BASEURL % ("10.2")
131
136
    },
132
137
    "opensuse10.3" : {
133
 
        'i386'  : OPENSUSE_BASEURL % ("10.3"),
134
 
        'x86_64': OPENSUSE_BASEURL % ("10.3")
 
138
        'i386'  : OLD_OPENSUSE_BASEURL % ("10.3"),
 
139
        'x86_64': OLD_OPENSUSE_BASEURL % ("10.3")
135
140
    },
136
141
    "opensuse11" : {
137
142
        'i386'  : OPENSUSE_BASEURL % ("11.0"),
160
165
    # CentOS Distros
161
166
    "centos-5-latest" : {
162
167
        'i386' : CURCENTOS_BASEURL % ("5", "i386"),
163
 
        #'x86_64' : CURCENTOS_BASEURL % ("5", "x86_64"),  # No .treeinfo
 
168
        'x86_64' : CURCENTOS_BASEURL % ("5", "x86_64"),  # No .treeinfo
164
169
        'distro': ("linux", "rhel5.4")
165
170
    },
166
171
    "centos-4-latest" : {
244
249
 
245
250
 
246
251
testconn = libvirt.open("test:///default")
247
 
testguest = virtinst.Guest(connection=testconn, installer=virtinst.DistroInstaller())
 
252
testguest = virtinst.FullVirtGuest(connection=testconn, installer=virtinst.DistroInstaller())
248
253
 
249
254
class TestURLFetch(unittest.TestCase):
250
255
 
362
367
                if boot != True:
363
368
                    raise RuntimeError("Didn't fetch any boot iso.")
364
369
        except Exception, e:
365
 
            logging.error("%s-%s: bootdisk fetching: %s" % (distname, arch,
366
 
                                                            str(e)))
 
370
            logging.exception("%s-%s: bootdisk fetching: %s" %
 
371
                              (distname, arch, str(e)))
367
372
            self.fail()
368
373
 
369
374
        # Fetch regular kernel
374
379
            if kern[0] is not True or kern[1] is not True:
375
380
                raise RuntimeError("Didn't fetch any hvm kernel.")
376
381
        except Exception, e:
377
 
            logging.error("%s-%s: hvm kernel fetching: %s" % (distname, arch,
378
 
                                                              str(e)))
 
382
            logging.exception("%s-%s: hvm kernel fetching: %s" %
 
383
                              (distname, arch, str(e)))
379
384
            self.fail()
380
385
 
381
386
        # Fetch xen kernel
392
397
            if re.match(r"%s" % EXPECT_XEN_FAIL, distname):
393
398
                logging.debug("%s: anticipated xen failure." % distname)
394
399
            else:
395
 
                logging.error("%s-%s: xen kernel fetching: %s" % (distname,
396
 
                                                                  arch,
397
 
                                                                  str(e)))
 
400
                logging.exception("%s-%s: xen kernel fetching: %s" %
 
401
                                  (distname, arch, str(e)))
398
402
                self.fail()
399
403
 
400
404
    def _getStore(self, fetcher, url, _type, arch):