From f6f6299983666e34b2adaf00e87c21fd24482714 Mon Sep 17 00:00:00 2001 From: Kevin Carter Date: Mon, 29 Aug 2016 21:37:09 -0500 Subject: [PATCH] Enable log collection after functional testing This change enables log collection within the gate so that further analysis on gate tasks can be performed post build. This is very useful when debugging problems. Change-Id: I96e532605a12a4d15ec9cc038f1d2c9acc6730a4 Signed-off-by: Kevin Carter --- tox.ini | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/tox.ini b/tox.ini index d3b9f5b7..c9b18e48 100644 --- a/tox.ini +++ b/tox.ini @@ -146,6 +146,11 @@ install_command = [testenv:functional] +# Ignore_errors is set to true so that the logs are collected at the +# end of the run. This will not produce a failse positive. Any +# exception will be mark the run as failed and exit 1 after all of +# the commands have been iterated through. +ignore_errors = True # NOTE(odyssey4me): this target does not use constraints because # it doesn't work in OpenStack-CI yet. Once that's fixed, we can # drop the install_command. @@ -161,6 +166,9 @@ commands = -e "rolename={toxinidir}" \ -e "install_test_packages=True" \ {toxinidir}/tests/test.yml -vvvv + bash -c 'mkdir -p {toxinidir}/logs' + bash -c 'rsync -av --ignore-errors /var/log/ /openstack/log/ {toxinidir}/logs/ || true' + [testenv:func_lxd] @@ -178,6 +186,9 @@ commands = -e "rolename={toxinidir}" \ -e "install_test_packages=True" \ {toxinidir}/tests/test.yml -vvvv + bash -c 'mkdir -p {toxinidir}/logs' + bash -c 'rsync -av --ignore-errors /var/log/ /openstack/log/ {toxinidir}/logs/ || true' + [testenv:linters]