X-Git-Url: https://gerrit.fd.io/r/gitweb?p=csit.git;a=blobdiff_plain;f=bootstrap-vpp-verify-semiweekly.sh;h=fa0c30b4752f43b2cf11696200f6d686ae27258a;hp=8f46ac6c0ef7382d674e9ea1af1c05cb4fff7082;hb=6928c2b1620e5d020a19e944f416df6a1f4b85ad;hpb=6721e7f09aa95bff6622068332a3f56afad9c87b diff --git a/bootstrap-vpp-verify-semiweekly.sh b/bootstrap-vpp-verify-semiweekly.sh index 8f46ac6c0e..fa0c30b475 100644 --- a/bootstrap-vpp-verify-semiweekly.sh +++ b/bootstrap-vpp-verify-semiweekly.sh @@ -23,11 +23,22 @@ cat /etc/hosts PYBOT_ARGS="--noncritical MULTI_THREAD" -ARCHIVE_ARTIFACTS=(log.html output.xml report.html) +JOB_ARCHIVE_ARTIFACTS=(log.html output.xml report.html) +LOG_ARCHIVE_ARTIFACTS=(log.html output.xml report.html) +JOB_ARCHIVE_DIR="archive" +LOG_ARCHIVE_DIR="$WORKSPACE/archives" +mkdir -p ${JOB_ARCHIVE_DIR} +mkdir -p ${LOG_ARCHIVE_DIR} SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" export PYTHONPATH=${SCRIPT_DIR} +# Create tmp dir +mkdir ${SCRIPT_DIR}/tmp + +# Use tmp dir to store log files +LOG_PATH="${SCRIPT_DIR}/tmp" + if [ -f "/etc/redhat-release" ]; then DISTRO="CENTOS" sudo yum install -y python-devel python-virtualenv @@ -270,6 +281,7 @@ echo Running functional tests on the VIRL system... # There are used three iterations of functional tests there # to check the stability and reliability of the results. +partial_logs="" for test_set in 1 2 3 do echo @@ -283,9 +295,10 @@ do --include vm_envAND3_node_double_link_topo \ --exclude PERFTEST \ --noncritical EXPECTED_FAILING \ - --output log_func_test_set${test_set} \ + --output ${LOG_PATH}/output_func_test_set${test_set} \ tests/ PARTIAL_RC=$(echo $?) + partial_logs="${partial_logs} ${LOG_PATH}/output_func_test_set${test_set}.xml" if [ ${PARTIAL_RC} -eq 250 ]; then MORE_FAILS=1 fi @@ -343,16 +356,18 @@ echo Post-processing test data... # Rebot output post-processing rebot --noncritical EXPECTED_FAILING \ - --output output.xml \ - ./log_func_test_set1.xml ./log_func_test_set2.xml ./log_func_test_set3.xml + --output output.xml ${partial_logs} # Remove unnecessary files -rm -f ./log_test_set1.xml ./log_test_set2.xml ./log_test_set3.xml +rm -f ${partial_logs} -# Archive artifacts -mkdir archive -for i in ${ARCHIVE_ARTIFACTS[@]}; do - cp $( readlink -f ${i} | tr '\n' ' ' ) archive/ +# Archive JOB artifacts in jenkins +for i in ${JOB_ARCHIVE_ARTIFACTS[@]}; do + cp $( readlink -f ${i} | tr '\n' ' ' ) ${JOB_ARCHIVE_DIR}/ +done +# Archive JOB artifacts to logs.fd.io +for i in ${LOG_ARCHIVE_ARTIFACTS[@]}; do + cp $( readlink -f ${i} | tr '\n' ' ' ) ${LOG_ARCHIVE_DIR}/ done echo Post-processing finished.