Robot logs archiving for trending jobs 91/11091/12
authorPeter Mikus <pmikus@cisco.com>
Tue, 13 Mar 2018 08:03:07 +0000 (09:03 +0100)
committerJan Gelety <jgelety@cisco.com>
Wed, 14 Mar 2018 08:16:57 +0000 (08:16 +0000)
- Add output.xml auto-archiving to logs.fd.io.
- Cleanup from obsolete code.

Change-Id: Iafa9ef802264d2ad36ca0f556cb14d2b3ca0f179
Signed-off-by: Peter Mikus <pmikus@cisco.com>
bootstrap-verify-perf.sh
resources/libraries/python/DUTSetup.py

index 377f89c..3271b86 100755 (executable)
@@ -27,7 +27,10 @@ INSTALLATION_DIR="/tmp/install_dir"
 
 PYBOT_ARGS="-W 150 -L TRACE"
 
-ARCHIVE_ARTIFACTS=(log.html output.xml report.html output_perf_data.xml output_perf_data.json)
+JOB_ARCHIVE_ARTIFACTS=(log.html output.xml report.html output_perf_data.xml)
+LOG_ARCHIVE_ARTIFACTS=(output.xml)
+LOG_ARCHIVES_DIR="$WORKSPACE/archives"
+mkdir -p ${LOG_ARCHIVES_DIR}
 
 # If we run this script from CSIT jobs we want to use stable vpp version
 if [[ ${JOB_NAME} == csit-* ]] ;
@@ -35,8 +38,7 @@ then
     mkdir vpp_download
     cd vpp_download
 
-    if [[ ${TEST_TAG} == *NIGHTLY ]] || \
-       [[ ${TEST_TAG} == *DAILY ]] || \
+    if [[ ${TEST_TAG} == *DAILY ]] || \
        [[ ${TEST_TAG} == *WEEKLY ]];
     then
         # Download the latest VPP build .deb install packages
@@ -140,6 +142,9 @@ case "$TEST_TAG" in
               --include ndrdiscAND1t1cANDipsecORndrdiscAND2t2cANDipsec \
               tests/
         RETURN_STATUS=$(echo $?)
+        for i in ${LOG_ARCHIVE_ARTIFACTS[@]}; do
+            cp $( readlink -f ${i} | tr '\n' ' ' ) ${LOG_ARCHIVES_DIR}/${i}.log
+        done
         ;;
     PERFTEST_SEMI_WEEKLY )
         pybot ${PYBOT_ARGS} \
@@ -148,6 +153,9 @@ case "$TEST_TAG" in
               --include ndrdiscANDnic_intel-x710AND1t1cORndrdiscANDnic_intel-x710AND2t2cORndrdiscANDnic_intel-xl710AND1t1cORndrdiscANDnic_intel-xl710AND2t2c \
               tests/
         RETURN_STATUS=$(echo $?)
+        for i in ${LOG_ARCHIVE_ARTIFACTS[@]}; do
+            cp $( readlink -f ${i} | tr '\n' ' ' ) ${LOG_ARCHIVES_DIR}/${i}.log
+        done
         ;;
     VERIFY-PERF-NDRDISC )
         pybot ${PYBOT_ARGS} \
@@ -180,6 +188,9 @@ case "$TEST_TAG" in
               --include mrrAND1t1cORmrrAND2t2c \
               tests/
         RETURN_STATUS=$(echo $?)
+        for i in ${LOG_ARCHIVE_ARTIFACTS[@]}; do
+            cp $( readlink -f ${i} | tr '\n' ' ' ) ${LOG_ARCHIVES_DIR}/${i}.log
+        done
         ;;
     VERIFY-PERF-IP4 )
         pybot ${PYBOT_ARGS} \
@@ -361,7 +372,7 @@ fi
 
 # Archive artifacts
 mkdir -p archive
-for i in ${ARCHIVE_ARTIFACTS[@]}; do
+for i in ${JOB_ARCHIVE_ARTIFACTS[@]}; do
     cp $( readlink -f ${i} | tr '\n' ' ' ) archive/
 done
 
index e0479cf..4246a5a 100644 (file)
@@ -38,8 +38,6 @@ class DUTSetup(object):
                 (ret_code, stdout, stderr) = \
                     ssh.exec_command_sudo('service vpp restart', timeout=120)
                 if int(ret_code) != 0:
-                    logger.debug('stdout: {0}'.format(stdout))
-                    logger.debug('stderr: {0}'.format(stderr))
                     raise Exception('DUT {0} failed to start VPP service'.
                                     format(node['host']))
 
@@ -107,8 +105,6 @@ class DUTSetup(object):
             ssh.exec_command('sudo -Sn bash {0}/{1}/dut_setup.sh'.
                              format(Constants.REMOTE_FW_DIR,
                                     Constants.RESOURCES_LIB_SH), timeout=120)
-        logger.trace(stdout)
-        logger.trace(stderr)
         if int(ret_code) != 0:
             logger.debug('DUT {0} setup script failed: "{1}"'.
                          format(node['host'], stdout + stderr))

©2016 FD.io a Linux Foundation Collaborative Project. All Rights Reserved.
Linux Foundation is a registered trademark of The Linux Foundation. Linux is a registered trademark of Linus Torvalds.
Please see our privacy policy and terms of use.