summaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
authorMichael Stahl <mstahl@redhat.com>2016-04-25 11:59:37 +0200
committerMichael Stahl <mstahl@redhat.com>2016-04-27 15:52:41 +0200
commit32b6b0e934ff3ec08f4fa3bcf8b832cc8bff80a1 (patch)
treebd0bfef2ad7945a50ba541533af2224d27f73278 /bin
parent97d9733b24ce94d0bd5f912706e9547f769788e6 (diff)
convwatch: if a document fails to load, log that instead of failing
Bugzillas have lots of zip-files with wrong mime-types and non-well-formed files. Change-Id: I1238a35da0f222759439316a33b8927a3544a965
Diffstat (limited to 'bin')
-rw-r--r--bin/convwatch.py15
1 files changed, 14 insertions, 1 deletions
diff --git a/bin/convwatch.py b/bin/convwatch.py
index fe091f3420ab..1b055e109761 100644
--- a/bin/convwatch.py
+++ b/bin/convwatch.py
@@ -14,6 +14,7 @@ import sys
import time
import uuid
import datetime
+import traceback
try:
from urllib.parse import quote
except ImportError:
@@ -194,6 +195,18 @@ def simpleInvoke(connection, test):
finally:
connection.postTest()
+def logExceptionInvoke(connection, test):
+ try:
+ connection.preTest()
+ test.run(connection.getContext())
+ except KeyboardInterrupt:
+ raise # Ctrl+C should work
+ except:
+ estr = traceback.format_exc()
+ log("logExceptionInvoke: FAILED with exception:\n" + estr)
+ finally:
+ connection.postTest()
+
def retryInvoke(connection, test):
tries = 5
while tries > 0:
@@ -308,7 +321,7 @@ def runLoadPrintFileTests(opts, dirs, suffix, reference):
tests = (LoadPrintFileTest(file, prtsuffix) for file in files)
connection = PersistentConnection(opts)
# connection = PerTestConnection(opts)
- runConnectionTests(connection, simpleInvoke, tests)
+ runConnectionTests(connection, logExceptionInvoke, tests)
def mkImages(file, resolution):
argv = [ "gs", "-r" + resolution, "-sOutputFile=" + file + ".%04d.jpeg",