Extract the error logs from the snapshot using fuel_logs tool

Change-Id: If40c0f83dd538199c23725ecb765065d0743dc3e
Closes-Bug: #1435196
This commit is contained in:
ss-yuriy 2015-06-03 16:33:51 +03:00 committed by Yuriy Shamray
parent b5a3e87540
commit 7f72df69c9
1 changed files with 14 additions and 1 deletions

View File

@ -57,6 +57,8 @@ if you do need to override them.
-b (num) - Allows you to override Jenkins' build number if you need to.
-l (dir) - Path to logs directory. Can be set by LOGS_DIR evironment variable.
Uses WORKSPACE/logs if not set.
-L - Disable fuel_logs tool to extract the useful lines from Astute and Puppet logs
within the Fuel log snapshot or on the live Fuel Master node.
-d - Dry run mode. Only show what would be done and do nothing.
Useful for debugging.
-k - Keep previously created test environment before tests run
@ -134,7 +136,7 @@ GlobalVariables() {
}
GetoptsVariables() {
while getopts ":w:j:i:t:o:a:A:m:U:r:b:V:l:dkKe:v:h" opt; do
while getopts ":w:j:i:t:o:a:A:m:U:r:b:V:l:LdkKe:v:h" opt; do
case $opt in
w)
WORKSPACE="${OPTARG}"
@ -175,6 +177,9 @@ GetoptsVariables() {
l)
LOGS_DIR="${OPTARG}"
;;
L)
FUELLOGS_TOOL="no"
;;
k)
KEEP_BEFORE="yes"
;;
@ -429,6 +434,14 @@ RunTest() {
fi
ec=$?
# Extract logs using fuel_logs utility
if [ "${FUELLOGS_TOOL}" != "no" ]; then
for logfile in $(find "${WORKSPACE}/logs/" -name "fail*.tar.xz" -type f);
do
./utils/jenkins/fuel_logs.py "${logfile}" > "${logfile}.filtered.log"
done
fi
if [ "${KEEP_AFTER}" != "yes" ]; then
# remove environment after tests
if [ "${DRY_RUN}" = "yes" ]; then