Exclude RPMs and output xml files from framework packing 86/9686/1
authorJan Gelety <jgelety@cisco.com>
Fri, 1 Dec 2017 08:14:29 +0000 (09:14 +0100)
committerJan Gelety <jgelety@cisco.com>
Fri, 1 Dec 2017 08:14:29 +0000 (09:14 +0100)
Change-Id: Id79c3c54b9bacc10f15c5881492592e69ef3649b
Signed-off-by: Jan Gelety <jgelety@cisco.com>
bootstrap-vpp-verify-semiweekly.sh
bootstrap-vpp-verify-weekly.sh
resources/libraries/python/SetupFramework.py

index 8f46ac6..070dca2 100644 (file)
@@ -28,6 +28,12 @@ ARCHIVE_ARTIFACTS=(log.html output.xml report.html)
 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 +276,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 +290,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,11 +351,10 @@ 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
index 9ae7767..e732810 100644 (file)
@@ -28,6 +28,12 @@ VIRL_SESSION_EXPIRY="620"
 
 SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
 
+# 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
@@ -231,6 +237,7 @@ pip install -r ${SCRIPT_DIR}/requirements.txt
 RC=0
 MORE_FAILS=0
 
+partial_logs=""
 for test_set in 1 2 3
 do
     echo
@@ -242,9 +249,10 @@ do
         --include vm_envAND3_node_double_link_topo \
         --exclude PERFTEST \
         --noncritical EXPECTED_FAILING \
-        --output log_test_set${test_set} \
+        --output ${LOG_PATH}/output_test_set${test_set} \
         tests/
     PARTIAL_RC=$(echo $?)
+    partial_logs="${partial_logs} ${LOG_PATH}/output_test_set${test_set}.xml"
     if [ ${PARTIAL_RC} -eq 250 ]; then
         MORE_FAILS=1
     fi
@@ -290,11 +298,10 @@ echo Post-processing test data...
 
 # Rebot output post-processing
 rebot --noncritical EXPECTED_FAILING \
-      --output output.xml \
-      ./log_test_set1.xml ./log_test_set2.xml ./log_test_set3.xml
+      --output output.xml ${partial_logs}
 
 # Remove unnecessary log files
-rm -f ./log_test_set1.xml ./log_test_set2.xml ./log_test_set3.xml
+rm -f ${partial_logs}
 
 echo Post-processing finished.
 
index 4fb3930..5008128 100644 (file)
@@ -55,8 +55,8 @@ def pack_framework_dir():
     tmpfile.close()
 
     proc = Popen(
-        split("tar --sparse --exclude-vcs "
-              "--exclude=./tmp --exclude=*.deb -zcf {0} .".
+        split("tar --sparse --exclude-vcs --exclude=output*.xml "
+              "--exclude=./tmp --exclude=*.deb --exclude=*.rpm -zcf {0} .".
               format(file_name)), stdout=PIPE, stderr=PIPE)
     (stdout, stderr) = proc.communicate()
 

©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.