From 132402fc1163e7e983ae71e745f44a57b84d637f Mon Sep 17 00:00:00 2001 From: Kevin Carter Date: Mon, 29 Aug 2016 21:37:03 -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: I4b658c1fac7ea41914c62953e020580758601e24 Signed-off-by: Kevin Carter --- tox.ini | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/tox.ini b/tox.ini index 60b03e5f..06560c9b 100644 --- a/tox.ini +++ b/tox.ini @@ -152,6 +152,11 @@ install_command = pip install -U --force-reinstall {opts} {packages} [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(automagically): this target tests neutron with linuxbridge install_command = {[testenv:func_base]install_command} @@ -165,6 +170,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_ovs] # NOTE(automagically): this target tests neutron with ovs @@ -180,6 +188,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] deps =