1
0
mirror of git://sourceware.org/git/lvm2.git synced 2025-03-10 16:58:47 +03:00

tests: stacktrace understands fullpath

$0 as name of script could be either relative or full path.
When it's fullpath don't prepend $TESTOLDPWD.
This commit is contained in:
Zdenek Kabelac 2015-04-14 09:48:57 +02:00
parent c969e05aab
commit c6bcfcba85

View File

@ -166,7 +166,9 @@ STACKTRACE() {
udevadm info --path "$i" || true
done | sed -e "s,^,## UDEV: ,"
echo "<======== Script file \"$(< TESTNAME)\" ========>"
awk '{print "## Line:", NR, "\t", $0}' "$TESTOLDPWD/$0"
local script=$0
test -f "$script" || script="$TESTOLDPWD/$0"
awk '{print "## Line:", NR, "\t", $0}' "$script"
}
test -f SKIP_THIS_TEST && exit 200