Skip to content

Commit

Permalink
HH-37783 run tests on build and fix failing test
Browse files Browse the repository at this point in the history
  • Loading branch information
SuminAndrew committed Nov 8, 2013
1 parent 58ef4b7 commit 6c32b26
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 11 deletions.
3 changes: 2 additions & 1 deletion debian/control
Expand Up @@ -7,7 +7,8 @@ Build-Depends:
debhelper (>= 7),
python-support,
python,
Standards-Version: 3.8.1
python-nose,
Standards-Version: 3.8.4

Package: frontik
Architecture: all
Expand Down
10 changes: 4 additions & 6 deletions debian/rules
@@ -1,9 +1,7 @@
#!/usr/bin/make -f
# -*- makefile -*-

DEB_DH_INSTALLINIT_ARGS = --no-start
include /usr/share/cdbs/1/rules/debhelper.mk
%:
dh $@

DEB_PYTHON_SYSTEM = pysupport
include /usr/share/cdbs/1/class/python-distutils.mk
include /usr/share/cdbs/1/rules/buildcore.mk
override_dh_auto_test:
nosetests tests -vv || exit 1
4 changes: 2 additions & 2 deletions frontik/jobs.py
Expand Up @@ -23,7 +23,7 @@ def queue_worker(queue):
continue

try:
tornado.ioloop.IOLoop.instance().add_callback(partial(cb, *func()))
tornado.ioloop.IOLoop.instance().add_callback(partial(cb, func()))
except Exception, e:
jobs_log.exception('Cannot perform job')
tornado.ioloop.IOLoop.instance().add_callback(partial(exception_cb, e))
Expand All @@ -34,7 +34,7 @@ class IOLoopExecutor(object):
def add_job(func, cb, exception_cb, prio=None):
def __wrapper():
try:
cb(*func())
cb(func())
except Exception, e:
exception_cb(e)

Expand Down
5 changes: 3 additions & 2 deletions frontik/xsl_producer.py
Expand Up @@ -75,14 +75,15 @@ def job():
profile_run=self.handler.debug.debug_mode.profile_xslt)
return start_time, str(result), result.xslt_profile

def success_cb(start_time, result, xslt_profile=None):
def success_cb(result):
start_time, xml_result, xslt_profile = result
self.log.stage_tag('xsl')
self.log.debug('applied XSL %s in %.2fms', self.transform_filename, (time.time() - start_time) * 1000)
if xslt_profile is not None:
self.log.debug('XSLT profiling results', extra={'_xslt_profile': xslt_profile.getroot()})
if len(self.transform.error_log):
map(self.log.info, (map('xsl message: {0.message}'.format, self.transform.error_log)))
callback(result)
callback(xml_result)

def exception_cb(exception):
self.log.error('failed transformation with XSL %s', self.transform_filename)
Expand Down

0 comments on commit 6c32b26

Please sign in to comment.