aboutsummaryrefslogtreecommitdiffstats
path: root/moonclient
diff options
context:
space:
mode:
authorasteroide <thomas.duval@orange.com>2015-09-16 16:38:55 +0200
committerasteroide <thomas.duval@orange.com>2015-09-16 16:38:55 +0200
commitc583b9854f4b3c0f16fde106197d26abcbba0725 (patch)
treec988a0ac3324e8c747df9502e34c17a2d4d7e878 /moonclient
parenteaffb0e85c81325387e21f47195a679b63215a83 (diff)
Add a better output to tests command.
Change-Id: If581feabafc9c36e5923a3c3939e4d5a61b64619
Diffstat (limited to 'moonclient')
-rw-r--r--moonclient/moonclient/tests.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/moonclient/moonclient/tests.py b/moonclient/moonclient/tests.py
index b259feb6..63f1ed14 100644
--- a/moonclient/moonclient/tests.py
+++ b/moonclient/moonclient/tests.py
@@ -56,6 +56,7 @@ class TestsLaunch(Lister):
global_command_options = tests_dict["command_options"]
data = list()
for group_name, tests_list in tests_dict["tests_group"].iteritems():
+ self.log.info("\n\033[1mgroup {}\033[0m".format(group_name))
self.logfile.write("{}:\n\n".format(group_name))
for test in tests_list:
data_tmp = list()
@@ -68,13 +69,14 @@ class TestsLaunch(Lister):
command = test["command"] + " " + global_command_options
command = self.__replace_var_in_str(command)
self.logfile.write("-----> {}\n".format(command))
- self.log.info("executing {}".format(command))
+ self.log.info(" \\-executing {}".format(command))
self.app.stdout = tmp_filename_fd
result_id = self.app.run_subcommand(shlex.split(command))
tmp_filename_fd.close()
self.app.stdout = stdout_back
result_str = open(tmp_filename, "r").read()
self.logfile.write("{}".format(result_str))
+ data_tmp.append(group_name)
data_tmp.append(test["name"])
compare = self.__compare_results(self.__replace_var_in_str(test["result"]), result_str)
self.logfile.write("----->{} ({})\n\n".format(compare, self.__replace_var_in_str(test["result"])))
@@ -87,6 +89,6 @@ class TestsLaunch(Lister):
data.append(data_tmp)
return (
- ("test_name", "result", "description"),
+ ("group_name", "test_name", "result", "description"),
data
)