Commit 39cfe91d authored by Benjamin Blanc's avatar Benjamin Blanc

erp5_test_result: Fix many things

Fix bug in ScalabilityTestSuiteUtils.py: generatedConfiguration: Fix correct max computer number.
Fix properties in test_node
parent ff7afb8d
...@@ -56,7 +56,7 @@ ...@@ -56,7 +56,7 @@
</item> </item>
<item> <item>
<key> <string>priority</string> </key> <key> <string>priority</string> </key>
<value> <float>1.0</float> </value> <value> <float>2.0</float> </value>
</item> </item>
<item> <item>
<key> <string>title</string> </key> <key> <string>title</string> </key>
......
...@@ -32,13 +32,14 @@ def getGeneratedConfigurationList(self, *args, **kw): ...@@ -32,13 +32,14 @@ def getGeneratedConfigurationList(self, *args, **kw):
document_list = [] document_list = []
template = jinja2.Template(self.getClusterConfiguration()) template = jinja2.Template(self.getClusterConfiguration())
max = len(self.getGraphCoordinate()) max = len(self.getGraphCoordinate())
max_comp = 100
#max = self.getNumberConfiguration() #max = self.getNumberConfiguration()
compListView = [ "COMP-%i" %(x) for x in range(0,max+1) ] comp_list_view = [ "COMP-%i" %(x) for x in range(0,max_comp) ]
for count in xrange(1, max+1): for count in xrange(1, max+1):
templateVars = { "count" : count, "comp" : compListView } template_vars = { "count" : count, "comp" : comp_list_view }
outputText = template.render( templateVars ) output_text = template.render(template_vars)
description = json.dumps(json.loads(outputText), sort_keys=True, indent=4, separators=(',', ': ')) description = json.dumps(json.loads(output_text), sort_keys=True, indent=4, separators=(',', ': '))
# Create a temp object # Create a temp object
document_list.append(self.newContent( document_list.append(self.newContent(
...@@ -113,8 +114,8 @@ def generateConfigurationList(self, test_suite_title): ...@@ -113,8 +114,8 @@ def generateConfigurationList(self, test_suite_title):
launcher_nodes.append( remaining_nodes.pop() ) launcher_nodes.append( remaining_nodes.pop() )
# Make list with only the computer_guid property of each node (to be used directly by template) # Make list with only the computer_guid property of each node (to be used directly by template)
remaining_nodes_computer_guid = [unvalid_node] + [ node.getComputerGuid() for node in remaining_nodes ] + [unvalid_node] remaining_nodes_computer_guid = [unvalid_node] + [ node.getReference() for node in remaining_nodes ] + [unvalid_node]
launcher_nodes_computer_guid = [ node.getComputerGuid() for node in launcher_nodes ] launcher_nodes_computer_guid = [ node.getReference() for node in launcher_nodes ]
configuration_list_json = [] configuration_list_json = []
return_dict = {} return_dict = {}
...@@ -147,7 +148,7 @@ def generateConfigurationList(self, test_suite_title): ...@@ -147,7 +148,7 @@ def generateConfigurationList(self, test_suite_title):
# Get the list of all nodes wich will are involved in the test # Get the list of all nodes wich will are involved in the test
involved_nodes_computer_guid = [] involved_nodes_computer_guid = []
for node in available_nodes: for node in available_nodes:
computer_guid = node.getComputerGuid() computer_guid = node.getReference()
if _isInMyDictOrListRec(return_dict, computer_guid): if _isInMyDictOrListRec(return_dict, computer_guid):
involved_nodes_computer_guid.append(computer_guid) involved_nodes_computer_guid.append(computer_guid)
......
...@@ -103,7 +103,7 @@ ...@@ -103,7 +103,7 @@
<string>my_aggregate_title</string> <string>my_aggregate_title</string>
<string>my_specialise_title</string> <string>my_specialise_title</string>
<string>my_master</string> <string>my_master</string>
<string>my_computer_guid</string> <string>my_reference</string>
</list> </list>
</value> </value>
</item> </item>
......
259 260
\ No newline at end of file \ No newline at end of file
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