Change-Id: Id79c3c54b9bacc10f15c5881492592e69ef3649b
Signed-off-by: Jan Gelety <jgelety@cisco.com>
SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
export PYTHONPATH=${SCRIPT_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
if [ -f "/etc/redhat-release" ]; then
DISTRO="CENTOS"
sudo yum install -y python-devel python-virtualenv
# There are used three iterations of functional tests there
# to check the stability and reliability of the results.
# There are used three iterations of functional tests there
# to check the stability and reliability of the results.
for test_set in 1 2 3
do
echo
for test_set in 1 2 3
do
echo
--include vm_envAND3_node_double_link_topo \
--exclude PERFTEST \
--noncritical EXPECTED_FAILING \
--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 $?)
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
if [ ${PARTIAL_RC} -eq 250 ]; then
MORE_FAILS=1
fi
# Rebot output post-processing
rebot --noncritical EXPECTED_FAILING \
# 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
# Remove unnecessary files
-rm -f ./log_test_set1.xml ./log_test_set2.xml ./log_test_set3.xml
# Archive artifacts
mkdir archive
# Archive artifacts
mkdir archive
SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
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
if [ -f "/etc/redhat-release" ]; then
DISTRO="CENTOS"
sudo yum install -y python-devel python-virtualenv
for test_set in 1 2 3
do
echo
for test_set in 1 2 3
do
echo
--include vm_envAND3_node_double_link_topo \
--exclude PERFTEST \
--noncritical EXPECTED_FAILING \
--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 $?)
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
if [ ${PARTIAL_RC} -eq 250 ]; then
MORE_FAILS=1
fi
# Rebot output post-processing
rebot --noncritical EXPECTED_FAILING \
# 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
# Remove unnecessary log files
-rm -f ./log_test_set1.xml ./log_test_set2.xml ./log_test_set3.xml
echo Post-processing finished.
echo Post-processing finished.
tmpfile.close()
proc = Popen(
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()
format(file_name)), stdout=PIPE, stderr=PIPE)
(stdout, stderr) = proc.communicate()