From f81ecda07c3203856af134aca2b397711432a58f Mon Sep 17 00:00:00 2001 From: Thomas Duval Date: Mon, 5 Sep 2016 17:13:09 +0200 Subject: Add an option to force the name of the logfile. Change-Id: Iea61a1045c9d60a157725dfc7df8dad5b9ca905a (cherry picked from commit 347dbd9d0ec41fe4951210eea9dad2b41bf7f142) --- tests/run_tests.py | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) (limited to 'tests/run_tests.py') diff --git a/tests/run_tests.py b/tests/run_tests.py index 8030294f..2ed011be 100755 --- a/tests/run_tests.py +++ b/tests/run_tests.py @@ -67,11 +67,12 @@ def test_federation(): def test_moon_openstack(): - cmd = "moon test --password console --self" + log_filename = "moonclient_selftest.log" + cmd = "moon test --password console --self --logfile {}".format(log_filename) - ret_val = functest_utils.execute_command(cmd, logger) + ret_val = functest_utils.execute_command(cmd, exit_on_error=False) - return ret_val + return ret_val, open(log_filename, "rt").read() def main(): @@ -88,6 +89,10 @@ def main(): else: logger.info("OS MOON ERROR") test_status = 'FAIL' + logger.info("Errors from OpenStack tests:") + logger.info(result_os[1]) + logger.info("Errors from Federation tests:") + logger.info(result_odl[1]) details = { 'timestart': start_time, -- cgit 1.2.3-korg