aboutsummaryrefslogtreecommitdiffstats
path: root/resources/tools/presentation/input_data_parser.py
diff options
context:
space:
mode:
authorTibor Frank <tifrank@cisco.com>2017-11-07 10:49:56 +0100
committerTibor Frank <tifrank@cisco.com>2017-11-07 13:23:45 +0000
commit140cc148a75016164875804e6eb82d878f6b0ba9 (patch)
tree9cdd339e2619155e25fe7f2b171724d04530523e /resources/tools/presentation/input_data_parser.py
parent43519bb1d5843d83224e70fd715752254130ae1f (diff)
PAL: Merge input data
Change-Id: I597358a02a6a73106d4664b364433fb5cffbb135 Signed-off-by: Tibor Frank <tifrank@cisco.com>
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