mirror of
https://github.com/virt-manager/virt-manager.git
synced 2024-12-22 13:34:07 +03:00
test_urls: Better error reporting for URL lookup failure
This commit is contained in:
parent
31f5fff9b8
commit
9d886e1440
@ -19,6 +19,7 @@ import unittest
|
|||||||
import time
|
import time
|
||||||
import logging
|
import logging
|
||||||
import platform
|
import platform
|
||||||
|
import traceback
|
||||||
|
|
||||||
from tests import URLTEST_LOCAL_MEDIA
|
from tests import URLTEST_LOCAL_MEDIA
|
||||||
from tests import utils
|
from tests import utils
|
||||||
@ -217,10 +218,16 @@ def _testURL(fetcher, distname, arch, distroobj):
|
|||||||
hvmguest.os_variant = distroobj.detectdistro
|
hvmguest.os_variant = distroobj.detectdistro
|
||||||
xenguest.os_variant = distroobj.detectdistro
|
xenguest.os_variant = distroobj.detectdistro
|
||||||
|
|
||||||
hvmstore = _storeForDistro(fetcher, hvmguest)
|
try:
|
||||||
xenstore = None
|
hvmstore = _storeForDistro(fetcher, hvmguest)
|
||||||
if distroobj.hasxen:
|
xenstore = None
|
||||||
xenstore = _storeForDistro(fetcher, xenguest)
|
if distroobj.hasxen:
|
||||||
|
xenstore = _storeForDistro(fetcher, xenguest)
|
||||||
|
except:
|
||||||
|
raise AssertionError("\nFailed to detect URLDistro class:\n"
|
||||||
|
"name = %s\n"
|
||||||
|
"url = %s\n\n%s" %
|
||||||
|
(distname, fetcher.location, "".join(traceback.format_exc())))
|
||||||
|
|
||||||
for s in [hvmstore, xenstore]:
|
for s in [hvmstore, xenstore]:
|
||||||
if (s and distroobj.distroclass and
|
if (s and distroobj.distroclass and
|
||||||
|
Loading…
Reference in New Issue
Block a user