From 8218ea5c0c22cc944d8825df44c569d0dd74d08b Mon Sep 17 00:00:00 2001 From: Alex Krzos Date: Fri, 12 Feb 2016 19:45:35 -0500 Subject: [PATCH] Create/Store Rally json results as well. Change-Id: I1ac5573874b71431b59a9910c74259c6be2acf14 --- lib/Rally.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/lib/Rally.py b/lib/Rally.py index 9240835d2..510846d86 100644 --- a/lib/Rally.py +++ b/lib/Rally.py @@ -79,6 +79,11 @@ class Rally: cmd += "rally task report --task {} --out {}.html".format(all_task_ids, test_name) return self.tools.run_cmd(cmd) + def gen_scenario_json(self, task_id, test_name): + cmd = "source {}; ".format(self.config['rally']['venv']) + cmd += "rally task results {} > {}.json".format(task_id, test_name) + return self.tools.run_cmd(cmd) + # Iterate through all the Rally scenarios to run. # If rerun is > 1, execute the test the desired number of times. def start_workloads(self): @@ -161,6 +166,7 @@ class Rally: if task_id: self.logger.info("Generating Rally HTML for task_id : {}".format(task_id)) self.gen_scenario_html([task_id], test_name) + self.gen_scenario_json(task_id, test_name) results[run].append(task_id) else: self.logger.error("Cannot find task_id")