don't stop if one db fails, run for all so we can tell how badly things went wrong on Hudson

This commit is contained in:
chrisw 2010-09-09 21:44:28 +01:00
parent 4d938a3baf
commit 514498d6be

View File

@ -76,7 +76,10 @@ def usedb(supported=None, not_supported=None):
@decorator @decorator
def dec(f, self, *a, **kw): def dec(f, self, *a, **kw):
failed_for = []
exception = None
for url in my_urls: for url in my_urls:
try:
log.debug("Running test with engine %s", url) log.debug("Running test with engine %s", url)
try: try:
try: try:
@ -99,6 +102,14 @@ def usedb(supported=None, not_supported=None):
'setup: %r\n' 'setup: %r\n'
'teardown: %r\n' 'teardown: %r\n'
)%(setup_exception,teardown_exception)) )%(setup_exception,teardown_exception))
except Exception,e:
failed_for.append(url)
exception = exception or e
for url in failed_for:
log.error('Failed for %s', url)
if exception:
# cause the failure :-)
raise exception
return dec return dec