aboutsummaryrefslogtreecommitdiffstats
path: root/resources/tools/presentation/input_data_parser.py
diff options
context:
space:
mode:
Diffstat (limited to 'resources/tools/presentation/input_data_parser.py')
-rw-r--r--resources/tools/presentation/input_data_parser.py31
1 files changed, 31 insertions, 0 deletions
diff --git a/resources/tools/presentation/input_data_parser.py b/resources/tools/presentation/input_data_parser.py
index a04f351cab..8c44dc45fa 100644
--- a/resources/tools/presentation/input_data_parser.py
+++ b/resources/tools/presentation/input_data_parser.py
@@ -858,3 +858,34 @@ class InputData(object):
logging.error(" The filter '{0}' is not correct. Check if all "
"tags are enclosed by apostrophes.".format(cond))
return None
+
+ @staticmethod
+ def merge_data(data):
+ """Merge data from more jobs and builds to a simple data structure.
+
+ The output data structure is:
+
+ - test (suite) 1 ID:
+ - param 1
+ - param 2
+ ...
+ - param n
+ ...
+ - test (suite) n ID:
+ ...
+
+ :param data: Data to merge.
+ :type data: pandas.Series
+ :returns: Merged data.
+ :rtype: pandas.Series
+ """
+
+ logging.info(" Merging data ...")
+
+ merged_data = pd.Series()
+ for _, builds in data.iteritems():
+ for _, item in builds.iteritems():
+ for ID, item_data in item.iteritems():
+ merged_data[ID] = item_data
+
+ return merged_data