From cad966bd7d91a67e6d44416278544d6ba3db4cd4 Mon Sep 17 00:00:00 2001 From: Romain Courteaud <romain@nexedi.com> Date: Mon, 4 Apr 2016 13:53:01 +0000 Subject: [PATCH] jstestnode: duration parameter should be an integer --- software/jstestnode/runTestSuite.in | 5 +++-- software/jstestnode/software.cfg | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/software/jstestnode/runTestSuite.in b/software/jstestnode/runTestSuite.in index 74f4b4022..35b211fb8 100644 --- a/software/jstestnode/runTestSuite.in +++ b/software/jstestnode/runTestSuite.in @@ -80,7 +80,7 @@ def main(): 'error_count': 0, 'failure_count': failure, 'skip_count': 0, - 'duration': elt.find_element_by_xpath('.//span[@class="runtime"]').text, + 'duration': int(elt.find_element_by_xpath('.//span[@class="runtime"]').text.split()[0]), 'date': date, 'command': elt.find_element_by_xpath('.//a[text()="Rerun"]').get_attribute('href'), 'stdout': agent, @@ -109,9 +109,10 @@ def main(): # report status back to Nexedi ERP5 test_result_line.stop(**test_line_dict[test_result_line.name]) - except Exception: + except: # Catch any exception here, to warn user instead of being silent, # by generating fake error result + print traceback.format_exc() result = dict(status_code=-1, command=url, stderr=traceback.format_exc(), diff --git a/software/jstestnode/software.cfg b/software/jstestnode/software.cfg index 1aa537f9d..7d6e03fff 100644 --- a/software/jstestnode/software.cfg +++ b/software/jstestnode/software.cfg @@ -106,7 +106,7 @@ mode = 0644 [template-runTestSuite] recipe = slapos.recipe.template url = ${:_profile_base_location_}/runTestSuite.in -md5sum = 57c151675d13fdae1af82664ebe3269f +md5sum = bc5ab8b49baf76a254a91aeea164a048 output = ${buildout:directory}/runTestSuite.in mode = 0644 -- 2.30.9