aboutsummaryrefslogtreecommitdiffstats
path: root/moonclient
diff options
context:
space:
mode:
authorasteroide <thomas.duval@orange.com>2015-12-16 16:16:47 +0100
committerasteroide <thomas.duval@orange.com>2015-12-16 16:16:47 +0100
commitc0619d427125a5818ead8c4b7048cb95116dd16d (patch)
tree5aa0c45326ced1f6f5b4143a9765a2f97e8c7e76 /moonclient
parent305397bf05d18e654e5c6c6bfe76d79478883fb4 (diff)
Add log filenames in global outputs.
Change-Id: I755ae05ae95d269b463ac347ef2a8dc527ab5693
Diffstat (limited to 'moonclient')
-rw-r--r--moonclient/moonclient/tests.py12
1 files changed, 8 insertions, 4 deletions
diff --git a/moonclient/moonclient/tests.py b/moonclient/moonclient/tests.py
index 3bef6b9d..bace73af 100644
--- a/moonclient/moonclient/tests.py
+++ b/moonclient/moonclient/tests.py
@@ -81,20 +81,24 @@ class TestsLaunch(Lister):
result_ok = True
# self.log.info(result_id)
# self.log.info(result_values[1])
+ log_filename = ""
for value in result_values[1]:
if "False" in value[2]:
result_ok = False
- break
+ if "Overall results" in value[1]:
+ log_filename = value[3]
if result_ok:
- results.append((result_id, "\033[32mTrue\033[m"))
+ results.append((result_id, "\033[32mTrue\033[m", log_filename))
else:
- results.append((result_id, "\033[1m\033[31mFalse\033[m"))
+ results.append((result_id, "\033[1m\033[31mFalse\033[m", log_filename))
return (
- ("filename", "results"),
+ ("filename", "results", "log file"),
results
)
def test_file(self, testfile):
+ self.logfile_name = "/tmp/moonclient_test_{}.log".format(time.strftime("%Y%m%d-%H%M%S"))
+ self.logfile = open(self.logfile_name, "w")
stdout_back = self.app.stdout
tests_dict = json.load(open(testfile))
self.log.debug("tests_dict = {}".format(tests_dict))