X-Git-Url: https://gerrit.opnfv.org/gerrit/gitweb?a=blobdiff_plain;ds=sidebyside;f=ci%2Fenvs%2Fhost-config;h=4742cc42298cd2cff4db1f9b90d9effa86c47e78;hb=be208cb48be4f4db438ce27be15e1f6166c26910;hp=0f77b7ac588890f4c8c09e78aa03ca81f28dde1a;hpb=2046178d894438b492d93f30941076ee7964f6ab;p=kvmfornfv.git diff --git a/ci/envs/host-config b/ci/envs/host-config index 0f77b7ac5..4742cc422 100755 --- a/ci/envs/host-config +++ b/ci/envs/host-config @@ -33,3 +33,14 @@ done #Isolated cpus from host_isolcpus range to run Stress tool stress_isolcpus=${first}-${last} echo "Stress tool runs on $stress_isolcpus" + +#Tar the log files generated during testcase execution. +function err_exit { + exitCode=$1 + cd $WORKSPACE/build_output/ + if [ -d log ];then + tar -czvf log-$(date -u +"%Y-%m-%d_%H-%M-%S").tar.gz log + fi + exit $exitCode +} +