Commit 46a00521 authored by Sebastien Robin's avatar Sebastien Robin Committed by Eteri

erp5_test_result: various small improvements to improve usability

parent 27e15896
......@@ -27,9 +27,9 @@ if query:
revision_list = []
for revision_part in revision.split(','):
repository, commit_hash = revision_part.split('-')
revision_list.append('%s-%s' % (repository, commit_hash[0:8]))
revision_list.append('%s-%s' % (repository, commit_hash[0:7]))
revision = ",".join(revision_list)
test_result = {'revision': str(revision)}
test_result = {'revision': str(revision) + '|' + test.getStartDate().strftime("%Y/%m/%d")}
test_result_list.append(test_result)
for prop in 'all_tests', 'failures', 'errors':
test_result[prop] = test_result.get(prop, 0) + test.getProperty(prop, 0)
......
......@@ -7,7 +7,7 @@ list_method_template = ""
# it allows to make jio.all_docs calling a python script
# http://10.0.80.187:2200/erp5/web_site_module/renderjs_runner/hateoas/ERP5Document_getHateoas
portal = context.getPortalObject()
custom_search_template_no_editable = "%(root_url)s/%(script_id)s?mode=search" + \
custom_search_template_no_editable = "%(root_url)s/hateoas/%(script_id)s?mode=search" + \
"&relative_url=%(relative_url)s" \
"&list_method=%(list_method)s" \
"&default_param_json=%(default_param_json)s" \
......
......@@ -11,15 +11,17 @@ test_dict = {'objective time to view object form': 'view_object',
for result_line in context.objectValues(portal_type='Test Result Line'):
test = {}
object_count = None
for line in result_line.getProperty('stdout').splitlines():
for k, v in test_dict.items():
if k in line:
test['%' in v and v % object_count or v] = \
float(line.split('<')[1].strip())
break
else:
if line.startswith('nb objects ='):
object_count = int(line.split()[-1])
test_list.append(test)
stdout = result_line.getProperty('stdout') or ''
if stdout:
for line in result_line.getProperty('stdout').splitlines():
for k, v in test_dict.items():
if k in line:
test['%' in v and v % object_count or v] = \
float(line.split('<')[1].strip())
break
else:
if line.startswith('nb objects ='):
object_count = int(line.split()[-1])
test_list.append(test)
return test_list
......@@ -10,6 +10,7 @@
<key> <string>delegated_list</string> </key>
<value>
<list>
<string>anchor</string>
<string>columns</string>
<string>portal_types</string>
<string>title</string>
......@@ -73,6 +74,10 @@
<key> <string>values</string> </key>
<value>
<dictionary>
<item>
<key> <string>anchor</string> </key>
<value> <int>1</int> </value>
</item>
<item>
<key> <string>columns</string> </key>
<value>
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment