1
0
mirror of git://sourceware.org/git/lvm2.git synced 2024-10-27 18:55:19 +03:00

tests: stacktrace on skip if message is empty

This commit is contained in:
Marian Csontos 2015-11-19 12:11:58 +01:00 committed by Zdenek Kabelac
parent 2a23550cf3
commit 6f002c29a5

View File

@ -107,7 +107,7 @@ grep1_() {
awk -v pattern="${1}" 'NR==1 || $0~pattern' "${@:2}"
}
STACKTRACE() {
stacktrace() {
trap - ERR
local i=0
@ -116,6 +116,13 @@ STACKTRACE() {
echo "## $i ${FUNC}() called from ${BASH_SOURCE[$i]}:${BASH_LINENO[$i]}"
i=$(($i + 1))
done
}
STACKTRACE() {
trap - ERR
local i=0
stacktrace
test "${LVM_TEST_PARALLEL:-0}" -eq 1 -o -n "$RUNNING_DMEVENTD" -o -f LOCAL_DMEVENTD || {
pgrep dmeventd &>/dev/null && \
@ -211,7 +218,11 @@ dm_table() {
}
skip() {
test "$#" -eq 0 || echo "TEST SKIPPED: $@"
if test "$#" -eq 0; then
stacktrace
else
echo "TEST SKIPPED: $@"
fi
touch SKIP_THIS_TEST
exit 200
}